aboutsummaryrefslogtreecommitdiffstats
path: root/templates/base.html
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2012-11-19 09:31:34 +0100
committerMatěj Cepl <mcepl@redhat.com>2012-11-19 09:39:26 +0100
commit260276512055cbfe816aeacde6a36cd39700afdb (patch)
treee6c206e611147046df537ce07da2c9928280512b /templates/base.html
parentdb8055b47a6c3db094461dc24659ece70c5371d9 (diff)
downloadhesla-260276512055cbfe816aeacde6a36cd39700afdb.tar.gz
DRY templates (we have now a base template)
Diffstat (limited to 'templates/base.html')
-rw-r--r--templates/base.html43
1 files changed, 43 insertions, 0 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 }}&amp;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
+-->