inital version of scroll view, burger menu, css reset

This commit is contained in:
j 2021-09-30 18:09:42 +01:00
commit 4faf546335
20 changed files with 438 additions and 42 deletions

View file

@ -12,21 +12,36 @@
{% block head %}{% endblock head %}
</head>
<body>
<h1>
phtantasmapolis: Looking Back to the Future
<br>
未竟之城:回顧未來
</h1>
<nav>
<a href="{% url 'films'%}">films - 影片</a> |
<a href="{% url 'edits' %}">edits - 編輯</a> |
<a href="{% url 'tv' %}">tv - 頻道</a> |
<a href="{% url 'essays' %}">essays - 專文</a> |
<a href="{% url 'about' %}">about - 關於</a>
</nav>
<div class="topnav">
<a href="/" class="active">
phtantasmapolis: Looking Back to the Future
<br>
未竟之城:回顧未來
</a>
<nav>
<a href="{% url 'films'%}">films - 影片</a>
<a href="{% url 'edits' %}">edits - 編輯</a>
<a href="{% url 'tv' %}">tv - 頻道</a>
<a href="{% url 'essays' %}">essays - 專文</a>
<a href="{% url 'about' %}">about - 關於</a>
</nav>
<a class="icon">
<svg height="32px" style="enable-background:new 0 0 32 32;" version="1.1" viewBox="0 0 32 32" width="32px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M4,10h24c1.104,0,2-0.896,2-2s-0.896-2-2-2H4C2.896,6,2,6.896,2,8S2.896,10,4,10z M28,14H4c-1.104,0-2,0.896-2,2 s0.896,2,2,2h24c1.104,0,2-0.896,2-2S29.104,14,28,14z M28,22H4c-1.104,0-2,0.896-2,2s0.896,2,2,2h24c1.104,0,2-0.896,2-2 S29.104,22,28,22z"/></svg>
</a>
</div>
<main>
{% block main %}{% endblock main %}
</main>
</main>
{% block end %}{% endblock end %}
<script>
document.querySelectorAll(".topnav a.icon").forEach(a => {
a.onclick = (event) => {
var nav = document.querySelector('.topnav nav')
nav.style.display = nav.style.display === 'block' ? 'none' : 'block'
event.preventDefault()
event.stopPropagation()
}
})
</script>
</body>
</html>

View file

@ -1,7 +1,7 @@
{% extends "base.html" %}
{% block main %}
<video src="https://aab21.pad.ma/{{ film.padma_id }}/loop.mp4" autoplay loop muted></video>
<video src="{{ settings.TIMELINE_PREFIX }}{{ film.padma_id }}/loop.mp4" autoplay loop muted></video>
<h1>{{ film.data.title | safe }}</h1>
<h2>{{ film.data.director|join:", "|safe }}</h2>

View file

@ -1,7 +1,12 @@
{% extends "base.html" %}
{% block main %}
<h1>{{ film.data.title }}</h1>
{% if film.vimeo_id %}
<iframe src="https://player.vimeo.com/video/{{ film.vimeo_id }}" width="640" height="564" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>
{% endif %}
<div id="ascroll"></div>
{% endblock %}
{% block end %}
<script>
var film = {
id: "{{ film.padma_id }}",
}
</script>
<script src="/static/js/ascroll.js"></script>
{% endblock %}

View file

@ -1,9 +1,8 @@
{% extends "base.html" %}
{% block main %}
some overview page with stuff
{% for film in films %}
<div class="film">
<a href="{% url 'film' film.slug %}">{{ film.data.title | safe }}</a>
<a href="{% url 'film' film.slug %}">{{ film.data.title | safe }}</a>
<span>{{ film.data.director|join:", "|safe }}</span>
</div>
{% endfor %}