From 646ca1d9fa06a87481c5fe72a237660f6d95d268 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Sat, 24 Mar 2018 11:58:06 -0700 Subject: [PATCH] Add genre badges --- .../newsletters/recently_added.html | 53 +++++++++++-------- .../newsletters/recently_added_master.html | 47 +++++++++------- 2 files changed, 59 insertions(+), 41 deletions(-) diff --git a/data/interfaces/newsletters/recently_added.html b/data/interfaces/newsletters/recently_added.html index 28d92fd2..c45165da 100644 --- a/data/interfaces/newsletters/recently_added.html +++ b/data/interfaces/newsletters/recently_added.html @@ -450,7 +450,14 @@ padding-bottom: 5px; padding-left: 5px; } + .card-info-footer .badge-container { + max-width: 265px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } .card-info-footer .star-rating-container { + width: 60px; vertical-align: bottom; padding-right: 5px; } @@ -477,7 +484,6 @@ vertical-align: middle; background-color: rgba(0, 0, 0, .25); border-radius: 2px; - max-width: 75px; text-overflow: ellipsis; overflow: hidden; } @@ -674,20 +680,23 @@ - % if movie['rating']: <% rating = int(round(float(movie['rating']) / 2)) %> -
+ % if movie['year']: - ${movie['year']} - % endif - % if movie['content_rating']: - ${movie['content_rating']} + ${movie['year']} % endif % if movie['duration']: - ${int(int(movie['duration'])/60000)} mins + <% duration = int(int(movie['duration'])/60000) %> + ${duration} mins + % endif + % if movie['genres']: + % for genre in movie['genres'][:2]: + ${genre} + % endfor % endif + % for _ in range(rating): % endfor @@ -807,23 +816,23 @@ - % if show['rating']: <% rating = int(round(float(show['rating']) / 2)) %> -
- % if show['studio']: - ${show['studio']} - % endif + % if show['year']: - ${show['year']} - % endif - % if show['content_rating']: - ${show['content_rating']} + ${show['year']} % endif % if show['duration']: - ${int(int(show['duration'])/60000)} mins + <% duration = int(int(show['duration'])/60000) %> + ${duration} mins + % endif + % if show['genres']: + % for genre in show['genres'][:2]: + ${genre} + % endfor % endif + % for _ in range(rating): % endfor @@ -919,19 +928,19 @@ - % if album['rating']: <% rating = int(round(float(album['rating']) / 2)) %> -
+ % if album['year']: - ${album['year']} + ${album['year']} % endif % if album['genres']: % for genre in album['genres'][:2]: - ${genre} + ${genre} % endfor % endif + % for _ in range(rating): % endfor diff --git a/data/interfaces/newsletters/recently_added_master.html b/data/interfaces/newsletters/recently_added_master.html index 68cfebc6..73084277 100644 --- a/data/interfaces/newsletters/recently_added_master.html +++ b/data/interfaces/newsletters/recently_added_master.html @@ -450,7 +450,14 @@ padding-bottom: 5px; padding-left: 5px; } + .card-info-footer .badge-container { + max-width: 265px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } .card-info-footer .star-rating-container { + width: 60px; vertical-align: bottom; padding-right: 5px; } @@ -477,7 +484,6 @@ vertical-align: middle; background-color: rgba(0, 0, 0, .25); border-radius: 2px; - max-width: 75px; text-overflow: ellipsis; overflow: hidden; } @@ -674,15 +680,18 @@ - % if movie['rating']: @@ -807,18 +816,18 @@
+ % if movie['year']: - ${movie['year']} - % endif - % if movie['content_rating']: - ${movie['content_rating']} + ${movie['year']} % endif % if movie['duration']: - ${int(int(movie['duration'])/60000)} mins + <% duration = int(int(movie['duration'])/60000) %> + ${duration} mins + % endif + % if movie['genres']: + % for genre in movie['genres'][:2]: + ${genre} + % endfor % endif
- % if show['rating']: @@ -919,13 +928,13 @@
- % if show['studio']: - ${show['studio']} - % endif + % if show['year']: - ${show['year']} - % endif - % if show['content_rating']: - ${show['content_rating']} + ${show['year']} % endif % if show['duration']: - ${int(int(show['duration'])/60000)} mins + <% duration = int(int(show['duration'])/60000) %> + ${duration} mins + % endif + % if show['genres']: + % for genre in show['genres'][:2]: + ${genre} + % endfor % endif
-
+ % if album['year']: - ${album['year']} + ${album['year']} % endif % if album['genres']: % for genre in album['genres'][:2]: - ${genre} + ${genre} % endfor % endif