-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbase.html
More file actions
208 lines (207 loc) · 9.09 KB
/
base.html
File metadata and controls
208 lines (207 loc) · 9.09 KB
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
{% load static i18n socialaccount %}
<!DOCTYPE html>
<html lang="en" data-bs-theme="light">
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<title>
{% block title %}
{% if request.resolver_match.url_name == 'index' %}
Democrasite
{% else %}
{% block sub_title %}
{% endblock sub_title %}
- Democrasite
{% endif %}
{% endblock title %}
</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="created" content="{% now 'jS M Y h:i' %}" />
<meta name="description"
content="A website which automatically incorporates changes from users based on popular approval" />
<link rel="icon" href="{% static 'images/favicons/favicon.ico' %}" />
{% block css %}
<!-- Latest compiled and minified Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-LN+7fdVzj6u52u30Kp6M/trliBMCMKTyK833zpbD+pXdCLuTusPj697FH4R/5mcr"
crossorigin="anonymous" />
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.1/font/bootstrap-icons.min.css" />
<!-- Third-party CSS libraries go here -->
<!-- This file stores project-specific CSS -->
<link href="{% static 'css/project.css' %}" rel="stylesheet" />
{% block extra_css %}
{% endblock extra_css %}
{% endblock css %}
<!-- javascript ================================================== -->
{# Placed at the top of the document so pages load faster with defer #}
{% block javascript %}
<!-- Bootstrap JS-->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ndDqU0Gzau9qJ1lfW4pNLlhNTkCfHzAVBReH9diLvGRem5+R9g2FzA8ZGN954O5Q"
crossorigin="anonymous"></script>
<!-- Third-party javascript libraries go here -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<!-- place project specific Javascript in this file -->
<script defer src="{% static 'js/project.js' %}"></script>
<script defer src="{% static 'js/theme-toggler.js' %}"></script>
{% endblock javascript %}
{% block extra_head %}
{% endblock extra_head %}
</head>
<body>
<div class="mb-1">
<nav class="navbar navbar-expand-md bg-body-tertiary shadow-sm">
<div class="container-fluid">
{% block navbar %}
<button class="navbar-toggler navbar-toggler-right"
type="button"
data-bs-toggle="collapse"
data-bs-target="#navbar-supported-content"
aria-controls="navbar-supported-content"
aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="{% url 'webiscite:index' %}">Democrasite</a>
{% get_providers as socialaccount_providers %}
<div class="collapse navbar-collapse" id="navbar-supported-content">
<ul class="navbar-nav me-auto">
{% block nav_app_pages %}
{% endblock nav_app_pages %}
{% if request.user.is_authenticated %}
{% block nav_user_pages %}
{% endblock nav_user_pages %}
{% endif %}
{% block nav_authentication %}
{% if request.user.is_authenticated %}
{# For security, we use POST to log the user out #}
<form class="form-inline"
method="post"
action="{% url 'account_logout' %}?next={{ request.path }}">
{% csrf_token %}
<button class="btn btn-link nav-link" type="submit">{% trans 'Log out' %}</button>
</form>
{% else %}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle"
href="#"
id="login-dropdown"
role="button"
data-bs-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false">{% trans 'Log in' %}</a>
<div class="dropdown-menu dropdown-menu-right py-0"
aria-labelledby="login-dropdown">
{% for provider in socialaccount_providers %}
{# For security, we use POST to log the user in #}
<form action="{% provider_login_url provider.id next=request.path %}"
method="post">
{% csrf_token %}
<button type="submit"
class="dropdown-item px-3 socialaccount_provider {{ provider.id }}">
{{ provider.name }}
</button>
</form>
{% endfor %}
</div>
</li>
{% endif %}
{% endblock nav_authentication %}
</ul>
<hr class="d-block d-md-none" />
<ul class="navbar-nav">
<li class="nav-item">
<a href="{% url 'social:note-list' %}"
class="nav-link
{% if request.resolver_match.app_name == 'activitypub' %}active{% endif %}">{% trans 'ActivityPub' %}</a>
</li>
{% if debug %}
<li class="nav-item">
<a href="{% url 'admin:index' %}" class="nav-link">{% trans 'Admin' %}</a>
</li>
<li class="nav-item">
<a href="{% url 'api-root' %}" class="nav-link">{% trans 'API' %}</a>
</li>
{% endif %}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle"
href="#"
id="themeDropdown"
role="button"
data-bs-toggle="dropdown"
aria-expanded="false">
<i class="bi bi-sun-fill"></i>
</a>
<ul class="dropdown-menu dropdown-menu-end"
aria-labelledby="themeDropdown">
<li>
<button class="dropdown-item" type="button" data-bs-theme-value="light">
<i class="bi bi-sun-fill me-2"></i>Light
</button>
</li>
<li>
<button class="dropdown-item" type="button" data-bs-theme-value="dark">
<i class="bi bi-moon-stars-fill me-2"></i>Dark
</button>
</li>
<li>
<button class="dropdown-item" type="button" data-bs-theme-value="auto">
<i class="bi bi-circle-half me-2"></i>Auto
</button>
</li>
</ul>
</li>
</ul>
</div>
{% endblock navbar %}
</div>
</nav>
</div>
<div class="container my-3">
{% block extra_header %}
{% block messages %}
{% if messages %}
{% for message in messages %}
<div class="alert
{% if message.tags %}alert-{{ message.tags }}{% endif %}">
{{ message }}
<button type="button"
class="btn-close float-end"
data-bs-dismiss="alert"
aria-label="Close"></button>
</div>
{% endfor %}
{% endif %}
{% endblock messages %}
{% endblock extra_header %}
{% block content %}
<p>
{% blocktrans %} This page is blank, but it probably shouldn't be. Please create an issue on <a href="https://github.com/{{ github_repo }}" target="_blank">Github</a>.{% endblocktrans %}
</p>
{% endblock content %}
</div>
<!-- /container -->
{% block modal %}
{% endblock modal %}
<footer class="footer fixed-bottom">
{% block footer %}
<div class="container">
<div class="text-center">
{% if request.resolver_match.url_name == 'index' %}
<a href="{% url 'about' %}">{% trans 'About' %}</a>
|
<a href="https://github.com/{{ github_repo }}" target="_blank">Github</a>
{% else %}
<a href="{% url 'webiscite:index' %}">{% trans 'Home' %}</a>
{% endif %}
</div>
</div>
{% endblock footer %}
</footer>
{% block inline_javascript %}
{# Script tags with only code, no src (defer by default) #}
{% endblock inline_javascript %}
</body>
</html>