+ AlbumCollection component; gallery style fix
This commit is contained in:
1 parent
b71ac27c31
commit
7ceb862dfc
8 files changed
+45
-29
No files matched your search
@@ -3,6 +3,7 @@ import Breadcrumbs from './components/Breadcrumbs';
|
|||||||
import Document from './components/Document';
|
import Document from './components/Document';
|
||||||
import Award from './components/Award';
|
import Award from './components/Award';
|
||||||
import GalleryItem from './components/GalleryItem';
|
import GalleryItem from './components/GalleryItem';
|
||||||
|
import AlbumCollection from './components/AlbumCollection';
|
||||||
import TeacherProfile from './components/TeacherProfile';
|
import TeacherProfile from './components/TeacherProfile';
|
||||||
import Timeline from './components/Timeline';
|
import Timeline from './components/Timeline';
|
||||||
import TimelineRecord from './components/TimelineRecord';
|
import TimelineRecord from './components/TimelineRecord';
|
||||||
@@ -85,6 +86,7 @@ app.run(($location, $rootScope, $http) => {
|
|||||||
Document,
|
Document,
|
||||||
Award,
|
Award,
|
||||||
GalleryItem,
|
GalleryItem,
|
||||||
|
AlbumCollection,
|
||||||
TeacherProfile,
|
TeacherProfile,
|
||||||
AppController,
|
AppController,
|
||||||
HomeController,
|
HomeController,
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import template from '../../templates/components/album-collection.html';
|
||||||
|
|
||||||
|
export default function (app) {
|
||||||
|
app.component('albumCollection', {
|
||||||
|
bindings: {
|
||||||
|
title: '@',
|
||||||
|
albums: '<'
|
||||||
|
},
|
||||||
|
template: template
|
||||||
|
});
|
||||||
|
};
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
@import "../variables";
|
||||||
|
|
||||||
|
.album-collection{
|
||||||
|
&__body{
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
position: relative;
|
||||||
|
align-items:flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__title{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,14 +1,18 @@
|
|||||||
@import "../variables";
|
@import "../variables";
|
||||||
|
|
||||||
$img-max-width: 500px;
|
$img-max-width: 500px;
|
||||||
|
$double-margin-half: $double-margin / 2;
|
||||||
|
$percentage: 25%;
|
||||||
|
|
||||||
|
gallery-item {
|
||||||
|
width: $percentage;
|
||||||
|
padding: 0 $double-margin-half;
|
||||||
|
box-sizing: padding-box;
|
||||||
|
|
||||||
.gallery-item {
|
|
||||||
width: calc(33% - #{$single-margin});
|
|
||||||
margin-bottom: $single-margin;
|
margin-bottom: $single-margin;
|
||||||
|
|
||||||
img {
|
img{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: $img-max-width;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
@import "variables";
|
|
||||||
|
|
||||||
.album-collection{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.album-collection__body{
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
align-items: flex-start;
|
|
||||||
|
|
||||||
margin-bottom: $double-margin;
|
|
||||||
}
|
|
||||||
|
|
||||||
.album-collection__title{
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
@import "components/album-collection";
|
||||||
@import "components/gallery-item";
|
@import "components/gallery-item";
|
||||||
@import "components/document";
|
@import "components/document";
|
||||||
@import "components/teacher-proifile";
|
@import "components/teacher-proifile";
|
||||||
@@ -15,7 +16,6 @@
|
|||||||
@import "content";
|
@import "content";
|
||||||
@import "page-animation";
|
@import "page-animation";
|
||||||
|
|
||||||
@import "gallery";
|
|
||||||
@import "docs";
|
@import "docs";
|
||||||
@import "document";
|
@import "document";
|
||||||
@import "album";
|
@import "album";
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<div class="album-collection">
|
||||||
|
<h2 class="album-collection__title">{{$ctrl.title}}</h2>
|
||||||
|
<div class="album-collection__body">
|
||||||
|
<gallery-item ng-repeat="album in $ctrl.albums" record="album"></gallery-item>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -1,8 +1,5 @@
|
|||||||
<div class="content content_wide" ng-controller="GalleryController">
|
<div class="content content_wide" ng-controller="GalleryController">
|
||||||
<div class="album-collection" ng-repeat="period in years">
|
<album-collection ng-repeat="i in years"
|
||||||
<h2 class="album-collection__title">{{period.year}}</h2>
|
title="{{i.year}}" albums="i.albums"
|
||||||
<div class="album-collection__body">
|
></album-collection>
|
||||||
<gallery-item ng-repeat="album in period.albums" record="album"></gallery-item>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
Reference in new issue
Block a user