aboutsummaryrefslogtreecommitdiffstats
path: root/templates/base.html
blob: b20d1791ce1353cc8ccf9172b36b2d388cac4c9e (plain) (blame)
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
<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>
      {% if page.title %}
        {{ page.title }}&nbsp;|&nbsp;
      {% endif %}
      {% if section.title %}
        {{ section.title }}&nbsp;|&nbsp;
      {% endif %}
      {{ config.title }}
    </title>

    <link rel="stylesheet" type="text/css" media="screen" href={{ get_url(path="main.css") }} />
  </head>

  <body>
    <header>
      <h1 class="title">{{ config.title }}</h1>
      <div class="navbar">
        <ul>
          {% set current_path = current_path | default(value="/") %}
          <li>
            {% if current_path == "/" %}
              <a href="/" class="navbar-selected">About</a>
            {% else %}
              <a href="/" class="navbar-unselected">About</a>
            {% endif %}
          </li>
          <li>
            {% if current_path is starting_with("/blog") %}
              <a href="/blog/" class="navbar-selected">Blog</a>
            {% else %}
              <a href="/blog/" class="navbar-unselected">Blog</a>
            {% endif %}
          </li>
          <li>
            {% if current_path is starting_with("/publications") %}
              <a href="/publications/" class="navbar-selected">Publications</a>
            {% else %}
              <a href="/publications/" class="navbar-unselected">Publications</a>
            {% endif %}
          </li>
          <li>
            {% if current_path is starting_with("/software") %}
              <a href="/software/" class="navbar-selected">Software</a>
            {% else %}
              <a href="/software/" class="navbar-unselected">Software</a>
            {% endif %}
          </li>
          <li>
            {% if current_path is starting_with("/teaching") %}
              <a href="/teaching/" class="navbar-selected">Teaching</a>
            {% else %}
              <a href="/teaching/" class="navbar-unselected">Teaching</a>
            {% endif %}
          </li>
          <li>
            <a href="https://git.adbjesus.com" class="navbar-unselected">Git</a>
          </li>
        </ul>
      </div>
    </header>

    <main>
      {% block content %}
      {% endblock content %}
    </main>

    <footer>
      <p>
        Copyright (c) 2024 Alexandre Jesus
      </p>
      <p>
        The contents of this website are licensed under the
        <a rel="license"
           href="https://creativecommons.org/licenses/by-sa/4.0">CC
           BY-SA 4.0</a> license, except for the PDFs in the
           <a href="/publications/">publications page</a> or if
           otherwise explicitly noted.
      </p>
      <p>
        The source code of this website is licensed under the MIT
        license, and available in a
        <a href="https://git.adbjesus.com/website">git repository</a>.
      </p>
    </footer>
  </body>
</html>