summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/base.html8
-rw-r--r--templates/header.html4
-rw-r--r--templates/index.html14
-rw-r--r--templates/section.html5
-rw-r--r--templates/translation-links.html8
5 files changed, 25 insertions, 14 deletions
diff --git a/templates/base.html b/templates/base.html
index 1d7b588..e1280e2 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -14,7 +14,13 @@
<body>
- {% include "header.html" %}
+ <header id="site-header" class="site-header">
+ <div class="site-title">{{ config.title }}</div>
+ <div class="site-bar">
+ <div class="site-description">{{ trans(key="description", lang=lang) }}</div>
+ <div class="language">{% block language %}{% endblock language %}</div>
+ </div>
+ </header>
<div class="page-content">
<div class="wrapper">
diff --git a/templates/header.html b/templates/header.html
deleted file mode 100644
index ad0951f..0000000
--- a/templates/header.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<header id="site-header" class="site-header">
- <div class="site-title">{{ config.title }}</div>
- <div class="site-description">{{ trans(key="description", lang=lang) }}</div>
-</header>
diff --git a/templates/index.html b/templates/index.html
index 48857c4..0296444 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -1,17 +1,13 @@
{% extends "base.html" %}
-{% block content %}
+{% block language %}
+{% set translations = section.translations %}
+{% include "translation-links.html" %}
+{% endblock language %}
+{% block content %}
<section id="home-blurb">
{{ section.content | safe }}
</section>
-<section id="translations">
- This page is also available in:
- {% for l in section.translations %}
- {% if l.lang != lang %}
- <a href="{{ l.permalink | safe }}">{{ trans(key=l.lang) }}</a>
- {% endif %}
- {% endfor %}
-</section>
<section class="subsections">
{% for sub in section.subsections %}
diff --git a/templates/section.html b/templates/section.html
index fed7472..0440afa 100644
--- a/templates/section.html
+++ b/templates/section.html
@@ -1,4 +1,9 @@
{% extends "base.html" %}
+{% block language %}
+{% set translations = section.translations %}
+{% include "translation-links.html" %}
+{% endblock language %}
+
{% block content %}
<h1>{{ section.title }}</h1>
diff --git a/templates/translation-links.html b/templates/translation-links.html
new file mode 100644
index 0000000..c87f01a
--- /dev/null
+++ b/templates/translation-links.html
@@ -0,0 +1,8 @@
+<span class="translations">
+ {% for l in translations %}
+ {% if l.lang != lang %}
+ {{ trans(key="read_in", lang=l.lang) }}
+ <a href="{{ l.permalink | safe }}">{{ trans(key=l.lang) }}</a>
+ {% endif %}
+ {% endfor %}
+</span>