husk/templates/template.html

124 lines
6.1 KiB
HTML

<!doctype html>
<html lang="en">
<head>
{% block head %}
<meta charset="UTF-8">
<script src="https://cdn.jsdelivr.net/npm/fuse.js/dist/fuse.js"></script>
<script
src="https://code.jquery.com/jquery-3.7.0.min.js"
integrity="sha256-2Pmvv0kuTBOenSvLm6bvfBSSHrUJ+3A7x6P5Ebd07/g="
crossorigin="anonymous"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/auto-complete.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/lunr.min.js')}}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/search.js')}}"></script>
<link rel="stylesheet" href="{{ url_for('static', filename=stylesheet) }}">
<link rel="stylesheet" href="{{ url_for('static', filename=stylesheet_auto_complete) }}">
<title>{% block title %}{{ project_title }}{% endblock %}</title>
<meta name="viewport" content="width-device-width, initial-scale=1">
{% endblock %}
<style type="text/css">
body { background: {{ colors.body_background }}; color: {{ colors.body }}; }
pre { background: {{ colors.pre_background }}; color: {{ colors.pre }}; border: 1px solid {{ colors.pre_border }}; }
code { background: {{ colors.code_background }}; color: {{ colors.code }}; }
a:hover { color: {{ colors.a }}; }
details > summary { background: {{ colors.details_background }}; }
details > summary:hover { background: {{ colors.details_hover_background }}; color: {{ colors.details_hover }}; }
::selection { background: {{ colors.selection_background }}; }
::-moz-selection { background: {{ colors.moz_selection_background }}; }
.header-wrapper { background: {{ colors.header_background }}; }
.HolyGrail-nav, .HolyGrail-ads { background: {{ colors.nav_background }}; }
.HolyGrail-content { border-top: 1px solid {{ colors.content_border_top }}; border-bottom: 1px solid {{ colors.content_border_bottom }}; }
.search-container-color input { background: {{ colors.search_input_background }}; color: {{ colors.search_input }}; border: 1px solid {{ colors.search_input_border }}; }
.search-container-color input:focus { border: 2px solid {{ colors.search_focus_border }}; }
</style>
<style>
.autocomplete-suggestions{ background: {{ colors.autocomplete_suggestions_background }}; border: 1px solid {{ colors.autocomplete_suggestions_border }}; }
.autocomplete-suggestion { color: {{ colors.autocomplete_suggestion }}; }
.autocomplete-suggestion b { color: {{ colors.autocomplete_suggestion_b }}; }
.autocomplete-suggestion.selected { background: {{ colors.autocomplete_suggestion_selected_background }}; color: {{ colors.autocomplete_suggestion_selected }}; }
.autocomplete-suggestion:hover { background: {{ colors.autocomplete_suggestion_hover_background }}; color: {{ colors.autocomplete_suggestion_hover }}; }
</style>
<style type="text/css">
.directory { height: 1em; content: url("{{ url_for('static', filename='svg/1f4c1.svg') }}"); }
</style>
<!-- script src='https://kit.fontawesome.com/a076d05399.js' crossorigin='anonymous'></script -->
</head>
<body class="HolyGrail">
<header>
<div class= "header-wrapper">
<div class="menu">
<div class="banner">
<a href="{{ url_for('content') }}" style="text-decoration:none">{{ project_name }}</a>
</div>
<div class="search-container">
<div class="search-container-color">
<!-- <label for="search-by"><i class="fas fa-search"></i></label> --!>
<input data-search-input="" id="search-by" type="search" placeholder="Search..." autocomplete="off">
<!--button type="submit"><i class="search"></i>&#128269;</button>-->
<!-- <span data-search-clear=""><i class="fas fa-times"></i></span> --!>
</div>
</div>
</div>
</div>
</div>
</header>
<div class="HolyGrail-body">
<main class="HolyGrail-content">{% block content %}{% endblock %}</main>
<nav class="HolyGrail-nav">
<ul>
{%- for item in tree.children recursive %}
{%- set name = item.name.split('/')[-1] -%}
{%- if item.type != "directory" -%}
<li><a href="{{ item.name }}.html">{{ name }}</a></li>
{%- else -%}
{%- if item.children|length -%}
<details id={{ name }} ontoggle="linkClick(this); return false;" ><summary><!--i class='fas fa-folder'></i--!>{{ name[0]|upper }}{{ name[1:] }}</summary>
{%- endif -%}
{%- endif -%}
{%- if item.children and item.children|length -%}
<ul>{{ loop(item.children) }}</ul></details>
{%- endif %}
{%- endfor %}
</ul>
</nav>
<aside class="HolyGrail-ads">{{ toc | safe }}</aside>
</div>
<footer>
{% block footer %}
<p></p><center>&copy; Stefan Friese</center><p></p>
{% endblock %}
</footer>
</body>
<script>
function linkClick(obj) {
if (obj.open) {
if (sessionStorage.getItem(obj.id) && !(sessionStorage.getItem(obj.id) === "open")) {
sessionStorage.removeItem(obj.id);
}
sessionStorage.setItem(obj.id,"open");
} else {
sessionStorage.removeItem(obj.id);
}
}
for (let i = 0; i < sessionStorage.length; i++) {
const key = sessionStorage.key(i);
document.getElementById(key).open = "open";
}
</script>
<script async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
config: ["MMLorHTML.js"],
jax: ["input/TeX", "output/HTML-CSS", "output/NativeMML"],
extensions: ["MathMenu.js", "MathZoom.js"]
});
</script>
</body>
</html>