Added gobal Search, template partials, deleted shortcodes not in use
This commit is contained in:
parent
9eeadd1e66
commit
67250dca95
12 changed files with 344 additions and 281 deletions
|
@ -44,11 +44,11 @@ include_path = false
|
|||
include_content = true
|
||||
|
||||
[extra]
|
||||
katex.enabled = true
|
||||
katex.auto_render = true
|
||||
chart.enabled = true
|
||||
katex.enabled = false
|
||||
katex.auto_render = false
|
||||
chart.enabled = false
|
||||
mermaid.enabled = true
|
||||
galleria.enabled = true
|
||||
galleria.enabled = false
|
||||
navbar_items = [
|
||||
{ code = "en", nav_items = [
|
||||
{ url = "$BASE_URL/", name = "Overview" },
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="26.341103mm"
|
||||
height="28.817148mm"
|
||||
viewBox="0 0 26.341103 28.817148"
|
||||
width="30mm"
|
||||
height="30mm"
|
||||
viewBox="0 0 30 30"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
|
@ -20,6 +20,9 @@
|
|||
<g
|
||||
id="g6567"
|
||||
transform="matrix(0.92473907,0,0,0.92473907,11.032718,11.165159)">
|
||||
<g
|
||||
id="g7383"
|
||||
transform="matrix(1.0300991,0,0,1.0300991,3.770254,-1.2763086)">
|
||||
<path
|
||||
id="path6"
|
||||
d="m 136.06214,99.13643 c -0.8681,0.09646 -1.83266,0 -2.70078,-0.289369 L 99.794436,89.780144 c -0.868109,-0.28937 -1.736218,-0.675196 -2.507872,-1.157479 z"
|
||||
|
@ -102,6 +105,7 @@
|
|||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<style
|
||||
type="text/css"
|
||||
id="style2346">
|
||||
|
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
@ -1,5 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
var indexScriptLoaded = false;
|
||||
|
||||
function debounce(func, wait) {
|
||||
var timeout;
|
||||
|
||||
|
@ -110,17 +112,12 @@ function makeTeaser(body, terms) {
|
|||
|
||||
function formatSearchResultItem(item, terms) {
|
||||
return (
|
||||
`<article class='box'>` +
|
||||
`<h1 class='title'>` +
|
||||
`<a class='link' class='link' href='${item.ref}'>${item.doc.title}</a>` +
|
||||
`</h1>` +
|
||||
`<a href='${item.ref}' class='group flex flex-col space-y-2 hover:bg-gray-100 p-2 rounded'>` +
|
||||
`<h1 class='text-garage-orange font-semibold'>` + `${item.doc.title}` + `</h1>` +
|
||||
`<div class='content mt-2'>` +
|
||||
`${makeTeaser(item.doc.body, terms)}` +
|
||||
`<a href='${item.ref}'>` +
|
||||
`Read More <span class="icon is-small"><i class="fas fa-arrow-right fa-xs"></i></span>` +
|
||||
`</a>` +
|
||||
`</div>` +
|
||||
`</article>`
|
||||
`</a>`
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -169,3 +166,81 @@ function search() {
|
|||
}, 150)
|
||||
);
|
||||
}
|
||||
|
||||
function openSearchModal() {
|
||||
if (indexScriptLoaded === false) {
|
||||
var indexScript = document.createElement('script');
|
||||
indexScript.setAttribute('src', './search_index.en.js');
|
||||
document.head.appendChild(indexScript);
|
||||
indexScriptLoaded = true;
|
||||
}
|
||||
document.getElementById('search-modal').classList.remove('hidden');
|
||||
document.getElementById('search').focus();
|
||||
document.getElementById('search').select();
|
||||
}
|
||||
|
||||
function closeSearchModal() {
|
||||
document.getElementById('search-modal').classList.add('hidden');
|
||||
}
|
||||
|
||||
function documentReadyCallback() {
|
||||
|
||||
if (localStorage.getItem("theme") === "dark") {
|
||||
document.body.setAttribute("theme", "dark");
|
||||
document.querySelectorAll("img, picture, video, pre").forEach(img => img.setAttribute("theme", "dark"));
|
||||
document.querySelectorAll(".vimeo, .youtube, .chart").forEach(video => video.setAttribute("theme", "dark"));
|
||||
document.getElementById("dark-mode").setAttribute("title", "Switch to light theme");
|
||||
}
|
||||
|
||||
document.addEventListener('click', function(ev) {
|
||||
if (ev.target.matches('#nav-search-btn') || ev.target.matches('#nav-search-btn-icon')) {
|
||||
openSearchModal();
|
||||
}
|
||||
else if (ev.target.matches('#close-modal-btn')
|
||||
|| ev.target.matches('#close-modal-btn-icon')
|
||||
|| !ev.target.closest('#search-modal')) {
|
||||
closeSearchModal();
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener('keydown', function(event) {
|
||||
if (event.altKey && event.key === 's') {
|
||||
if (document.getElementById('search-modal').classList.contains('hidden')) {
|
||||
openSearchModal();
|
||||
} else {
|
||||
closeSearchModal();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener('keyup', function(ev) {
|
||||
if (ev.key === "Escape") {
|
||||
closeSearchModal();
|
||||
}
|
||||
});
|
||||
|
||||
document.getElementById("search").addEventListener("keyup", () => {
|
||||
search();
|
||||
});
|
||||
|
||||
if (typeof mermaid !== "undefined") {
|
||||
mermaid.initialize({ startOnLoad: true });
|
||||
}
|
||||
|
||||
if (typeof renderMathInElement !== "undefined") {
|
||||
renderMathInElement(document.body, {
|
||||
delimiters: [
|
||||
{ left: '$$', right: '$$', display: true },
|
||||
{ left: '$', right: '$', display: false },
|
||||
{ left: '\\(', right: '\\)', display: false },
|
||||
{ left: '\\[', right: '\\]', display: true }
|
||||
]
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
if (document.readyState === 'loading') { // Loading hasn't finished yet
|
||||
document.addEventListener('DOMContentLoaded', documentReadyCallback);
|
||||
} else { // `DOMContentLoaded` has already fired
|
||||
documentReadyCallback();
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
module.exports = {
|
||||
content: [
|
||||
"./templates/**/*.html"
|
||||
"./templates/**/*.html",
|
||||
"./static/js/site.js",
|
||||
],
|
||||
theme: {
|
||||
extend: {
|
||||
|
|
|
@ -6,201 +6,65 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta content="width=device-width, initial-scale=1" name="viewport" />
|
||||
<meta content="#ffffff" name="theme-color" />
|
||||
<meta content="#da532c" name="msapplication-TileColor" />
|
||||
|
||||
{% if config.extra.favicon.webmanifest %}
|
||||
<link href='{{ config.extra.favicon.webmanifest }}' rel="manifest" />
|
||||
{% endif %}
|
||||
{% if config.extra.favicon.safari_pinned_tab %}
|
||||
<link color="#5bbad5" href='{{ config.extra.favicon.safari_pinned_tab }}' rel="mask-icon" />
|
||||
{% endif %}
|
||||
{% if config.extra.favicon.favicon_16x16 %}
|
||||
<link href='{{ config.extra.favicon.favicon_16x16 }}' rel="icon" sizes="16x16" type="image/png" />
|
||||
{% endif %}
|
||||
{% if config.extra.favicon.favicon_32x32 %}
|
||||
<link href='{{ config.extra.favicon.favicon_32x32 }}' rel="icon" sizes="32x32" type="image/png" />
|
||||
{% endif %}
|
||||
{% if config.extra.favicon.apple_touch_icon %}
|
||||
<link href='{{ config.extra.favicon.apple_touch_icon }}' rel="apple-touch-icon" sizes="180x180" />
|
||||
{% endif %}
|
||||
|
||||
{% if config.extra.galleria.enabled %}
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/galleria@1.6.1/dist/themes/folio/galleria.folio.min.css"
|
||||
integrity="sha384-+rY0QD+LRnTOquDMzGa9lXU6jIwdiQuwCJQ2cdcW0qeP/0UbjQCZlXnRsUMA+9pH" crossorigin="anonymous">
|
||||
{% endif %}
|
||||
|
||||
{% if config.extra.mapbox.enabled %}
|
||||
<link rel="stylesheet" href="https://api.mapbox.com/mapbox-gl-js/v2.6.1/mapbox-gl.css"
|
||||
integrity="sha384-oGm59HWAkwO32h2w8u0B98wKBZJwd6MbWtAJwQKCTffZjOXHXrnyv9Syjovgc+UV" crossorigin="anonymous">
|
||||
{% endif %}
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/jpswalsh/academicons@1.9.1/css/academicons.min.css"
|
||||
integrity="sha384-FIue+PI4SsI9XfHCz8dBLg33b0c1fMJgNU3X//L26FYbGnlSEfWmNT7zgWc2N9b6" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.4/css/all.min.css"
|
||||
integrity="sha384-DyZ88mC6Up2uqS4h/KRgHuoeGwBcD4Ng9SiP4dIRy0EXTlnuz47vAwmeGwVChigm" crossorigin="anonymous">
|
||||
<link href="{{ get_url(path='style.css') }}" rel="stylesheet" />
|
||||
|
||||
{% block user_custom_stylesheet %}
|
||||
{% endblock %}
|
||||
|
||||
<title>
|
||||
{% block title %}
|
||||
{{ config.title }}
|
||||
{% endblock title %}
|
||||
</title>
|
||||
|
||||
{% if config.extra.katex.enabled %}
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.css"
|
||||
integrity="sha384-R4558gYOUz8mP9YWpZJjofhk+zx0AS11p36HnD2ZKj/6JR5z27gSSULCNHIRReVs" crossorigin="anonymous">
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.js"
|
||||
integrity="sha384-z1fJDqw8ZApjGO3/unPWUPsIymfsJmyrDVWC8Tv/a1HeOtGmkwNd/7xUS0Xcnvsx"
|
||||
crossorigin="anonymous"></script>
|
||||
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/contrib/mathtex-script-type.min.js"
|
||||
integrity="sha384-jiBVvJ8NGGj5n7kJaiWwWp9AjC+Yh8rhZY3GtAX8yU28azcLgoRo4oukO87g7zDT"
|
||||
crossorigin="anonymous"></script>
|
||||
{% if config.extra.katex.auto_render %}
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/contrib/auto-render.min.js"
|
||||
integrity="sha384-+XBljXPPiv+OzfbB3cVmLHf4hdUFHlWNZN5spNQ7rmHTXpd7WvJum6fIACpNNfIR"
|
||||
crossorigin="anonymous"></script>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% include "partials/shared/head.html" %}
|
||||
</head>
|
||||
|
||||
<body class="has-background-white">
|
||||
<nav aria-label="section navigation" class="navbar w-full" role="navigation">
|
||||
<div class="w-full flex flex-col space-y-2 md:space-y-0 md:flex-row items-center justify-between py-1 px-8 text-garage-gray bg-garage-orange bg-opacity-20">
|
||||
<div class="navbar-brand">
|
||||
<a class="hover:rounded-full hover:bg-white" href="{{config.base_url}}">
|
||||
<img class="transform duration-150 focus:bg-white hover:bg-white hover:shadow rounded-lg hover:scale-90"
|
||||
src="{{ config.extra.organization.logo }}" width="65px">
|
||||
</a>
|
||||
<a aria-expanded="false" aria-label="menu" data-target="navMenu" role="button">
|
||||
<span aria-hidden="true"></span>
|
||||
<span aria-hidden="true"></span>
|
||||
<span aria-hidden="true"></span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="navbar-menu" id="navMenu">
|
||||
<div class="flex items-center justify-center">
|
||||
{% for item in config.extra.navbar_items %}
|
||||
{% if lang == item.code %}
|
||||
{% for nav in item.nav_items %}
|
||||
<a class="font-semibold focus:bg-white hover:bg-white hover:shadow px-4 py-2 rounded-lg"
|
||||
href="{{ nav.url | replace(from='$BASE_URL', to=config.base_url) }}">
|
||||
{{ nav.name }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<button type="button" class="focus:bg-white hover:bg-white hover:shadow px-4 py-2 rounded-lg" id="nav-search" title="Search">
|
||||
<span class="icon">
|
||||
<i class="fas fa-search"></i>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
{% include "partials/shared/nav.html" %}
|
||||
|
||||
<div>
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
|
||||
|
||||
{% block pagination %}
|
||||
{% if paginator.previous or paginator.next %}
|
||||
<section class="section">
|
||||
<div class="container max-w-5xl mx-auto flex items-center justify-center">
|
||||
<nav class="pagination flex items-center my-12 text-garage-gray" role="navigation" aria-label="pagination">
|
||||
{% if paginator.previous %}
|
||||
<a class="flex items-center justify-center space-x-2 hover:text-garage-orange"
|
||||
href='{{ paginator.previous }}' {% if not paginator.previous %}disabled{% endif %}>
|
||||
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M7 16l-4-4m0 0l4-4m-4 4h18"></path>
|
||||
</svg>
|
||||
<span>Prev</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
<ul class="flex space-x-4 px-4">
|
||||
{% for pager in range(start=1, end=paginator.number_pagers+1) %}
|
||||
<li>
|
||||
<a class="font-semibold inline-flex items-center justify-center h-7 w-7 rounded hover:shadow hover:bg-garage-orange bg-garage-gray bg-opacity-20 border-b-2 {% if paginator.current_index == pager %}border-garage-orange{% else %}border-transparent{% endif %}"
|
||||
href='{{ paginator.base_url }}{{pager}}' aria-label="Goto page {{pager}}">
|
||||
{{pager}}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% if paginator.next %}
|
||||
<a class="flex items-center justify-center space-x-2 hover:text-garage-orange"
|
||||
href='{{ paginator.next }}' {% if not paginator.next %}disabled{% endif %}>
|
||||
<span>Next</span>
|
||||
<svg class="mt-0.5 w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M17 8l4 4m0 0l-4 4m4-4H3"></path>
|
||||
</svg>
|
||||
</a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
{% block search %}
|
||||
<section id="search-modal" class="modal hidden bg-gray-50 w-5/6 md:w-4/5 lg:w-3/4 xl:w-2/3 2xl:w-1/2 absolute top-20 left-1/2 transform -translate-x-1/2 shadow-xl rounded-lg">
|
||||
<div class="p-2 md:p-4 xl:p-8">
|
||||
<section class="relative flex flex-col items-center justify-center">
|
||||
<div class="field mt-8 md:mt-0 mb-2">
|
||||
<div class="control">
|
||||
<input
|
||||
id="search"
|
||||
class="p-2 md:p-4 shadow rounded-lg outline-2 focus:outline outline-garage-orange"
|
||||
placeholder="Search on Garage..." type="search" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-results hidden mt-8 p-2 md:p-4 w-full bg-white rounded shadow">
|
||||
<div class="search-results__items max-h-96 overflow-y-scroll p-2 md:p-4"></div>
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block comment %}
|
||||
{% endblock %}
|
||||
|
||||
<footer class="py-4 bg-garage-orange bg-opacity-20">
|
||||
<div class="content has-text-centered flex flex-col items-center justify-center">
|
||||
<p>
|
||||
{{ macros:: social_links( social_config=config.extra.social) }}
|
||||
</p>
|
||||
<p class="text-gray-600 py-2">
|
||||
Powered by <a href="https://www.getzola.org" target="_blank"
|
||||
class="font-semibold hover:text-garage-orange">Zola</a>
|
||||
</p>
|
||||
<button aria-label="close" id="close-modal-btn" class="absolute top-2 right-2 flex items-center group rounded-full shadow-inner bg-gray-300 border border-transparent hover:border-gray-500 bg-opacity-50 p-2">
|
||||
<svg id="close-modal-btn-icon" class="w-6 h-6 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>
|
||||
<small class="text-xs text-gray-400">(Esc)</small>
|
||||
</button>
|
||||
</div>
|
||||
</footer>
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
{% block pagination %}
|
||||
{% include "partials/shared/paginator.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block comment %}{% endblock %}
|
||||
|
||||
{% include "partials/shared/footer.html" %}
|
||||
|
||||
{% if config.extra.galleria.enabled %}
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js"
|
||||
integrity="sha384-vtXRMe3mGCbOeY7l30aIg8H9p3GdeSe4IFlP6G8JMa7o7lXvnz3GFKzPxzJdPfGK"
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/galleria@1.6.1/dist/galleria.min.js"
|
||||
integrity="sha384-QSfwGT8/EU536DKdtyP2D6SLlh8zBaZ0cVkwfrwhqzIU9VCfJT00CLVP5t+HAiYg"
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/galleria@1.6.1/dist/themes/folio/galleria.folio.min.js"
|
||||
integrity="sha384-DwpKI+deZB267+hPKwiOIc5Y2GKsVL0mR6hgz7GgIu7AgAMYqJwcJKY1YBNfhWcY"
|
||||
crossorigin="anonymous"></script>
|
||||
{% endif %}
|
||||
{% if config.extra.mermaid.enabled %}
|
||||
<script src="https://cdn.jsdelivr.net/npm/mermaid@8.13.5/dist/mermaid.min.js"
|
||||
integrity="sha384-0yWn54pSGtfKCU+skfA69l25VsCw+MZt4LQov3xNRoS7YkAMrFokGgSBnAWSK4pv"
|
||||
crossorigin="anonymous"></script>
|
||||
{% endif %}
|
||||
{% if config.extra.chart.enabled %}
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.xkcd@1.1.13/dist/chart.xkcd.min.js"
|
||||
integrity="sha384-xC3h1+IHXK8seA+8KfT79Z4e0GPsznjXBoMa5nd8ooWKplPyXx92NOmljWxLC/cs"
|
||||
crossorigin="anonymous"></script>
|
||||
{% endif %}
|
||||
|
||||
<script src="{{ get_url(path='elasticlunr.min.js') }}"></script>
|
||||
<script src="{{ get_url(path='search_index.' ~ lang ~ '.js') }}"></script>
|
||||
<!-- <script src="{{ get_url(path='search_index.' ~ lang ~ '.js') }}"></script> -->
|
||||
{%- if lang != "en" -%}
|
||||
{%- block other_lang_search_js -%}
|
||||
{%- endblock -%}
|
||||
{%- block other_lang_search_js -%}{%- endblock -%}
|
||||
{%- endif -%}
|
||||
<script src="{{ get_url(path='js/site.js') }}"></script>
|
||||
|
||||
{% block custom_js %}
|
||||
{% endblock %}
|
||||
{% block custom_js %}{% endblock %}
|
||||
|
||||
{% block user_custom_js %}
|
||||
{% endblock %}
|
||||
{% block user_custom_js %}{% endblock %}
|
||||
</body>
|
||||
|
||||
</html>
|
11
templates/partials/shared/footer.html
Normal file
11
templates/partials/shared/footer.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
<footer class="py-4 bg-garage-orange bg-opacity-20">
|
||||
<div class="content has-text-centered flex flex-col items-center justify-center">
|
||||
<p>
|
||||
{{ macros:: social_links( social_config=config.extra.social) }}
|
||||
</p>
|
||||
<p class="text-gray-600 py-2">
|
||||
Powered by <a href="https://www.getzola.org" target="_blank"
|
||||
class="font-semibold hover:text-garage-orange">Zola</a>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
50
templates/partials/shared/head.html
Normal file
50
templates/partials/shared/head.html
Normal file
|
@ -0,0 +1,50 @@
|
|||
{% if config.extra.favicon.webmanifest %}
|
||||
<link href='{{ config.extra.favicon.webmanifest }}' rel="manifest" />
|
||||
{% endif %}
|
||||
{% if config.extra.favicon.safari_pinned_tab %}
|
||||
<link color="#5bbad5" href='{{ config.extra.favicon.safari_pinned_tab }}' rel="mask-icon" />
|
||||
{% endif %}
|
||||
{% if config.extra.favicon.favicon_16x16 %}
|
||||
<link href='{{ config.extra.favicon.favicon_16x16 }}' rel="icon" sizes="16x16" type="image/png" />
|
||||
{% endif %}
|
||||
{% if config.extra.favicon.favicon_32x32 %}
|
||||
<link href='{{ config.extra.favicon.favicon_32x32 }}' rel="icon" sizes="32x32" type="image/png" />
|
||||
{% endif %}
|
||||
{% if config.extra.favicon.apple_touch_icon %}
|
||||
<link href='{{ config.extra.favicon.apple_touch_icon }}' rel="apple-touch-icon" sizes="180x180" />
|
||||
{% endif %}
|
||||
|
||||
{% if config.extra.galleria.enabled %}
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/galleria@1.6.1/dist/themes/folio/galleria.folio.min.css"
|
||||
integrity="sha384-+rY0QD+LRnTOquDMzGa9lXU6jIwdiQuwCJQ2cdcW0qeP/0UbjQCZlXnRsUMA+9pH" crossorigin="anonymous">
|
||||
{% endif %}
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.4/css/all.min.css"
|
||||
integrity="sha384-DyZ88mC6Up2uqS4h/KRgHuoeGwBcD4Ng9SiP4dIRy0EXTlnuz47vAwmeGwVChigm" crossorigin="anonymous">
|
||||
|
||||
<link href="{{ get_url(path='style.css') }}" rel="stylesheet" />
|
||||
|
||||
{% block user_custom_stylesheet %}{% endblock %}
|
||||
|
||||
<title>
|
||||
{% block title %}
|
||||
{{ config.title }}
|
||||
{% endblock title %}
|
||||
</title>
|
||||
|
||||
{% if config.extra.katex.enabled %}
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.css"
|
||||
integrity="sha384-R4558gYOUz8mP9YWpZJjofhk+zx0AS11p36HnD2ZKj/6JR5z27gSSULCNHIRReVs" crossorigin="anonymous">
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.js"
|
||||
integrity="sha384-z1fJDqw8ZApjGO3/unPWUPsIymfsJmyrDVWC8Tv/a1HeOtGmkwNd/7xUS0Xcnvsx"
|
||||
crossorigin="anonymous"></script>
|
||||
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/contrib/mathtex-script-type.min.js"
|
||||
integrity="sha384-jiBVvJ8NGGj5n7kJaiWwWp9AjC+Yh8rhZY3GtAX8yU28azcLgoRo4oukO87g7zDT"
|
||||
crossorigin="anonymous"></script>
|
||||
{% if config.extra.katex.auto_render %}
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/contrib/auto-render.min.js"
|
||||
integrity="sha384-+XBljXPPiv+OzfbB3cVmLHf4hdUFHlWNZN5spNQ7rmHTXpd7WvJum6fIACpNNfIR"
|
||||
crossorigin="anonymous"></script>
|
||||
{% endif %}
|
||||
{% endif %}
|
31
templates/partials/shared/nav.html
Normal file
31
templates/partials/shared/nav.html
Normal file
|
@ -0,0 +1,31 @@
|
|||
<nav aria-label="section navigation" class="navbar w-full" role="navigation">
|
||||
<div class="w-full flex flex-col space-y-2 md:space-y-0 md:flex-row items-center justify-between py-1 px-8 text-garage-gray bg-garage-orange bg-opacity-20">
|
||||
<div class="navbar-brand">
|
||||
<a class="hover:rounded-full hover:bg-white" href="{{config.base_url}}">
|
||||
<img class="transform duration-150 focus:bg-white hover:bg-white hover:shadow rounded-lg hover:scale-90"
|
||||
src="{{ config.extra.organization.logo }}" width="65px">
|
||||
</a>
|
||||
</div>
|
||||
<div class="navbar-menu" id="navMenu">
|
||||
<div class="flex items-center justify-center">
|
||||
{% for item in config.extra.navbar_items %}
|
||||
{% if lang == item.code %}
|
||||
{% for nav in item.nav_items %}
|
||||
<a class="font-semibold focus:bg-white hover:bg-white hover:shadow px-4 py-2 rounded-lg"
|
||||
href="{{ nav.url | replace(from='$BASE_URL', to=config.base_url) }}">
|
||||
{{ nav.name }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<button
|
||||
id="nav-search-btn"
|
||||
type="button"
|
||||
title="Open Search (alt + S)"
|
||||
class="focus:bg-white hover:bg-white hover:shadow px-4 py-2 rounded-lg">
|
||||
<svg id="nav-search-btn-icon" class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
40
templates/partials/shared/paginator.html
Normal file
40
templates/partials/shared/paginator.html
Normal file
|
@ -0,0 +1,40 @@
|
|||
{% if paginator.previous or paginator.next %}
|
||||
<section class="section">
|
||||
<div class="container max-w-5xl mx-auto flex items-center justify-center">
|
||||
<nav class="pagination flex items-center my-12 text-garage-gray" role="navigation" aria-label="pagination">
|
||||
{% if paginator.previous %}
|
||||
<a class="flex items-center justify-center space-x-2 hover:text-garage-orange"
|
||||
href='{{ paginator.previous }}' {% if not paginator.previous %}disabled{% endif %}>
|
||||
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M7 16l-4-4m0 0l4-4m-4 4h18"></path>
|
||||
</svg>
|
||||
<span>Prev</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
<ul class="flex space-x-4 px-4">
|
||||
{% for pager in range(start=1, end=paginator.number_pagers+1) %}
|
||||
<li>
|
||||
<a class="font-semibold inline-flex items-center justify-center h-7 w-7 rounded hover:shadow hover:bg-garage-orange bg-garage-gray bg-opacity-20 border-b-2 {% if paginator.current_index == pager %}border-garage-orange{% else %}border-transparent{% endif %}"
|
||||
href='{{ paginator.base_url }}{{pager}}' aria-label="Goto page {{pager}}">
|
||||
{{pager}}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% if paginator.next %}
|
||||
<a class="flex items-center justify-center space-x-2 hover:text-garage-orange" href='{{ paginator.next }}'
|
||||
{% if not paginator.next %}disabled{% endif %}>
|
||||
<span>Next</span>
|
||||
<svg class="mt-0.5 w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 8l4 4m0 0l-4 4m4-4H3">
|
||||
</path>
|
||||
</svg>
|
||||
</a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
|
@ -1 +0,0 @@
|
|||
<svg class="chart">{{body | safe}}</svg>
|
Before Width: | Height: | Size: 41 B |
|
@ -1 +0,0 @@
|
|||
<div class="galleria mb-6" style="height: 450px">{{body | safe}}</div>
|
|
@ -1,11 +0,0 @@
|
|||
<div class="map mb-6" style='height: 450px;'>
|
||||
<div class="mapbox-access-token">
|
||||
{{config.extra.mapbox.access_token}}
|
||||
</div>
|
||||
<div class="mapbox-zoom">
|
||||
{{zoom}}
|
||||
</div>
|
||||
<div class="mapbox-geojson">
|
||||
{{body}}
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in a new issue