Merge pull request 'feature/film-timeline' (#11) from feature/film-timeline into main

Reviewed-on: 0x2620/aab21#11
This commit is contained in:
j 2021-10-22 12:37:58 +00:00
commit 4f93c9fcf9
8 changed files with 173 additions and 53 deletions

0
app/static/css/partials/_ascroll.scss Normal file → Executable file
View file

View file

@ -1,5 +1,3 @@
.films { .films {
margin: var(--spacing-2); margin: var(--spacing-2);
box-sizing: border-box; box-sizing: border-box;
@ -33,24 +31,25 @@
} }
} }
main > .film { main > .film {
max-width: 1080px;
margin: auto; margin: auto;
.info { .info {
margin: var(--spacing) var(--spacing-2);
margin-bottom: 32px; margin-bottom: 32px;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
text-align: center;
h1 { h1 {
font-size: 24px; font-size: 20px;
margin: 24px 0; margin: 0 0 24px 0;
} }
h2 { h2 {
font-size: 18px;
margin: 24px 0; margin: 24px 0;
} }
.details { .details {
font-size: 18px;
margin-top: var(--spacing-2); margin-top: var(--spacing-2);
} }
.bio { .bio {
@ -60,14 +59,12 @@ main > .film {
} }
} }
} }
video {
width: 100%;
}
.play { .play {
text-align: center; text-align: center;
margin: var(--spacing);
margin-top: var(--spacing-2); margin-top: var(--spacing-2);
margin-bottom: var(--spacing-2); margin-bottom: var(--spacing-2);
max-width: 250px;
.texts { .texts {
padding-top: var(--spacing-2); padding-top: var(--spacing-2);
@ -85,3 +82,88 @@ main > .film {
} }
} }
} }
.info-meta {
display: inline-block;
margin: 0 auto;
position: absolute;
max-width: 600px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
animation: fade_in 1s linear 0.4s forwards;
opacity: 0;
}
.info-meta, .bio-block, .play, .summary-block {
background: rgba(0, 0, 0, 0.55);
border-radius: 2px;
box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.6);
margin-left: auto;
margin-right: auto;
padding: 20px;
font-size: 18px;
a {
color: var(--color-link);
text-decoration: none;
font-weight: 700;
}
}
.summary-block {
max-width: 1080px;
margin-top: 350px;
}
.bio-block {
max-width: 1080px;
margin-top: 30px;
margin-bottom: 30px;
}
.video-block {
height: 100vh;
padding-bottom: 50px;
padding-top: 50px;
video {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: -9999;
height: 100vh;
width: 100vw;
object-fit: fill;
//height: 100vh;
//width: auto;
margin: 0 auto;
}
}
.icon-play {
color: #fff;
border: 3px solid var(--color-link);
border-radius: 50%;
font-size: 32px;
text-decoration: none;
width: 50px;
height: 50px;
display: flex;
align-items: center;
justify-content: center;
margin: auto;
}
.film-play-block {
text-align: center;
font-size: 18px;
}
.film-play-spacer {
padding: var(--spacing);
margin-top: 4px;
font-size: 12px;
font-weight: 700;
}

View file

@ -4,6 +4,8 @@
--bg-color-3: #ffff00; --bg-color-3: #ffff00;
--bg-color-4: #ff3399; --bg-color-4: #ff3399;
--color-link: #ee0;
--spacing: 8px; --spacing: 8px;
--spacing-2: calc(var(--spacing) * 2); --spacing-2: calc(var(--spacing) * 2);
} }
@ -11,20 +13,33 @@
@keyframes background_animation { @keyframes background_animation {
0%,100% { 0%,100% {
background-position: 0 0; background-position: 0 0;
color: #ddd;
} }
50% { 50% {
background-position: 100% 0; background-position: 100% 0;
}
}
@keyframes text_animation {
0%,100% {
color: #ddd;
}
50% {
color: #000; color: #000;
} }
} }
body.animated { body.animated {
background: linear-gradient(to right, var(--bg-color-1), var(--bg-color-2) , var(--bg-color-3), var(--bg-color-4)); background: linear-gradient(to right, var(--bg-color-1), var(--bg-color-2) , var(--bg-color-3), var(--bg-color-4));
animation: background_animation 60s ease-in-out infinite; animation: background_animation 60s ease-in-out infinite;
background-size: 400% 100%; background-size: 400% 100%;
} }
body.animated-text {
animation: text_animation 60s ease-in-out infinite;
}
body { body {
color: #ddd; color: #ddd;
font-family: "noto_sans", sans-serif; font-family: "noto_sans", sans-serif;
@ -48,3 +63,14 @@ nav {
display: none; display: none;
} }
} }
// Animations: Fade In
@keyframes fade_in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}

26
app/templates/film.html Normal file → Executable file
View file

@ -9,12 +9,17 @@
--bg-color-4: {{ film.color_4 }}; --bg-color-4: {{ film.color_4 }};
} }
body {
background-attachment: fixed;
}
</style> </style>
<div class="film"> <div class="film">
<div class="info"> <div class="info">
<div class="info-meta">
<h1> <h1>
<span>{{ film.data.title | safe }}</span> <span class="font-bold">{{ film.data.title | safe }}</span>
<span>{{ film.data.title_zh | safe }}</span> <span>{{ film.data.title_zh | safe }}</span>
</h1> </h1>
<h2> <h2>
@ -23,12 +28,19 @@
{% endfor %} {% endfor %}
</h2> </h2>
<div class="details"> <div class="details">
{{ film.data.date }}, {{ film.duration }} {{ film.data.date}}, {{ film.duration }}
</div> </div>
</div>
<div class="video-block">
<video src="{{ settings.TIMELINE_PREFIX }}{{ film.padma_id }}/loop.mp4" autoplay loop muted playsinline></video> <video src="{{ settings.TIMELINE_PREFIX }}{{ film.padma_id }}/loop.mp4" autoplay loop muted playsinline></video>
</div>
<div class="summary-block">
<p>{{ film.data.summary|safe }}</p> <p>{{ film.data.summary|safe }}</p>
<br> <br>
<p>{{ film.data.summary_zh|safe }}</p> <p>{{ film.data.summary_zh|safe }}</p>
</div>
<div class="bio-block">
<div class="bio"> <div class="bio">
<div class="en"> <div class="en">
{{film.data.director.0}}: {{ film.data.bio|safe }} {{film.data.director.0}}: {{ film.data.bio|safe }}
@ -39,9 +51,6 @@
</div> </div>
</div> </div>
<div class="play"> <div class="play">
<div>
<a href="" id="play-fullscreen">Play</a>
</div>
<div class="texts"> <div class="texts">
{% for text in film.related_texts %} {% for text in film.related_texts %}
<div class="text"> <div class="text">
@ -52,8 +61,11 @@
</div> </div>
{% endfor %} {% endfor %}
</div> </div>
<div> <div class="film-play-block">
<a href="https://pad.ma/{{ film.padma_id }}/info" target="_blank">Open on pad.ma</a> <div><a href="" id="play-fullscreen" class="icon-play"><span>&#x25b6;</span></a></div>
<div class="film-play-spacer">OR</div>
<div><a href="https://pad.ma/{{ film.padma_id }}/info" target="_blank">watch on pad.ma</a></div>
</div>
</div> </div>
</div> </div>
</div> </div>

2
app/templates/films.html Normal file → Executable file
View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block body_class%}animated{% endblock %} {% block body_class%}animated animated-text{% endblock %}
{% block main %} {% block main %}
<div class="films"> <div class="films">
{% for film in films %} {% for film in films %}

2
app/templates/index.html Normal file → Executable file
View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block body_class%}animated{% endblock %} {% block body_class%}animated animated-text{% endblock %}
{% block main %} {% block main %}
<div class="index"> <div class="index">
Phantasmapolis<br> Phantasmapolis<br>

2
app/templates/page.html Normal file → Executable file
View file

@ -1,6 +1,6 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}{{ page.title }} Phantas.ma/polis{% endblock title %} {% block title %}{{ page.title }} Phantas.ma/polis{% endblock title %}
{% block body_class%}animated{% endblock %} {% block body_class%}animated animated-text{% endblock %}
{% block main %} {% block main %}
<div class="page {{ page.slug }}"> <div class="page {{ page.slug }}">
{{ page.body | safe }} {{ page.body | safe }}

2
app/templates/texts.html Normal file → Executable file
View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block body_class%}animated{% endblock %} {% block body_class%}animated animated-text{% endblock %}
{% block main %} {% block main %}
<div class="texts"> <div class="texts">