samjeston / openhub Public
Sam Jeston Working vertical 9aa3c45 · History
66 lines· 3.4 KB ·HTML
Raw
1<!doctype html>
2<html lang="en">
3<head>
4 <meta charset="utf-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1">
6 <title>{% block title %}Openhub{% endblock %}</title>
7 <link rel="icon" href="/favicon.svg" type="image/svg+xml">
8 <link rel="stylesheet" href="/static/style.css?v={{ crate::web::assets::version() }}">
9 <script src="/static/app.js?v={{ crate::web::assets::version() }}" defer></script>
10</head>
11<body>
12 <header class="site-header">
13 <div class="site-header-inner">
14 <a class="brand" href="/">
15 <svg class="brand-mark" viewBox="0 0 32 32" aria-hidden="true"><rect width="32" height="32" rx="8" fill="currentColor" opacity=".14"/><circle cx="11" cy="9" r="3" fill="none" stroke="currentColor" stroke-width="2.2"/><circle cx="11" cy="23" r="3" fill="none" stroke="currentColor" stroke-width="2.2"/><circle cx="22" cy="12" r="3" fill="none" stroke="currentColor" stroke-width="2.2"/><path d="M11 12v8M22 15c0 4-4 5-8.5 6.5" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"/></svg>
16 <span>Openhub</span>
17 </a>
18 <nav class="site-nav">
19 <a href="/explore">Explore</a>
20 </nav>
21 <div class="site-header-right">
22 {% if let Some(user) = ctx.user %}
23 <a class="header-button" href="/new" title="New repository">{{ crate::web::fmt::icon("plus")|safe }}<span class="hide-sm">New</span></a>
24 <details class="dropdown dropdown-right">
25 <summary class="header-avatar" aria-label="Account menu">{{ crate::web::fmt::avatar(user.username, 26)|safe }}{{ crate::web::fmt::icon("chevron-down")|safe }}</summary>
26 <div class="dropdown-menu">
27 <div class="dropdown-header">Signed in as <strong>{{ user.username }}</strong></div>
28 <a class="dropdown-item" href="/{{ user.username }}">{{ crate::web::fmt::icon("user")|safe }} Your profile</a>
29 <a class="dropdown-item" href="/settings/keys">{{ crate::web::fmt::icon("key-round")|safe }} SSH keys</a>
30 <a class="dropdown-item" href="/settings/profile">{{ crate::web::fmt::icon("settings")|safe }} Settings</a>
31 <div class="dropdown-divider"></div>
32 <form method="post" action="/logout">
33 <button type="submit" class="dropdown-item">{{ crate::web::fmt::icon("log-out")|safe }} Sign out</button>
34 </form>
35 </div>
36 </details>
37 {% else %}
38 <a class="header-link" href="/login?next={{ crate::web::fmt::urlencode(ctx.path) }}">Sign in</a>
39 <a class="header-button" href="/register">Sign up</a>
40 {% endif %}
41 </div>
42 </div>
43 </header>
44 {% block subheader %}{% endblock %}
45 <main class="page {% block page_class %}{% endblock %}">
46 <div class="container">
47 {% if let Some(flash) = ctx.flash %}
48 <div class="flash flash-{{ flash.kind }}" role="status">
49 {% if flash.kind == "error" %}{{ crate::web::fmt::icon("circle-alert")|safe }}{% else %}{{ crate::web::fmt::icon("circle-check")|safe }}{% endif %}
50 <span>{{ flash.message }}</span>
51 </div>
52 {% endif %}
53 {% block content %}{% endblock %}
54 </div>
55 </main>
56 <footer class="site-footer">
57 <div class="container">
58 <span>Openhub</span>
59 <span class="dot">·</span>
60 <span>Self-hosted git</span>
61 <span class="dot">·</span>
62 <a href="/explore">Explore repositories</a>
63 </div>
64 </footer>
65</body>
66</html>