aboutsummaryrefslogtreecommitdiff
path: root/templates/base.html
blob: bd582860916665733e417ed89eb24a60599a1c73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
{%- import 'macros/head.html' as macros_head %}
{%- import "macros/social.html" as social_macros %}
{%- import "macros/page.html" as page_macros %}
{%- import "macros/macros.html" as macros %}
<!DOCTYPE html>
<html lang="{{ config.extra.language_code | default(value="en-US") }}">
<head>
  <meta charset="utf-8">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  {{- macros_head::resource() }}
  {{- macros_head::stylesheet() }}
  {%- block seo %}
    {%- if config.extra.title_separator %}
      {%- set title_separator = " " ~ config.extra.title_separator ~ " " -%}
    {%- else %}
      {%- set title_separator = " | " -%}
    {%- endif %}
  {%- endblock seo %}
  {{- macros_head::favicons() }}
  <meta name="referrer" content="no-referrer-when-downgrade">
  <meta name="HandheldFriendly" content="True">
  <meta name="mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="default">
  {{- macros_head::math() }}
</head>
<body>
{%- block header %}
  <header>
    <nav>
      <header>
        <h1><a href="{{ get_url(path="/", trailing_slash=true) }}">{{ config.extra.textlogo | safe }}</a></h1>
      </header>
      <div>
        <ul>
          {%- for i in config.extra.menu %}
          <li><h2><a href="{{ get_url(path=i.url, trailing_slash=i.slash) }}">{{ i.name | safe }}</a></h2></li>
          {%- endfor %}
        </ul>
      </div>
      {%- if config.build_search_index %}
      <div>
        <form onsubmit="return goSearch()">
          <div class="searchd">
            <input id="userinput" type="search" placeholder="Search" autocomplete="off">
            <button type="submit" title="Search"><i class="svgs search"></i></button>
          </div>
          <div><div id="suggestions"></div></div>
        </form>
      </div>
      {%- endif %}
    </nav>
    {%- if config.extra.sitedesc %}
    {%- if config.description %}
    <div>{{ config.description }}</div>
    {%- endif %}
    {%- endif %}
    <hr>
  </header>
{%- endblock header %}
  <main>
  {%- block content %}
  {%- endblock content %}
  </main>
{%- block footer %}
  <footer>
    <hr>
    <center>
      <p>
        {{- social_macros::social_links(social_config=config.extra.social) }}
      </p>

      {#- Copyright START #}
      {%- set copyright_start_year=config.extra.copyright_start_year | default(value="") %}
      {%- if copyright_start_year %}{%- set copyright_start_year=copyright_start_year ~ "-" %}{%- endif %}
      {%- set copyright_end_year=config.extra.copyright_end_year | default(value=now() | date(format="%Y")) %}
      <p>Copyright &copy; {{ copyright_start_year ~ copyright_end_year }} {{ config.title }}</p>
      {#- Copyright END #}
      <p>
        {%- for i in config.extra.menu_footer %}
        <a href="{{ get_url(path=i.url, trailing_slash=i.slash) }}">{{ i.name }}</a> &nbsp;
        {%- endfor %}
      </p>

      {%- if config.extra.footer_credit | default(value=true) %}
      {%- if config.extra.footer_credit_override %}
      {{ config.extra.footer_credit_override | safe }}
      {%- else %}    
      <p>Powered by <a href="https://www.getzola.org/">Zola</a> and <a href="https://github.com/jieiku/abridge/">Abridge</a></p>
      {%- endif %}
      {%- endif %}
    </center>
  </footer>
{%- endblock footer %}
</body>
</html>