First attempt to display cover only
This commit is contained in:
@@ -11,6 +11,10 @@ body > .container {
|
|||||||
padding-top: 60px;
|
padding-top: 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body > .container-fluid {
|
||||||
|
padding-top: 60px;
|
||||||
|
}
|
||||||
|
|
||||||
/* collapses the navbar one media earlier ( french has long title name ) */
|
/* collapses the navbar one media earlier ( french has long title name ) */
|
||||||
@media (min-width: 768px) and (max-width: 991px) {
|
@media (min-width: 768px) and (max-width: 991px) {
|
||||||
.navbar-collapse.collapse {
|
.navbar-collapse.collapse {
|
||||||
@@ -25,4 +29,39 @@ body > .container {
|
|||||||
.navbar-header {
|
.navbar-header {
|
||||||
float:none;
|
float:none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.album {
|
||||||
|
padding-top:15px;
|
||||||
|
padding-bottom:15px;
|
||||||
|
overflow:hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
.album {
|
||||||
|
height: 70vw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (min-width: 768px) and (max-width: 991px) {
|
||||||
|
.album {
|
||||||
|
height: 46vw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (min-width: 992px) and (max-width: 1199px) {
|
||||||
|
.album {
|
||||||
|
height: 35vw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 1200px) {
|
||||||
|
.album {
|
||||||
|
height: 23vw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
img.cover {
|
||||||
|
width:100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<link href="/css/satbd.sateliite.bar.css" rel="stylesheet" />
|
<link href="/css/satbd.sateliite.bar.css" rel="stylesheet" />
|
||||||
<title>satbd: explorez la betheque de sat</title>
|
<title>satbd: explorez la betheque de sat</title>
|
||||||
</head>
|
</head>
|
||||||
<body ng-app="satbd.satellite.bar">
|
<body ng-app="satbd.satellite.bar" ng-controller="GlobalCtrl">
|
||||||
<nav class="navbar navbar-inverse navbar-fixed-top">
|
<nav class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<div class="container" ng-controller="NavbarCollapseCtrl">
|
<div class="container" ng-controller="NavbarCollapseCtrl">
|
||||||
<script type="text/ng-template" id="help.html">
|
<script type="text/ng-template" id="help.html">
|
||||||
@@ -54,18 +54,12 @@
|
|||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<!-- Begin page content -->
|
<!-- Begin page content -->
|
||||||
<div class="container">
|
<div class="container-fluid">
|
||||||
<div class="results" ng-controller="ResultsCtrl">
|
<div class="recent row" ng-controller="RecentCtrl">
|
||||||
<ul>
|
<div class="album col-xs-6 col-sm-4 col-md-3 col-lg-2" ng-repeat="id in albumIDs" ng-controller="RecentAlbumCtrl" ng-init="init_by_id(id)">
|
||||||
<li ng-repeat="id in albumIDs">
|
<img class="cover img-responsive img-rounded center-block" src="{{album.CoverURL}}">
|
||||||
<div ng-controller="AlbumCtrl" ng-init="init_by_id(id)">
|
</div>
|
||||||
<h3>{{album.titre}}</h3>
|
</div>
|
||||||
<img src="{{album.CoverURL}}">
|
|
||||||
<p>Description: {{album.description}} </p>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/js/angular.min.js"></script>
|
<script src="/js/angular.min.js"></script>
|
||||||
|
|||||||
@@ -1,5 +1,14 @@
|
|||||||
angular.module('satbd.satellite.bar', ['ui.bootstrap','ngAnimate']);
|
angular.module('satbd.satellite.bar', ['ui.bootstrap','ngAnimate']);
|
||||||
|
|
||||||
|
angular.module('satbd.satellite.bar').controller('GlobalCtrl', function($scope) {
|
||||||
|
$scope.location = ''
|
||||||
|
$scope.isActive = function(location) {
|
||||||
|
return $scope.location == location
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
angular.module('satbd.satellite.bar').controller('NavbarCollapseCtrl', function ($scope, $uibModal) {
|
angular.module('satbd.satellite.bar').controller('NavbarCollapseCtrl', function ($scope, $uibModal) {
|
||||||
$scope.isCollapsed = true;
|
$scope.isCollapsed = true;
|
||||||
$scope.openModal = function (size) {
|
$scope.openModal = function (size) {
|
||||||
@@ -19,17 +28,18 @@ angular.module('satbd.satellite.bar').controller('HelpInstanceCtrl', function($s
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
angular.module('satbd.satellite.bar').controller('ResultsCtrl', function($scope, $http,$log) {
|
angular.module('satbd.satellite.bar').controller('RecentCtrl', function($scope, $http,$log) {
|
||||||
$scope.albumIDs = [];
|
$scope.albumIDs = [ ];
|
||||||
$http.get('/api/recents').success(function(data){
|
$http.get('/api/recents').success(function(data){
|
||||||
for (var i = 0; i < 30; i++) {
|
for (var i = 0; i < 10; i++) {
|
||||||
$scope.albumIDs.push(data[i])
|
$scope.albumIDs.push(data[i])
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
angular.module('satbd.satellite.bar').controller('AlbumCtrl', function($scope, $http) {
|
angular.module('satbd.satellite.bar').controller('RecentAlbumCtrl', function($scope, $http) {
|
||||||
$scope.init_by_id = function(id) {
|
$scope.init_by_id = function(id) {
|
||||||
$http.get('api/albums/'+ id).success(function (data) {
|
$http.get('api/albums/'+ id).success(function (data) {
|
||||||
$scope.album = data;
|
$scope.album = data;
|
||||||
|
|||||||
Reference in New Issue
Block a user