@@ -12,37 +12,58 @@ <h1>Libraries</h1>
1212 </ div >
1313 < div *ngIf ="!showSearchResults " class ="libraries-no-search ">
1414 < h4 > Highest rated libraries</ h4 >
15- < div class ="sample-libraries ">
16- < ul >
17- < li *ngFor ="#library of highestRatedLibs.slice(0, 10) " class ="library ">
18- < a class ="thumbnail " [routerLink] ="['/Library', { library: library._id }] "> {{library.name}}</ a >
19- </ li >
20- </ ul >
15+ < div class ="sample-libraries row ">
16+ < div *ngFor ="#library of highestRatedLibs.slice(0, 10) " class ="library-movie col-xs-6 col-sm-4 col-md-3 col-lg-2 ">
17+ < div class ="movie-poster-container " style ="position:relative; height:75%; padding:7px ">
18+ < img src ="./assets/default_library.png " class ="" style ="margin-bottom:2px; height:auto; width:100%; padding:4px "[routerLink] ="['/Library', { library: library._id }] ">
19+ </ div >
20+ < div class ="library-details " style ="height:25% ">
21+ < span > {{library.name}} ({{library.user.username}})</ span >
22+ < div class ="ratings " style ="display:block ">
23+ < span class ="glyphicon {{ getAvgRating(library.ratings) < 1 ? 'glyphicon-star-empty': 'glyphicon-star' }} "> </ span >
24+ < span class ="glyphicon {{ getAvgRating(library.ratings) < 2 ? 'glyphicon-star-empty': 'glyphicon-star' }} "> </ span >
25+ < span class ="glyphicon {{ getAvgRating(library.ratings) < 3 ? 'glyphicon-star-empty': 'glyphicon-star' }} "> </ span >
26+ < span class ="glyphicon {{ getAvgRating(library.ratings) < 4 ? 'glyphicon-star-empty': 'glyphicon-star' }} "> </ span >
27+ < span class ="glyphicon {{ getAvgRating(library.ratings) < 5 ? 'glyphicon-star-empty': 'glyphicon-star' }} "> </ span >
28+ </ div >
29+ </ div >
30+ </ div >
2131 </ div >
2232 < h4 > Libraries with the most movies</ h4 >
23- < div class ="sample-libraries ">
24- < ul >
25- < li *ngFor ="#library of mostMoviesLibs.slice(0, 10) " class ="library ">
26- < a class ="thumbnail " [routerLink] ="['/Library', { library: library._id }] "> {{library.name}}</ a >
27- </ li >
28- </ ul >
33+ < div class ="sample-libraries row ">
34+ < div *ngFor ="#library of mostMoviesLibs.slice(0, 10) " class ="library-movie col-xs-6 col-sm-4 col-md-3 col-lg-2 ">
35+ < div class ="movie-poster-container " style ="position:relative; height:75%; padding:7px ">
36+ < img src ="./assets/default_library.png " class ="" style ="margin-bottom:2px; height:auto; width:100%; padding:4px "[routerLink] ="['/Library', { library: library._id }] ">
37+ </ div >
38+ < div class ="library-details " style ="height:25% ">
39+ < span > {{library.name}} ({{library.user.username}})</ span >
40+ < span style ="display:block "> {{library.movies.length}} {{library.movies.length === 1 ? 'movie' : 'movies' }}</ span >
41+ </ div >
42+ </ div >
2943 </ div >
3044 < h4 > Libraries with the most comments</ h4 >
31- < div class ="sample-libraries ">
32- < ul >
33- < li *ngFor ="#library of mostCommentsLibs.slice(0, 10) " class ="library ">
34- < a class ="thumbnail " [routerLink] ="['/Library', { library: library._id }] "> {{library.name}}</ a >
35- </ li >
36- </ ul >
45+ < div class ="sample-libraries row ">
46+ < div *ngFor ="#library of mostCommentsLibs.slice(0, 10) " class ="library-movie col-xs-6 col-sm-4 col-md-3 col-lg-2 ">
47+ < div class ="movie-poster-container " style ="position:relative; height:75%; padding:7px ">
48+ < img src ="./assets/default_library.png " class ="" style ="margin-bottom:2px; height:auto; width:100%; padding:4px "[routerLink] ="['/Library', { library: library._id }] ">
49+ </ div >
50+ < div class ="library-details " style ="height:25% ">
51+ < span > {{library.name}} ({{library.user.username}})</ span >
52+ < span style ="display:block "> {{library.comments.length}} {{library.comments.length === 1 ? 'comment' : 'comments' }}</ span >
53+ </ div >
54+ </ div >
3755 </ div >
3856 </ div >
3957 < div class ="libraries-search " *ngIf ="showSearchResults ">
40- < div class ="libraries-search-results ">
41- < ul >
42- < li *ngFor ="#library of getShownResults() " class ="library ">
43- < a class ="thumbnail " [routerLink] ="['/User', { library: library._id }] "> {{library.name}}</ a >
44- </ li >
45- </ ul >
58+ < div class ="sample-libraries row ">
59+ < div *ngFor ="#library of getShownResults() " class ="library-movie col-xs-6 col-sm-4 col-md-3 col-lg-2 ">
60+ < div class ="movie-poster-container " style ="position:relative; height:75%; padding:7px ">
61+ < img src ="./assets/default_library.png " class ="" style ="margin-bottom:2px; height:auto; width:100%; padding:4px "[routerLink] ="['/Library', { library: library._id }] ">
62+ </ div >
63+ < div class ="library-details " style ="height:25% ">
64+ < span > {{library.name}} ({{library.user.username}})</ span >
65+ </ div >
66+ </ div >
4667 </ div >
4768 < nav >
4869 < ul class ="pagination ">
0 commit comments