taler-merchant-demos

Python-based Frontends for the Demonstration Web site
Log | Files | Refs | Submodules | README | LICENSE

common-base.html.j2 (4237B)


      1 <!DOCTYPE html>
      2 <!--
      3   This file is part of GNU TALER.
      4   Copyright (C) 2014, 2015, 2016, 2020, 2021, 2024, 2025 Taler Systems SA
      5 
      6   TALER is free software; you can redistribute it and/or modify it under the
      7   terms of the GNU Lesser General Public License as published by the Free Software
      8   Foundation; either version 2.1, or (at your option) any later version.
      9 
     10   TALER is distributed in the hope that it will be useful, but WITHOUT ANY
     11   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
     12   A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
     13 
     14   You should have received a copy of the GNU Lesser General Public License along with
     15   TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
     16 -->
     17 
     18 <html lang="{{ getlang() }}">
     19 <head>
     20   <title>{{ page_title | default(gettext("GNU Taler Demo")) }}</title>
     21   <link rel="stylesheet" type="text/css" href="{{ static('pure.css') }}">
     22   <link rel="stylesheet" type="text/css" href="{{ static('demo.css') }}">
     23   {% block head %}
     24   {% endblock %}
     25   <script>
     26     function resetState() {
     27       document.getElementById("lang").classList.add("hide");
     28     }
     29     function bodyKeyPress(event) {
     30       if (event.code === "Escape") {
     31         resetState();
     32       }
     33     }
     34     function bodyOnClick(event) {
     35       resetState();
     36     }
     37   </script>
     38 </head>
     39 
     40 <body onkeydown="bodyKeyPress(event)" onclick="bodyOnClick(event)">
     41   <header class="demobar" style="display: flex; flex-direction: row; justify-content: space-between;">
     42     <a href="#main" class="skip">Skip to main content</a>
     43     <div style="max-width: 50em; margin-left: 2em;">
     44       {% block header_content %}
     45         <p>This is the header content.</p>
     46       {% endblock %}
     47     </div>
     48     <a href="https://taler.net/">
     49     <img src="{{ static('logo-white.svg') }}" alt="GNU Taler logo" height="100" width="224" style="margin: 2em 2em"><br>
     50     </a>
     51   </header>
     52 
     53 
     54   <div style="display:flex; flex-direction: column;" class="navcontainer">
     55   <nav class="demolist">
     56     <a href="{{ env('TALER_ENV_URL_INTRO', '#') + getlang() + '/' }}"
     57              {% if getactive() == 'landing' %} class="active" {% endif %}
     58             >{{gettext("Introduction")}}</a>
     59     <a href="{{ env('TALER_ENV_URL_BANK', '#') + '?lang=' + getlang() }}"
     60              {% if getactive() == 'bank' %} class="active" {% endif %}
     61             >{{gettext("Bank")}}</a>
     62     <a href="{{ env('TALER_ENV_URL_MERCHANT_BLOG', '#') + getlang() + '/' }}"
     63              {% if getactive() == 'blog' %} class="active" {% endif %}
     64             >{{gettext("Essay Shop")}}</a>
     65     <a href="{{ env('TALER_ENV_URL_MERCHANT_DONATIONS', '#') + getlang() + '/' }}"
     66              {% if getactive() == 'donations' %} class="active" {% endif %}
     67             >{{gettext("Donations")}}</a>
     68     <script>
     69       function handleLang(event){
     70         if (event.type === 'click') {
     71           document.getElementById("lang").classList.toggle("hide");
     72           event.stopPropagation();
     73         }
     74       }
     75     </script>
     76 
     77     {# Language Selector #}
     78     <div class="right">
     79       <button onkeydown="handleLang(event)" onclick="handleLang(event)" name="language">
     80         {{ all_languages[getlang()] | default("en") }}
     81       </button>
     82       <div id="lang" class="hide">
     83         <div style="position: relative; overflow: visible;">
     84           <div class="nav" style="position: absolute; max-height: 60vh; overflow-y: scroll">
     85             {% for lang_code, lang_display in all_languages.items() %}
     86               {% if lang_code != getlang() %}
     87 	        <a href="{{ url_for('index') + lang_code + '/' }}"
     88 		   class="navbtn langbtn">{{ lang_display }}</a>
     89             {% endif %}
     90           {% endfor %}
     91           </div>
     92         </div>
     93       </div>
     94     </div>
     95   </nav>
     96   </div>
     97 
     98   <section id="main" class="content">
     99     {% block main %}
    100       This is the main content of the page.
    101     {% endblock %}
    102     <hr>
    103     <div>
    104       <p>
    105         {{
    106           gettext('You can learn more about GNU Taler on our main <a href="{site}">website</a>.').format(site="https://taler.net/" + getlang() + "/")
    107         }}
    108       </p>
    109       <div style="flex-grow:1"></div>
    110       <p>Copyright &copy; 2014&mdash;2025 Taler Systems SA</p>
    111     </div>
    112   </section>
    113 </body>
    114 </html>