This commit is contained in:
j 2021-11-23 17:25:39 +01:00
parent fa32bea04b
commit af1d00a0b2
5 changed files with 13 additions and 18 deletions

View file

@ -43,8 +43,7 @@
figcaption { figcaption {
img { img {
max-width: 100%; max-width: 100%;
max-height: 100%; height: 18px;
object-fit: contain;
} }
} }
} }

View file

@ -84,10 +84,8 @@
background: rgba(0,0,0,0.5); background: rgba(0,0,0,0.5);
padding: 16px; padding: 16px;
border-radius: 2px; border-radius: 2px;
.font-size-sm { .h1-en-home {
display: flex; margin-bottom: 16px;
gap: 16px;
justify-content: center;
} }
} }
} }

View file

@ -19,9 +19,9 @@
</div> </div>
</a> </a>
<nav> <nav>
<a href="{% url 'films' %}" class="animated-title"><span class="text">videos</a> <a href="{% url 'films' %}" class="animated-title"><span class="text">videos 비디오</a>
<a href="{% url 'texts' %}" class="animated-title"><span class="text">cuts</a> <a href="{% url 'texts' %}" class="animated-title"><span class="text">cuts 장면들</a>
<a href="{% url 'about' %}" class="animated-title"><span class="text">about</a> <a href="{% url 'about' %}" class="animated-title"><span class="text">about 소개</a>
</nav> </nav>
</div> </div>
<main> <main>

View file

@ -39,12 +39,9 @@
<div class="box"> <div class="box">
<h1 class="h1-en-home">njp.ma</h1> <h1 class="h1-en-home">njp.ma</h1>
<div class="font-size-sm"> <div class="font-size-sm">
<div class="h3"><a href="{% url 'films'%}" class="font-bold">Videos</a></div> <div class="h3"><a href="{% url 'films'%}" class="font-bold">Videos 비디오</a></div>
<div class="h3"><a href="{% url 'texts' %}" class="font-bold">Cuts 장면들</a></div>
<div class="h3"><a href="{% url 'texts' %}" class="font-bold">Cuts</a></div> <div class="h3"><a href="{% url 'about' %}" class="font-bold">About 소개</a></div>
</div>
<div class="font-size-sm">
<div class="h3"><a href="{% url 'about' %}" class="font-bold">About</a></div>
</div> </div>
</div> </div>
</div> </div>

View file

@ -39,7 +39,7 @@ class Command(BaseCommand):
continue continue
if isinstance(item['folder'], list): if isinstance(item['folder'], list):
print(item['id']) print(item['id'])
if item['folder'] not in folders: if item['folder'] not in folders:
description = item['folderdescription'] or item['summary'] description = item['folderdescription'] or item['summary']
folders[item['folder']] = { folders[item['folder']] = {
@ -58,12 +58,13 @@ class Command(BaseCommand):
folders[item['folder']]['items'].append(item) folders[item['folder']]['items'].append(item)
for item in folders.values(): for item in folders.values():
f, c = models.Film.objects.get_or_create(pandora_url=item['url']) slug = escape_slug(item['title'].split(' / ')[0])
f, c = models.Film.objects.get_or_create(slug=slug)
f.pandora_url = item['url']
for key, value in item.items(): for key, value in item.items():
if key != 'url': if key != 'url':
f.data[{ f.data[{
}.get(key, key)] = value }.get(key, key)] = value
if c: if c:
f.public = True f.public = True
f.slug = escape_slug(item['title'])
f.save() f.save()