You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

164 lines
6.2 KiB

{# Copyright (c) 2018 Tildes contributors <code@tildes.net> #}
{# SPDX-License-Identifier: AGPL-3.0-or-later #}
{% from 'macros/user.jinja2' import logged_in_user_info with context %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="intercoolerjs:use-data-prefix" content="true">
<meta name="csrftoken" content="{{ get_csrf_token() }}">
<meta property="og:image" content="{{ request.static_url("/images/tildes-logo-144x144.png") }}">
<meta property="og:site_name" content="Tildes">
<meta property="og:type" content="website">
{% block meta_og_tags %}
<meta property="og:title" content="{{ self.title() }}">
<meta property="og:description" content="Tildes: a non-profit community site">
{% endblock %}
{# Hardcoding each option isn't great, but I don't know a better method #}
{% if request.current_theme == "solarized-dark" %}
<meta name="theme-color" content="#073642">
{% elif request.current_theme == "dracula" %}
<meta name="theme-color" content="#282a36">
{% elif request.current_theme == "atom-one-dark" %}
<meta name="theme-color" content="#282c34">
{% elif request.current_theme == "black" %}
<meta name="theme-color" content="#222">
{% elif request.current_theme == "zenburn" %}
<meta name="theme-color" content="#3f3f3f">
{% elif request.current_theme == "gruvbox-dark" %}
<meta name="theme-color" content="#282828">
{% elif request.current_theme == "love-dark" %}
<meta name="theme-color" content="#1f1731">
{% elif request.current_theme == "love-light" %}
<meta name="theme-color" content="#f2efff">
{% elif request.current_theme == "nord-dark" %}
<meta name="theme-color" content="#1f1731">
{% elif request.current_theme == "nord-light" %}
<meta name="theme-color" content="#f2efff">
{% endif %}
{% assets "css" %}
<link rel="stylesheet" href="{{ ASSET_URL }}">
{% endassets %}
{% assets "site-icons-css" %}
<link rel="stylesheet" href="{{ ASSET_URL }}">
{% endassets %}
{# Favicons and other data for "pinning" the site on various platforms #}
<link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#002b36">
<meta name="apple-mobile-web-app-title" content="Tildes">
<meta name="application-name" content="Tildes">
<meta name="msapplication-TileColor" content="#002b36">
{# RSS/Atom feeds #}
{% block link_alternate_feeds %}{% endblock %}
<title>{% block title_full %}{% block title %}{% endblock %} - Tildes{% endblock %}</title>
{% block templates %}{% endblock %}
</head>
{% block body_tag %}
<body class="theme-{{ request.current_theme }}">
{% endblock %}
<header id="site-header" data-js-hide-sidebar-if-open>
<a class="site-header-logo" href="/">Tildes</a>
<button
class="btn btn-sm btn-link site-header-sidebar-button
{% if request.user and request.user.num_unread_total > 0 %}
badge
{% endif %}
"
data-js-sidebar-toggle
{% if request.user and request.user.num_unread_total > 0 %}
data-badge="{{ request.user.num_unread_total }}"
{% endif %}
>Sidebar</button>
<div class="site-header-context">{% block header_context_link %}{% endblock %}</div>
{{ logged_in_user_info() }}
</header>
<main class="{% block main_classes %}{% endblock %}" data-js-hide-sidebar-if-open>
{% block pre_main_heading %}{% endblock %}
{# Only output the <h1> tag if the main_heading block has some content #}
{% set main_heading %}{% block main_heading %}{% endblock %}{% endset %}
{% if main_heading %}
<h1 class="heading-main">{{ main_heading }}</h1>
{% endif %}
{% block content %}{% endblock %}
</main>
<aside id="sidebar">
<div class="sidebar-controls">
{{ logged_in_user_info() }}
<button class="btn btn-sm btn-link" data-js-sidebar-toggle>Close sidebar</button>
</div>
{% block sidebar %}
{% endblock %}
</aside>
<footer id="site-footer" data-js-hide-sidebar-if-open>
<div class="site-footer-theme-selection">
<label for="theme">Theme:</label>
<select class="form-select" name="theme" id="theme" data-js-theme-selector>
{% for (theme, description) in (
("white", "White"),
("solarized-light", "Solarized Light"),
("solarized-dark", "Solarized Dark"),
("dracula", "Dracula"),
("atom-one-dark", "Atom One Dark"),
("black", "Black"),
("zenburn", "Zenburn"),
("gruvbox-light", "Gruvbox Light"),
("gruvbox-dark", "Gruvbox Dark"),
("love-dark", "Love Dark"),
("love-light", "Love Light"),
("nord-dark", "Nord Dark"),
("nord-light", "Nord Light")) %}
<option value="{{ theme }}"
{{ 'selected' if theme == request.current_theme else '' }}
>
{{ description }}
</option>
{% endfor %}
</select>
</div>
<ul class="site-footer-links">
<li class="site-footer-link"><a href="https://docs.tildes.net">Docs</a></li>
<li class="site-footer-link"><a href="https://blog.tildes.net">Blog</a></li>
<li class="site-footer-link"><a href="https://docs.tildes.net/contact">Contact</a></li>
<li class="site-footer-link"><a href="https://gitlab.com/tildes/tildes">Source code</a></li>
<li class="site-footer-link"><a href="https://gitlab.com/tildes/tildes/issues?label_name%5B%5D=Feature+Request&amp;label_name%5B%5D=Stage%3A%3AAccepted&amp;scope=all&amp;sort=priority&amp;state=opened">Planned features</a> / <a href="https://gitlab.com/tildes/tildes/issues">All issues</a></li>
<li class="site-footer-link"><a href="https://docs.tildes.net/policies/privacy-policy">Privacy policy</a></li>
<li class="site-footer-link"><a href="https://docs.tildes.net/policies/terms-of-use">Terms of use</a></li>
</ul>
</footer>
{% assets "javascript-third-party" -%}
<script type="text/javascript" src="{{ ASSET_URL }}"></script>
{% endassets %}
{% assets "javascript" -%}
<script type="text/javascript" src="{{ ASSET_URL }}"></script>
{% endassets %}
</body>
</html>