DEVELOPMENT ENVIRONMENT

~liljamo/liljamo-dev-zola

ref: 566b8e2bc47adddda93aaf4cee509448e7204cfb liljamo-dev-zola/templates/layouts/base.html -rw-r--r-- 2.0 KiB
566b8e2bJonni Liljamo feat: set page title a month ago
                                                                                
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
{% if page %}
    {% set this = page %}
{% elif section %}
    {% set this = section %}
{% endif %}

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">

        {% if this.title %}
        <title>{{ this.title }}</title>
        {% else %}
        <title>{{ config.title }}</title>
        {% endif %}


        <link rel="stylesheet" href="/css/style.css"/>

        <script defer src="https://umami.liljamo.dev/script.js" data-website-id="d47d72b2-d20b-42d0-bfa9-e3e6133ccbb5"></script>

        {% block extra_head %} {% endblock %}
    </head>
    <body>
        <main class="flex flex-col items-center h-full min-h-screen bg-background-orig">
            <div class="flex justify-center sticky top-0 w-full h-min z-50">
                <div class="absolute max-w-5xl w-full h-fit p-8 pointer-events-none">
                    <div class="w-full h-full pointer-events-auto
                        p-3 rounded-xl
                        border border-text-100  drop-shadow-md
                        backdrop-blur-sm"
                    >
                        <div class="flex gap-1">
                            <a class="hover:underline" href="/">{{ config.title }}</a>
                            {% if current_url %}
                            {% set_global path = "" %}
                            {% for c in this.components %}
                            {% set_global path = path ~ "/" ~ c %}
                            <span>/</span>
                            <a class="hover:underline" href="{{ path }}/">{{ c }}</a>
                            {% endfor %}
                            {% else %}
                            <span>/</span>
                            <p>404</p>
                            {% endif %}
                        </div>
                    </div>
                </div>
            </div>
            <div class="max-w-5xl p-2 pt-28">
                {% block content %} {% endblock %}
            </div>
        </main>
    </body>
</html>