From ee58032962959616813c0c3593a7943fde33c9ba Mon Sep 17 00:00:00 2001 From: Roman Timashev Date: Thu, 9 Jul 2015 06:03:16 +0300 Subject: [PATCH] album info block --- assets/style/gallery.scss | 20 ++++++++++++++++++++ client/pages/gallery.js | 4 +++- templates/views/gallery-album.html | 7 ++++++- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/assets/style/gallery.scss b/assets/style/gallery.scss index 83a90a72..43c6128d 100644 --- a/assets/style/gallery.scss +++ b/assets/style/gallery.scss @@ -61,6 +61,15 @@ justify-content: center; } + .album-info { + width: 80%; + margin: 0 0 3em; + } + + .album-info p { + margin: 0 0 .5em; + } + .album-item { width: 80%; box-sizing: border-box; @@ -121,6 +130,11 @@ margin: 1em 0 0.5em; } + .album-info{ + width: 100%; + margin: 0 0 2em; + } + .album-item { width: 100%; padding: 1em 1em 5em; @@ -145,6 +159,12 @@ @media screen and (min-width: 31.25em) and (max-width: 59.99999em){ .album-block { + .album-info{ + width: 100%; + margin: 0 0 2em; + font-size: 0.75em; + } + .album-item { width: 100%; padding: 2em 2em 5em; diff --git a/client/pages/gallery.js b/client/pages/gallery.js index 10e593d7..c0e2161a 100644 --- a/client/pages/gallery.js +++ b/client/pages/gallery.js @@ -51,7 +51,7 @@ module.exports = function (app) { } ); - app.controller("AlbumPageController", function ($scope, $http, $routeParams, api, menu) { + app.controller("AlbumPageController", function ($scope, $http, $routeParams, team, api, menu) { menu.activate('/gallery'); var year_uri = $routeParams.year; @@ -67,6 +67,8 @@ module.exports = function (app) { //album.preview_url = preview.content.medium.url; //album.fotorama = album.content.map(productToFotorama); + album.teacherName = team.name(album['teacher']); + $scope.album = album; $scope.crumbs = [ { diff --git a/templates/views/gallery-album.html b/templates/views/gallery-album.html index 93a9f11b..5a045a1f 100644 --- a/templates/views/gallery-album.html +++ b/templates/views/gallery-album.html @@ -2,9 +2,14 @@

{{album.title}}

-
+
+

Предмет: {{album.course}}

+

Преподаватель: {{album.teacherName}}

+

{{album.description}}

+
+