more data
This commit is contained in:
parent
de78084b29
commit
490c712689
4 changed files with 54 additions and 17 deletions
|
@ -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 {
|
||||
|
|
|
@ -38,9 +38,22 @@ body {
|
|||
<h1>
|
||||
<span class="font-bold">{{ film.data.title | safe }}</span>
|
||||
</h1>
|
||||
<div class="date">
|
||||
{{ film.data.date | safe }}
|
||||
</div>
|
||||
<div class="country">
|
||||
{{ film.data.country|default:''|join:', ' }}
|
||||
</div>
|
||||
<div class="type">
|
||||
{{ film.data.type|default:''|join:', ' }}
|
||||
</div>
|
||||
<div class="details">
|
||||
{{ film.data.description|default:'' }}
|
||||
{{ film.data.description|default:''|safe }}
|
||||
</div>
|
||||
<div class="featuring">
|
||||
Featuring:
|
||||
{{ film.data.featuring|default:''|join:', ' }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="video-block">
|
||||
|
@ -65,9 +78,9 @@ body {
|
|||
<a href="play/{{ item.id }}">
|
||||
<figure>
|
||||
<img src="https://archive.njp.ma/{{ item.id }}/480p.jpg">
|
||||
<figcaption>
|
||||
{{ item.title | safe }}
|
||||
</figcaption>
|
||||
<figcaption>
|
||||
{{ item.title | safe }} ({{item.date | safe }})
|
||||
</figcaption>
|
||||
</figure>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -83,7 +96,6 @@ body {
|
|||
<div class="text">
|
||||
<a href="{{ text.get_absolute_url }}">
|
||||
{{ text.title | safe }}<br>
|
||||
{{ text.byline | striptags }}
|
||||
</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
|
|
@ -33,11 +33,11 @@
|
|||
<img src="https://archive.njp.ma/{{ item.id }}/480p.jpg">
|
||||
{% endfor %}
|
||||
</div>
|
||||
<figcaption>
|
||||
<img src="https://archive.njp.ma/{{ film.data.items.0.id }}/timeline64p.jpg">
|
||||
</figcaption>
|
||||
<figcaption>
|
||||
{{ film.data.title | safe }}
|
||||
<img src="https://archive.njp.ma/{{ film.data.items.0.id }}/timeline64p.jpg">
|
||||
</figcaption>
|
||||
<figcaption>
|
||||
{{ film.data.title | safe }} ({{ film.data.date|safe}})
|
||||
</figcaption>
|
||||
</figure>
|
||||
</a>
|
||||
|
|
|
@ -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': [],
|
||||
|
|
Loading…
Reference in a new issue