njpma/app/templates/base.html

48 lines
1.7 KiB
HTML
Raw Normal View History

2021-09-28 13:10:22 +00:00
<!doctype html>{% load sass_tags static %}
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<title>
{% block title %}
Phantas.ma/polis 2021 Asian Art Biennial
{% endblock title %}
</title>
<link href="{% sass_src 'css/style.scss' %}" rel="stylesheet" type="text/css">
{% block head %}{% endblock head %}
</head>
<body>
<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>
2021-09-28 13:10:22 +00:00
<main>
{% block main %}{% endblock main %}
</main>
2021-09-28 13:10:22 +00:00
{% 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>
2021-09-28 13:10:22 +00:00
</body>
</html>