summaryrefslogtreecommitdiffstatshomepage
path: root/templates/base.html
blob: 8c42d1762b507549ad76932584e67e19829f9472 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{% import "macros.html" as macros -%}

{%- if page -%}
	{%- set description = "post № " ~ page.slug -%}
	{%- set title = page.title | default(value=description) -%}
{%- elif term -%}
	{%- set description = "posts tagged with #" ~ term.name -%}
	{%- set title = description -%}
{%- elif terms -%}
	{%- set description = "all tags" -%}
	{%- set title = description -%}
{%- endif -%}

{%- set title = title | default(value=config.description) -%}

<!DOCTYPE html>
<html lang="en">
	<head>
		<title>
			{{ config.title ~ " · " ~ title }}
		</title>
		<link rel="stylesheet" href="/style.css"/>
		<link rel="icon" href="/icon.svg"/>
		<link rel="alternate" type="application/atom+xml" title="zunzuncito" href="/atom.xml" />
		{% if term -%}
		<link rel="alternate" type="application/atom+xml" title="zunzuncito - #{{ term.name }}" href="atom.xml" />
		{% endif -%}
		<meta charset="utf-8"/>
		<meta name="viewport" content="width=device-width, initial-scale=1"/>
	</head>
	<body>
		<main>
			<header>
				<h1><a href="/">{{ config.title }}</a></h1>
				<div class="banner smaller">
				{{ config.description }}{% if description %} · {{ description }}{% endif %}
				{% if section -%}
					· <a href="/atom.xml">feed</a> · <a href="/tags">tags</a>
				{% elif term -%}
					· <a href="atom.xml">feed</a>
				{% endif -%}
				</div>
			</header>
			{%- block content %}{% endblock -%}
		</main>
	</body>
</html>