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 {
|
||||
div {
|
||||
aspect-ratio: 4/3;
|
||||
img {
|
||||
display: none;
|
||||
//max-width: 100%;
|
||||
max-height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
img:first-child {
|
||||
display: inherit
|
||||
}
|
||||
}
|
||||
figcaption {
|
||||
img {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
img:first-child {
|
||||
display: inherit
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -232,6 +242,10 @@ main > .film {
|
|||
|
||||
.film-play-padma {
|
||||
font-family: "wrong font";
|
||||
a {
|
||||
color: #ddd;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
.film-play-spacer {
|
||||
|
|
|
@ -38,8 +38,21 @@ 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>
|
||||
|
@ -66,7 +79,7 @@ body {
|
|||
<figure>
|
||||
<img src="https://archive.njp.ma/{{ item.id }}/480p.jpg">
|
||||
<figcaption>
|
||||
{{ item.title | safe }}
|
||||
{{ item.title | safe }} ({{item.date | safe }})
|
||||
</figcaption>
|
||||
</figure>
|
||||
</a>
|
||||
|
@ -83,7 +96,6 @@ body {
|
|||
<div class="text">
|
||||
<a href="{{ text.get_absolute_url }}">
|
||||
{{ text.title | safe }}<br>
|
||||
{{ text.byline | striptags }}
|
||||
</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<img src="https://archive.njp.ma/{{ film.data.items.0.id }}/timeline64p.jpg">
|
||||
</figcaption>
|
||||
<figcaption>
|
||||
{{ film.data.title | safe }}
|
||||
{{ 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