From 260276512055cbfe816aeacde6a36cd39700afdb Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Mon, 19 Nov 2012 09:31:34 +0100 Subject: DRY templates (we have now a base template) --- templates/base.html | 43 +++++++++++++++++++++++++++++++++++++++++++ templates/czech.html | 49 +++++++------------------------------------------ templates/german.html | 48 +++++++++--------------------------------------- 3 files changed, 59 insertions(+), 81 deletions(-) create mode 100644 templates/base.html (limited to 'templates') 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 %} + + + + + + + {{ title }} + + + + + {% for art in articles %} +

{{ art.date_full }}{%- + if art.sunday %}
{{ art.sunday }}{%- endif %}

+ {% for wword in art.watchwords %}

{{ wword.text }}

+

{% if wword.ref_id -%} + + {{ wword.ref }} + + {%- else %} + {{ wword.ref }} + {%- endif %}

{% endfor %} + {%- if art.readings %}{% endif %} +
+ {%- endfor %} + + + + 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 }}&mod={{ mod }} -{%- endmacro %} - - - - - - - Hesla Jednoty bratrské pro tento den - - - - - {% for art in articles %} -
-
-

{{ art.date_full }}

-
- {% for wword in art.watchwords %} -

{{ wword.text }}

-

{{ wword.ref }}

- {% endfor %} - -
- {% endfor %} - - - +{% 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 +Petru Heřmanovi{% endblock %} 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 @@ - - - - - - - Die Losungen der Herrnhuter Brüdergemeine - - - - - {% for art in articles %} -
-
-

{{ art.date_full }}{% if art.sunday %} -
{{ art.sunday }} - {%- endif %}

-
- {% for wword in art.watchwords %} -

{{ wword.text }}

-

{{ wword.ref }}

- {% endfor %} -
- {% endfor %} - - - +{% 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 %}© Evangelische Brüder-Unität – Herrnhuter Brüdergemeine
+ Weitere Informationen finden Sie hier.{% endblock %} -- cgit