forked from NixOS/nix-security-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbase.html
More file actions
110 lines (99 loc) · 3.46 KB
/
base.html
File metadata and controls
110 lines (99 loc) · 3.46 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
{% load static socialaccount %}
{% load viewutils %}
<!DOCTYPE html>
<html lang="en">
<head>
<title>{% block title %}Nixpkgs Security Tracker{% endblock %}</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" type="text/css" href="/static/style.css" />
<link rel="stylesheet" type="text/css" href="/static/notifications.css" />
<link rel="stylesheet" type="text/css" href="/static/subscriptions.css" />
{% block extra_head %}{% endblock extra_head %}
</head>
<body>
<nav class="header">
<h1>
<a href="{% url 'webview:home' %}">
Nixpkgs Security Tracker
</a>
</h1>
<ul>
{% if user.is_staff %}
<!-- TODO settings? -->
{% endif %}
{% block auth %}
{% if user.is_authenticated %}
{% get_social_accounts user as accounts %}
<li class="user-corner">
{% if accounts and "github" in accounts %}
<a href="https://github.com/{{ accounts.github.0.extra_data.login }}"
target="_blank">
{{ user.username }}
</a>
{% else %}
<span>{{user.username}}</span>
{% endif %}
<a
href="{% url 'webview:subscriptions:center' %}"
class="subscriptions-navbar-icon"
>
</a>
{% notifications_badge user.profile.unread_notifications_count %}
<a href="{% url 'account_logout' %}">
Logout
</a>
</li>
{% else %}
<li>
<a href="{% provider_login_url 'github' next=request.get_full_path %}">
Login with GitHub
</a>
</li>
{% endif %}
{% endblock %}
</ul>
</nav>
{% if debug %}
<div id="testing-disclaimer">
<em>⚠️ You are using a <b>publicly accessible</b> testing environment.
Don’t enter secrets into this system, especially not by reusing passwords for your user account.</em>
</div>
{% elif show_demo_disclaimer %}
<div id="testing-disclaimer">
<em>⚠️ You are using a production deployment that is <b>still only suitable for demo purposes.</b>
Any work done in this might be wiped later without notice.</em>
</div>
{% endif %}
{% block layout %}
<article>
{% block content %}{% endblock content %}
</article>
{% endblock layout %}
{% if is_paginated %}
{% include "components/pagination.html" %}
{% endif %}
<footer>
<p>
<a href="https://github.com/NixOS/nix-security-tracker">Nixpkgs Security Tracker</a> is part of a project funded by the
<a href="https://sovereigntechfund.de/en/">Sovereign Tech Fund</a>.
</p>
<p>
Running revision
{% if production %}
<a href="https://github.com/NixOS/nix-security-tracker/commit/{{ git_revision }}">
{{ git_revision|slice:":20" }}
</a>
{% else %}
{{ git_revision }} (development)
{% endif %}
</p>
</footer>
<script src="/static/htmx.min.js"></script>
<script>
// We didn't find a better way to remove buttons that are only needed for non-JS workflows
document.querySelectorAll(".remove-when-js-is-enabled").forEach(e => e.remove());
</script>
</body>
</html>