summaryrefslogtreecommitdiffstatshomepage
path: root/templates/base.html
blob: 2bdb4e7ab1d072f307969c115477fde4d71b0c5a (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
{% import "macros/header.html" as header %}

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <meta name="author" content="{{ config.author }}">
    <meta name="robots" content="index,follow">
    <meta name="description" content="{% block description %}{{ config.description }}{% endblock description %}">
    {% block head_extra %}{% endblock head_extra %}

    {% if current_url %}
    <link rel="canonical" href="{{ current_url | safe }}" />
    {% endif %}
    <link rel="alternate" type="application/rss+xml" title="RSS" href="{{ config.extra.feed_url | safe }}">

    <!-- OpenGraph -->
    {% if current_url %}
    <meta property="og:url" content="{{ current_url | safe }}" />
    {% endif %}
    <meta property="og:site_name" content="{{ config.title }}" />
    <meta property="og:title" content="{% block og_title %}{{ config.title }}{% endblock og_title %}" />
    <meta property="og:description" content="{% block og_description %}{{ config.description }}{% endblock og_description %}" />
    <meta property="og:image" content="{% block og_image %}{{ config.extra.feature_image | safe }}{% endblock og_image %}" />
    <meta property="og:type" content="{% block og_type %}article{% endblock og_type %}" />

    <link rel="stylesheet" type="text/css" href="/css/styles.css">

    <title>{% block title %}{{ config.title }}{% endblock title %}</title>
  </head>

  <body>
    <div id="top"></div>

    <header id="site-header">
      {% block header %}
        {% if page.path %}
          {% set headerActivePage = page.path %}
        {% else %}
          {% set headerActivePage = "/" %}
        {% endif %}
        {{ header::site_header(activePage=headerActivePage) }}
      {% endblock header %}
    </header>

    <main>
      {% block main %}
        <article>
          {{ page.content | safe }}
        </article>
      {% endblock main %}
    </main>

    <footer id="site-footer">
      {% block footer %}
      {% endblock footer %}

      <p id="copyright">
        Copyright &copy; 2025-2026 Vidhu Kant Sharma
        <br>
        The text and image content on this website is licensed under
        <a href="https://creativecommons.org/licenses/by-nc-nd/4.0/">CC BY-NC-ND 4.0</a>
        unless stated otherwise.
      </p>

      <p id="top-link"><a href="#top">back to top</a></p>
    </footer>
  </body>
</html>