aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/base.html43
-rw-r--r--templates/czech.html49
-rw-r--r--templates/german.html48
3 files changed, 59 insertions, 81 deletions
diff --git a/templates/base.html b/templates/base.html
new file mode 100644
index 0000000..86b153f
--- /dev/null
+++ b/templates/base.html
@@ -0,0 +1,43 @@
+{%- macro bible_url(ref, mod) %}
+ http://www.crosswire.org/study/passagestudy.jsp?key={{ ref.book
+ }}+{{ ref.chapter }}%3A{{ ref.verse }}&mod={{ bib_mod }}
+{%- endmacro %}
+<!DOCTYPE html>
+<html manifest="hesla.appcache">
+ <head>
+ <meta charset="utf-8"/>
+ <meta content="width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scalable=yes" name="viewport"/>
+ <link href="screen.css" type="text/css" rel="stylesheet"/>
+ <title>{{ title }}</title>
+ <script src="hesla.js" type="text/javascript" defer="defer">
+</script>
+ </head>
+ <body>
+ <noscript>{{ noscript_message }}</noscript>
+ {% for art in articles %}
+ <article id="{{ art.date_id }}"><header><h1>{{ art.date_full }}{%-
+ if art.sunday %}<br>{{ art.sunday }}{%- endif %}</h1></header>
+ {% for wword in art.watchwords %}<p>{{ wword.text }}</p>
+ <p class="reference">{% if wword.ref_id -%}
+ <a href="{{ bible_url(wword.ref_id) }}">
+ {{ wword.ref }}
+ </a>
+ {%- else %}
+ {{ wword.ref }}
+ {%- endif %}</p>{% endfor %}
+ {%- if art.readings %}<ul class="readings">
+ {% for read in art.readings %}<li>{{ read }}</li>{% endfor %}
+ </ul>{% endif %}
+ </article>
+ {%- endfor %}
+ <footer class="acknowledgment">
+ <p>{% block acknowledgment %}{% endblock %}</p>
+ <ul class="navigation">
+ <li id="czech_nav">Česky</li>
+ <li id="german_nav">Deutsch</li>
+ </ul>
+ </footer>
+ </body>
+</html>
+<!-- vi:ft=htmljinja
+-->
diff --git a/templates/czech.html b/templates/czech.html
index 9a96002..d6bae04 100644
--- a/templates/czech.html
+++ b/templates/czech.html
@@ -1,44 +1,9 @@
-{% macro bible_url(ref, mod) %}
- http://www.crosswire.org/study/passagestudy.jsp?key={{ ref.book }}+{{ ref.chapter }}%3A{{ ref.verse }}&amp;mod={{ mod }}
-{%- endmacro %}
-<!DOCTYPE html>
-<html manifest="hesla.appcache">
- <head>
- <meta charset="utf-8"/>
- <meta content="width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scalable=yes" name="viewport"/>
- <link href="screen.css" type="text/css" rel="stylesheet"/>
- <title>Hesla Jednoty bratrské pro tento den</title>
- <script src="hesla.js" type="text/javascript" defer="defer">
-</script>
- </head>
- <body>
- <noscript>Omlouvám se, ale tato aplikace opravdu nefunguje bez
- funkčního JavaScriptu.</noscript>
- {% for art in articles %}
- <article id="{{ art.date_id }}">
- <header>
- <h1>{{ art.date_full }}</h1>
- </header>
- {% for wword in art.watchwords %}
- <p>{{ wword.text }}</p>
- <p class="reference"><a href="{{ bible_url(wword.ref_id, 'CzeCEP') }}">{{ wword.ref }}</a></p>
- {% endfor %}
- <ul class="readings">
- {% for read in art.readings %}
- <li>{{ read }}</li>
- {% endfor %}
- </ul>
- </article>
- {% endfor %}
- <footer class="acknowledgment">
- <p>Děkuji za poskytnuté texty <a href="http://hesla.dulos.cz/" target="_blank">Petru
- Heřmanovi</a>.</p>
- <ul class="navigation">
- <li id="czech_nav">Česky</li>
- <li id="german_nav">Deutsch</li>
- </ul>
- </footer>
- </body>
-</html>
+{% extends "base.html" %}
+{% set title = 'Hesla Jednoty bratrské pro tento den' %}
+{% set noscript_message =
+'Omlouvám se, ale tato aplikace opravdu nefunguje bez funkčního JavaScriptu' %}
+{% set bib_mod = 'CzeCEP' %}
+{% block acknowledgment %}Děkuji za poskytnuté texty
+<a href="http://hesla.dulos.cz/" target="_blank">Petru Heřmanovi</a>{% endblock %}
<!-- vi:ft=htmljinja
-->
diff --git a/templates/german.html b/templates/german.html
index 340d462..8480f41 100644
--- a/templates/german.html
+++ b/templates/german.html
@@ -1,41 +1,11 @@
-<!DOCTYPE html>
-<html manifest="hesla.appcache">
- <head>
- <meta charset="utf-8"/>
- <meta content="width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scalable=yes" name="viewport"/>
- <link href="screen.css" type="text/css" rel="stylesheet"/>
- <title>Die Losungen der Herrnhuter Brüdergemeine</title>
- <script src="hesla.js" type="text/javascript" defer="defer">
-</script>
- </head>
- <body>
- <noscript>Tut mir leid, aber diese Anwendung funktioniert wirklich
- nicht ohne aktiviertes JavaScript!</noscript>
- {% for art in articles %}
- <article id="{{ art.date_id }}">
- <header>
- <h1>{{ art.date_full }}{% if art.sunday %}
- <br>{{ art.sunday }}
- {%- endif %}</h1>
- </header>
- {% for wword in art.watchwords %}
- <p>{{ wword.text }}</p>
- <p class="reference">{{ wword.ref }}</p>
- {% endfor %}
- </article>
- {% endfor %}
- <footer class="acknowledgment"><p>© <a href="http://www.ebu.de"
- target="_blank">Evangelische Brüder-Unität –
- Herrnhuter Brüdergemeine</a><br>
- Weitere Informationen finden Sie <a
- href="http://www.losungen.de"
- target="_blank">hier</a>.</p>
- <ul class="navigation">
- <li id="czech_nav">Česky</li>
- <li id="german_nav">Deutsch</li>
- </ul>
- </footer>
- </body>
-</html>
+{% extends "base.html" %}
+{% set title = 'Die Losungen der Herrnhuter Brüdergemeine' %}
+{% set noscript_message =
+'Tut mir leid, aber diese Anwendung funktioniert wirklich nicht ohne aktiviertes JavaScript!' %}
+{% set bib_mod = 'GerNeUe' %}
+{% block acknowledgment %}© <a href="http://www.ebu.de"
+ target="_blank">Evangelische Brüder-Unität – Herrnhuter Brüdergemeine</a><br>
+ Weitere Informationen finden Sie <a href="http://www.losungen.de"
+ target="_blank">hier</a>.{% endblock %}
<!-- vi:ft=htmljinja
-->