aboutsummaryrefslogblamecommitdiffstats
path: root/templates/base.html
blob: b6d26cad2932b577ba52f44681e59434f030296f (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
                                     
                                                                   
                                                               
                








                                                     
               
      

                           
                                                                                                                 
                                                              


                                                                              
                                               
                              
                                                         




                           
                                       







                                                                          


                                                 
                                  
                             












                                                                              

                                                                     



                                                                         












                                                       
{%- macro bible_url(ref, bib_mod) -%}
    http://www.crosswire.org/study/passagestudy.jsp?key={{ ref.book
    }}+{{ ref.chapter }}%3A{{ ref.verse }}&mod={{ bibMod }}
{%- endmacro -%}
{%- macro verses(word) -%}
<p>{{ word.text }}</p>
      <p class="reference">{% if word.int_ref_id -%}
          <a href="{{ bible_url(word.int_ref_id) }}">
              {{ word.ref }}
          </a>
          {%- else %}
              {{ word.ref }}
          {%- endif %}</p>{%- endmacro -%}
<!DOCTYPE html>
<html>
  <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"/>
    <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
    <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
    <link rel="manifest" href="/manifest.json">
    <title>{{ title }}</title>
    <script src="config.js" type="module" defer></script>
    <style>
        div#installButton {
            display: none;
        }
    </style>
  <script type="text/javascript" defer>
    if ('serviceWorker' in navigator) {
      navigator.serviceWorker.register('/sworker.js').then(function(reg) {
        console.log('Yey!', reg);
      }).catch(function(err) {
        console.log('Boo!', err);
      });
    }
  </script>
  </head>
  <body>
      <noscript>{{ noscript_message }}</noscript>
    <div id="installButton"></div>
    {% for art in articles %}
    <article id="{{ art.date_id }}"><header><h1>{%-
                if art.week_title %}{{ art.week_title }}<br>{%-
                endif %}{{ art.date_full }}{%-
                if art.holy_name %}<br>{{ art.holy_name }}</h1>{%-
        if art.holy_text %}{{
            verses(art.holy_text)}}<hr>{% endif %}{%
            else %}</h1>{%- endif %}{%-
                if art.sun_name %}<h2>{{ art.sun_name }}{%-
                    if art.sun_mean %}: {{ art.sun_mean }}{%- endif %}</h2>{%-
                endif %}{%- if art.sun_text %}{{
            verses(art.sun_text)}}<hr>{%- endif %}</header>

            {% for wword in art.watchwords %}{{ verses(wword) }}{% endfor %}
      {%- if art.readings %}<ul class="readings">
        {% for read in art.readings %}<li>{{ read }}</li>{% endfor %}
      </ul>{% endif %}
      {%- if art.chronicles %}<ul class="chronicles">
        {% for chron in art.chronicles %}<li>{{ chron }}</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
-->