redsunlib/templates/base.html

97 lines
4.7 KiB
HTML
Raw Permalink Normal View History

2023-01-12 21:46:56 +13:00
{% import "utils.html" as utils %}
2020-11-23 13:29:05 +13:00
<!DOCTYPE html>
<html lang="en" class="{% if prefs.fixed_navbar == "on" %}fixed_navbar{% endif %}">
2020-11-23 13:29:05 +13:00
<head>
{% block head %}
2023-12-27 12:25:52 +13:00
<title>{% block title %}Redlib{% endblock %}</title>
2020-12-22 05:38:24 +13:00
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
2023-12-27 12:25:52 +13:00
<meta name="description" content="View on Redlib, an alternative private front-end to Reddit.">
2020-12-06 17:54:43 +13:00
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% if crate::utils::disable_indexing() %}
<meta name="robots" content="noindex, nofollow">
{% endif %}
<!-- General PWA -->
2021-02-02 13:26:35 +13:00
<meta name="theme-color" content="#1F1F1F">
<!-- iOS Application -->
2023-12-27 12:25:52 +13:00
<meta name="apple-mobile-web-app-title" content="Redlib">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
2021-11-24 19:23:29 +13:00
<!-- Android -->
<meta name="mobile-web-app-capable" content="yes">
<!-- iOS Logo -->
2021-03-18 13:28:05 +13:00
<link href="/touch-icon-iphone.png" rel="apple-touch-icon">
2021-04-06 11:23:14 +12:00
<!-- OpenSearch description file -->
2023-12-27 12:25:52 +13:00
<link rel="search" type="application/opensearchdescription+xml" title="Search Redlib" href="/opensearch.xml">
<!-- PWA Manifest -->
2021-03-18 13:28:05 +13:00
<link rel="manifest" type="application/json" href="/manifest.json">
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
<link rel="stylesheet" type="text/css" href="/style.css?v={{ env!("CARGO_PKG_VERSION") }}">
<!-- Video quality -->
<div id="video_quality" data-value="{{ prefs.video_quality }}"></div>
2020-11-23 13:29:05 +13:00
{% endblock %}
2021-01-01 12:54:13 +13:00
</head>
2021-01-11 15:15:34 +13:00
<body class="
{% if prefs.layout != "" %}{{ prefs.layout }}{% endif %}
2024-07-07 18:35:53 +12:00
{% if prefs.wide == "on" || prefs.layout == "old" || prefs.layout == "waterfall" %} wide{% endif %}
{% if prefs.theme != "system" %} {{ prefs.theme }}{% endif %}
{% if prefs.fixed_navbar == "on" %} fixed_navbar{% endif %}">
2021-01-04 16:44:44 +13:00
<!-- NAVIGATION BAR -->
<nav class="
{% if prefs.fixed_navbar == "on" %} fixed_navbar{% endif %}">
2021-01-31 11:52:18 +13:00
<div id="logo">
<a id="redlib" href="/"><span id="lib">red</span><span id="reddit">sun</span><span id="lib">lib.</span></a>
2021-01-31 11:52:18 +13:00
{% block subscriptions %}{% endblock %}
</div>
2021-01-01 12:54:13 +13:00
{% block search %}{% endblock %}
2021-01-31 11:52:18 +13:00
<div id="links">
2023-02-10 18:25:42 +13:00
<a id="reddit_link" {% if prefs.disable_visit_reddit_confirmation != "on" %}href="#popup"{% else %}href="https://www.reddit.com{{ url }}" rel="nofollow"{% endif %}>
<span>reddit</span>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2023-02-10 18:40:51 +13:00
<path d="M22 2L12 22"/>
<path d="M2 6.70587C3.33333 8.07884 3.33333 11.5971 3.33333 11.5971M3.33333 19.647V11.5971M3.33333 11.5971C3.33333 11.5971 5.125 7.47817 8 7.47817C10.875 7.47817 12 8.85114 12 8.85114"/>
</svg>
</a>
2023-01-12 21:46:56 +13:00
{% if prefs.disable_visit_reddit_confirmation != "on" %}
{% call utils::visit_reddit_confirmation(url) %}
{% endif %}
2021-03-18 13:28:05 +13:00
<a id="settings_link" href="/settings">
2021-02-01 10:22:11 +13:00
<span>settings</span>
2021-02-02 08:32:57 +13:00
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<title>settings</title>
<circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"/>
</svg>
2021-02-01 10:22:11 +13:00
</a>
2021-01-31 11:52:18 +13:00
</div>
2020-12-21 14:45:26 +13:00
</nav>
2024-06-17 22:29:52 +12:00
{% if prefs.mascot != "none" && prefs.mascot != "" %}
<!-- MASCOT -->
<div class="mascot">
<img src="/mascot/{{ prefs.mascot }}.png">
</div>
{% endif %}
2021-01-30 21:33:38 +13:00
2021-01-04 16:44:44 +13:00
<!-- MAIN CONTENT -->
2020-12-09 06:58:36 +13:00
{% block body %}
2020-11-23 13:29:05 +13:00
<main>
{% block content %}
{% endblock %}
</main>
{% endblock %}
<!-- FOOTER -->
{% block footer %}
<footer>
<p id="version">v{{ env!("CARGO_PKG_VERSION") }}</p>
<div class="footer-button">
<a href="/info" title="View instance information">ⓘ View instance info</a>
</div>
<div class="footer-button">
2024-06-02 22:32:27 +12:00
<a href="https://git.stardust.wtf/iridium/redsunlib" title="View code on git.stardust.wtf">&lt;&gt; Code</a>
</div>
</footer>
{% endblock %}
2020-11-23 13:29:05 +13:00
</body>
</html>