~linuxgoose/bocpress

ref: 74b8eaa5e0e62bc5f51c755585a7239e21126e49 bocpress/main/templates/main/layout.html -rw-r--r-- 3.4 KiB
74b8eaa5Jordan Robinson fix button text colour on dark mode 2 months 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
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
{% load static %}

<!DOCTYPE html>
<html lang="{% block lang %}en{% endblock %}">
    <head>
        <meta charset="utf-8">
        <title>{% block title %}{% endblock %}</title>

        {% if not request.subdomain %}
        <meta name="description" content="Blogging platform for minimalists.">
        <meta name="keywords" content="blog, blogging, platform, fast, simple, minimal">
        {% endif %}

        {% block head_viewport %}
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        {% endblock head_viewport %}

        <link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAEwSURBVHgB7ZVBTsMwEEX/2GolQEjkBrkBPQI5ATlKd12SLrtr78EinACOkBuQG7QSEiClzuBpWYFUTxxY1W8ZfWe+7fEfIJFInDuEgbwtyjsQlUTm3q/Oj1+58b9qOueW2apuMQC1ge28vJlcmQcwzU8KmdfdR7/M1vUOf2XgUPzSPHv5DCq46d77QmPCQMFh5+riAs0mF7JGoQwJtosyn1j7igjYUXG9enw5pQmegDW2QizkypAkaMAYvkUkZPxLGWvAd/2Au/9FHhKomvA/0RhoEQtLQI00wOifEAvReANwtkYkEs0hTdCAvGMGNhgI99ho5oKqCfdTVx0Hjrp8s/+UNWFUBrKq3nXTvtCchOxcOweEweNYolnS0ZAE1HdGMFpm36xs61D0JhKJxE++AMI7Z3YRUW4wAAAAAElFTkSuQmCC">

        {% if request.user.noindex_on %}
        <meta name="robots" content="noindex, nofollow">
        {% endif %}

        {% block head_extra %}
        {% endblock head_extra %}

        <style>
            {% include 'assets/style.css' %}
        </style>

        {% block head_rsl_license %}
        {% endblock head_rsl_license %}
    </head>

    <body>
        {% if messages %}
        <aside>
            {% for message in messages %}
            <div {% if message.tags %}class="alert-{{ message.tags }}"{% endif %}>{{ message|safe }}</div>
            {% endfor %}
        </aside>
        {% endif %}

        {% if request.user.is_authenticated %}

        {% if not request.subdomain or request.subdomain == request.user.username %}
        <nav>
            {% if request.subdomain %}
            <a href="{% url 'index' %}">View blog</a>
            {% else %}
            <a href="//{{ request.user.username }}.{{ request.get_host }}">View blog</a>
            {% endif %}
            | <a href="{% url 'dashboard' %}">Workshop</a>
            | <a href="{% url 'post_create' %}">New post</a>
            {% if blog_user.custom_domain %}
            | <a href="//{{ blog_user.custom_domain }}{{ request.path }}">View at {{ blog_user.custom_domain }}</a>
            {% endif %}
        </nav>
        {% endif %}

        {% if request.user.redirect_domain %}
        <aside class="type-delete">
            <div>
                Your BōcPress blog (<code>{{ request.user.username }}.bocpress.co.uk</code>) is
                currently retired and inaccessible. All traffic is redirected to
                <code>{{ request.user.redirect_domain }}</code> as per your
                <a href="{% url 'user_update' %}">settings</a>.
            </div>
        </aside>
        {% endif %}

        {% else %}
        {% if not request.subdomain %}
        <nav>
            <a href="{{ request.host }}{% url 'index' %}">Home</a>
            | <a href="{{ request.host }}{% url 'user_create' %}">Sign up</a>
            | <a href="{{ request.host }}{% url 'login' %}">Log in</a>
        </nav>
        {% endif %}
        {% endif %}

        {% block content %}
        {% endblock content %}

        {% block scripts %}
        {% endblock scripts %}
    </body>
</html>