From 490c712689711d5ee7ef2b6f59b39ff9a771e217 Mon Sep 17 00:00:00 2001 From: j Date: Mon, 22 Nov 2021 10:20:10 +0100 Subject: [PATCH] more data --- app/static/css/partials/_film.scss | 28 +++++++++++++++----- app/templates/film.html | 22 +++++++++++---- app/templates/films.html | 8 +++--- app/video/management/commands/load_titles.py | 13 ++++++++- 4 files changed, 54 insertions(+), 17 deletions(-) diff --git a/app/static/css/partials/_film.scss b/app/static/css/partials/_film.scss index ca9c243..85d34f1 100755 --- a/app/static/css/partials/_film.scss +++ b/app/static/css/partials/_film.scss @@ -28,14 +28,24 @@ font-size: 20px; } figure { - img { - display: none; - max-width: 100%; - max-height: 100%; - object-fit: contain; + div { + aspect-ratio: 4/3; + img { + display: none; + //max-width: 100%; + max-height: 100%; + object-fit: cover; + } + img:first-child { + display: inherit + } } - img:first-child { - display: inherit + figcaption { + img { + max-width: 100%; + max-height: 100%; + object-fit: contain; + } } } } @@ -232,6 +242,10 @@ main > .film { .film-play-padma { font-family: "wrong font"; + a { + color: #ddd; + text-decoration: none; + } } .film-play-spacer { diff --git a/app/templates/film.html b/app/templates/film.html index 853a35e..6f35143 100644 --- a/app/templates/film.html +++ b/app/templates/film.html @@ -38,9 +38,22 @@ body {

{{ film.data.title | safe }}

+
+ {{ film.data.date | safe }} +
+
+ {{ film.data.country|default:''|join:', ' }} +
+
+ {{ film.data.type|default:''|join:', ' }} +
- {{ film.data.description|default:'' }} + {{ film.data.description|default:''|safe }}
+
+ Featuring: + {{ film.data.featuring|default:''|join:', ' }} +
@@ -65,9 +78,9 @@ body {
-
- {{ item.title | safe }} -
+
+ {{ item.title | safe }} ({{item.date | safe }}) +
@@ -83,7 +96,6 @@ body {
{{ text.title | safe }}
- {{ text.byline | striptags }}
{% endfor %} diff --git a/app/templates/films.html b/app/templates/films.html index 387fd39..8ab0ab3 100644 --- a/app/templates/films.html +++ b/app/templates/films.html @@ -33,11 +33,11 @@ {% endfor %} -
- -
- {{ film.data.title | safe }} + +
+
+ {{ film.data.title | safe }} ({{ film.data.date|safe}})
diff --git a/app/video/management/commands/load_titles.py b/app/video/management/commands/load_titles.py index 50230bd..b58ce84 100644 --- a/app/video/management/commands/load_titles.py +++ b/app/video/management/commands/load_titles.py @@ -25,18 +25,29 @@ class Command(BaseCommand): }, 'keys': [ 'id', 'title', 'director', 'summary', 'source', 'sourcedescription', 'date', 'location', + 'country', 'type', 'duration', 'featuring', 'cinematographer', 'hue', 'saturation', 'lightness', - 'folder', 'folderdescription' + 'folder', 'folderdescription', 'rightslevel' ], + 'sort': [{'key': 'duration', 'operator': '-'}], 'range': [0, 1000] } folders = {} for item in api.find(**query)['data']['items']: + if item['rightslevel'] > 0: + continue + if isinstance(item['folder'], list): + print(item['id']) + if item['folder'] not in folders: description = item['folderdescription'] or item['summary'] folders[item['folder']] = { 'title': item['folder'], + 'date': item['date'], + 'country': item['country'], + 'featuring': item['featuring'], + 'type': item['type'], 'description': description, 'url': api.url.replace('/api/', '/grid/folder==' + escape(item['folder'])), 'items': [],