blow/templates/layout.html

299 lines
18 KiB
HTML
Raw Normal View History

2021-11-03 19:41:31 +00:00
<!doctype html>
2021-11-04 21:45:53 +00:00
<html lang="{{lang}}">
2021-11-03 19:41:31 +00:00
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
2021-11-06 12:17:14 +00:00
<link href="/css/main.css" rel="stylesheet">
2021-11-03 19:41:31 +00:00
<title>
{% block title %}
{{ config.title }}
{% endblock title %}
</title>
</head>
2021-11-09 17:06:47 +00:00
<body class="dark:bg-gray-700 flex flex-col h-screen justify-between">
2021-11-06 14:33:42 +00:00
<!---------------------------------------------------------->
<!------------------------- NAVBAR ------------------------->
<!---------------------------------------------------------->
2021-11-13 11:48:42 +00:00
<nav id="navbar" class="bg-gray-200 dark:bg-gray-800">
2021-11-06 14:33:42 +00:00
<div class="max-w-7xl mx-auto px-2 sm:px-6 lg:px-8">
<div class="relative flex items-center justify-between h-16">
<div class="absolute inset-y-0 left-0 flex items-center sm:hidden">
<!-- Mobile menu button-->
2021-11-14 14:32:55 +00:00
<button id="toggle-mobile-menu" type="button" class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-white hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white" aria-controls="mobile-menu" aria-expanded="false">
2021-11-06 14:33:42 +00:00
<span class="sr-only">Open main menu</span>
<!--
Icon when menu is closed.
Heroicon name: outline/menu
Menu open: "hidden", Menu closed: "block"
-->
<svg class="block h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
</svg>
<!--
Icon when menu is open.
Heroicon name: outline/x
Menu open: "block", Menu closed: "hidden"
-->
<svg class="hidden h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
</svg>
</button>
2021-11-04 19:42:29 +00:00
</div>
2021-11-12 19:52:48 +00:00
<div class="flex-1 flex items-center">
2021-11-14 15:07:26 +00:00
<div class="flex-shrink-0 flex items-center m-auto sm:ml-0">
2021-11-14 19:24:33 +00:00
<span class="ml-4 sm:ml-0 text-xl text-gray-800 dark:text-white">{{config.extra.navbar.title}}</span>
2021-11-06 14:33:42 +00:00
<!-- <img class="block lg:hidden h-8 w-auto" src="https://tailwindui.com/img/logos/workflow-mark-indigo-500.svg" alt="Workflow">
<img class="hidden lg:block h-8 w-auto" src="https://tailwindui.com/img/logos/workflow-logo-indigo-500-mark-white-text.svg" alt="Workflow"> -->
</div>
<div class="hidden sm:block sm:ml-6">
2021-11-14 14:15:17 +00:00
<div class="nav-links flex space-x-4">
2021-11-06 14:33:42 +00:00
<!-- Current: "bg-gray-900 text-white", Default: "text-gray-300 hover:bg-gray-700 hover:text-white" -->
2021-11-11 17:54:31 +00:00
{% for item in config.extra.navbar.items %}
2021-11-13 21:57:22 +00:00
{% if lang == item.lang %}
2021-11-11 22:55:47 +00:00
{% for link in item.links %}
<a href="{{ link.url }}" class="text-gray-800 dark:text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">{{ link.name }}</a>
{% endfor %}
{% endif %}
2021-11-06 14:33:42 +00:00
{% endfor %}
2021-11-12 19:39:18 +00:00
{% if config.extra.zt.enable_sidebar %}
2021-11-11 22:55:47 +00:00
<!-- More ... Button (sidebar) -->
2021-11-12 19:34:56 +00:00
<button id="toggle-sidebar">
2021-11-12 19:39:18 +00:00
<svg class="w-7 h-7 text-gray-800 dark:text-gray-300" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
2021-11-12 19:27:41 +00:00
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h.01M12 12h.01M19 12h.01M6 12a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0z"></path>
</svg>
</button>
2021-11-12 19:39:18 +00:00
{% endif %}
2021-11-06 14:33:42 +00:00
</div>
2021-11-04 19:42:29 +00:00
</div>
2021-11-12 19:15:16 +00:00
2021-11-06 17:26:24 +00:00
{% if config.extra.zt.enable_search %}
2021-11-06 18:20:43 +00:00
<!-- Search input in navbar -->
2021-11-14 15:05:03 +00:00
<div class="flex ml-auto relative items-center sm:mr-4">
<input id="search" class="rounded-xl border border-black dark:border-gray-200 h-9 text-black dark:text-gray-200 dark:bg-gray-700 w-24 sm:w-full" type="text">
2021-11-09 21:37:01 +00:00
<svg class="w-6 h-6 absolute left-2 text-black dark:text-gray-200" 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>
2021-11-09 21:37:22 +00:00
<span class="absolute right-2 hidden sm:block text-gray-400 text-sm leading-5 py-0.5 px-1.5 border border-gray-300 rounded-md">
2021-11-09 21:35:42 +00:00
<kbd class="font-sans">
<abbr title="Command" class="no-underline"></abbr>
</kbd>
<kbd class="font-sans">K</kbd>
</span>
2021-11-06 17:26:24 +00:00
</div>
2021-11-07 09:59:12 +00:00
<!---------------------------- Search box modal ---------------------------->
2021-11-12 19:15:16 +00:00
<!-- inspired by https://www.tailwindtoolbox.com/components/modal -->
2021-11-07 10:41:05 +00:00
<div id="search-modal" class="modal opacity-0 pointer-events-none fixed w-full h-full top-0 left-0 flex z-10">
2021-11-06 18:41:11 +00:00
<div class="modal-overlay absolute w-full h-full bg-gray-900 opacity-50"></div>
2021-11-09 17:08:35 +00:00
<div class="modal-container text-gray-800 bg-gray-200 dark:bg-gray-800 dark:text-gray-400 w-11/12 md:max-w-md mx-auto rounded-lg shadow-lg z-50 md:mt-32 h-36 border border-2 border-gray-800 dark:border-gray-400">
2021-11-06 18:41:11 +00:00
<div class="modal-close absolute top-0 right-0 cursor-pointer flex flex-col items-center mt-4 mr-4 text-white text-sm z-50">
<svg class="fill-current text-white" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
<path d="M14.53 4.53l-1.06-1.06L9 7.94 4.53 3.47 3.47 4.53 7.94 9l-4.47 4.47 1.06 1.06L9 10.06l4.47 4.47 1.06-1.06L10.06 9z"></path>
</svg>
<span class="text-sm">(Esc)</span>
</div>
2021-11-07 10:34:18 +00:00
<!-- Modal Content-->
2021-11-07 10:40:05 +00:00
<div class="py-4 text-left px-6 flex flex-col">
2021-11-07 09:59:12 +00:00
<!-- Modal Title -->
2021-11-06 18:41:11 +00:00
<div class="flex justify-between items-center pb-3">
<p class="text-2xl font-bold">Search</p>
2021-11-07 11:52:22 +00:00
<div class="modal-close cursor-pointer z-50">
2021-11-07 09:59:12 +00:00
<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="M6 18L18 6M6 6l12 12"></path>
2021-11-06 18:41:11 +00:00
</svg>
</div>
</div>
2021-11-07 09:59:12 +00:00
<!-- Modal Body -->
2021-11-07 19:22:53 +00:00
<input id="search-input" class="rounded-xl border border-black h-12 text-bold text-2xl pl-2 text-black dark:text-gray-200 bg-gray-700" type="text">
2021-11-07 10:20:09 +00:00
<!-- Search results -->
2021-11-07 18:28:26 +00:00
<div id="search-results">
2021-11-07 19:22:53 +00:00
<ul id="results-list" class="flex flex-col justify-center max-h-2xl mt-2 divide-y bg-gray-200 dark:bg-gray-500 rounded-lg"></ul>
2021-11-06 18:41:11 +00:00
<!--Footer-->
<!-- <div class="flex justify-end pt-2">
<button class="px-4 bg-transparent p-3 rounded-lg text-indigo-500 hover:bg-gray-100 hover:text-indigo-400 mr-2">Action</button>
<button class="modal-close px-4 bg-indigo-500 p-3 rounded-lg text-white hover:bg-indigo-400">Close</button>
</div> -->
</div>
</div>
</div>
2021-11-04 19:42:29 +00:00
</div>
2021-11-07 11:41:12 +00:00
{% endif %}
2021-11-07 18:15:20 +00:00
2021-11-12 19:34:56 +00:00
<!---------------------------- Sidebar Menu ---------------------------->
2021-11-12 19:15:16 +00:00
{% if config.extra.zt.enable_sidebar %}
2021-11-12 19:36:49 +00:00
<div id="sidebar" class="-translate-x-full flex flex-col pt-6 p-2 text-2xl text-black dark:text-gray-200 bg-gray-200 dark:bg-gray-900 transform top-0 left-0 w-64 bg-white fixed h-full overflow-auto ease-in-out transition-all duration-300 z-30 shadow-2xl">
2021-11-12 19:16:21 +00:00
{% for item in config.extra.sidebar.items %}
2021-11-13 21:57:22 +00:00
{% if lang == item.lang %}
2021-11-12 19:15:16 +00:00
{% for link in item.links %}
<a href="{{ link.url }}" class="text-gray-800 dark:text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">{{ link.name }}</a>
{% endfor %}
{% endif %}
{% endfor %}
</div>
{% endif %}
2021-11-14 11:17:38 +00:00
{% if config.extra.zt.enable_multilingue %}
2021-11-14 12:54:09 +00:00
<!-- Language change button -->
2021-11-14 13:08:51 +00:00
<div class="flex p-2 ml-4 relative">
2021-11-14 12:54:09 +00:00
<button id="switch-lang" type="button" class="bg-gray-200 text-gray-800 hover:text-gray-900 dark:bg-gray-800 dark:text-gray-400 dark:hover:text-white p-1 rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-white">
<svg class="w-6 h-6 bg-gray-200 text-gray-800 hover:text-gray-900 dark:bg-gray-800 dark:text-gray-400 dark:hover:text-white" 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 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"></path>
</svg>
</button>
2021-11-14 13:08:51 +00:00
<div id="switch-lang-panel" class="hidden absolute top-12 -left-1/2 z-10 p-4 rounded-lg divide-y bg-gray-300 dark:bg-gray-800 text-gray-800 dark:text-gray-400 flex flex-col w-28 ">
<span class="sr-only">Switch Lang</span>
{% for item in config.extra.lang.items %}
2021-11-14 13:10:01 +00:00
{% if lang == item.lang %}
2021-11-14 13:16:12 +00:00
{% for link in item.links %}
2021-11-14 13:22:00 +00:00
<a class="flex justify-center py-2 hover:text-gray-800 dark:hover:text-white" href="{{ link.base_url }}">{{ link.name }}</a>
2021-11-14 13:16:12 +00:00
{% endfor %}
2021-11-14 13:08:51 +00:00
{% endif %}
{% endfor %}
2021-11-14 12:48:53 +00:00
</div>
2021-11-14 12:44:27 +00:00
</div>
2021-11-13 21:57:22 +00:00
{% endif %}
<!-- Theme switch button -->
2021-11-14 12:50:43 +00:00
<div class="flex p-2">
2021-11-06 14:33:42 +00:00
<button id="switch-theme" type="button" class="bg-gray-200 text-gray-800 hover:text-gray-900 dark:bg-gray-800 dark:text-gray-400 dark:hover:text-white p-1 rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-white">
<span class="sr-only">Switch Theme</span>
<!-- Heroicon name: outline/light -->
<svg id="light" 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="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"></path>
</svg>
<!-- Heroicon name: outline/dark -->
<svg id="dark" 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="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"></path>
</svg>
</button>
2021-11-04 19:42:29 +00:00
2021-11-06 14:33:42 +00:00
<!-- Profile dropdown -->
<!-- <div class="ml-3 relative">
<div>
<button type="button" class="bg-gray-800 flex text-sm rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-white" id="user-menu-button" aria-expanded="false" aria-haspopup="true">
<span class="sr-only">Open user menu</span>
<img class="h-8 w-8 rounded-full" src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" alt="">
</button>
</div> -->
2021-11-04 19:42:29 +00:00
2021-11-06 14:33:42 +00:00
<!--
Dropdown menu, show/hide based on menu state.
2021-11-04 19:42:29 +00:00
2021-11-06 14:33:42 +00:00
Entering: "transition ease-out duration-100"
From: "transform opacity-0 scale-95"
To: "transform opacity-100 scale-100"
Leaving: "transition ease-in duration-75"
From: "transform opacity-100 scale-100"
To: "transform opacity-0 scale-95"
-->
<!-- Active: "bg-gray-100", Not Active: "" -->
<!-- <div class="origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none" role="menu" aria-orientation="vertical" aria-labelledby="user-menu-button" tabindex="-1">
<a href="#" class="block px-4 py-2 text-sm text-gray-700" role="menuitem" tabindex="-1" id="user-menu-item-0">Your Profile</a>
<a href="#" class="block px-4 py-2 text-sm text-gray-700" role="menuitem" tabindex="-1" id="user-menu-item-1">Settings</a>
<a href="#" class="block px-4 py-2 text-sm text-gray-700" role="menuitem" tabindex="-1" id="user-menu-item-2">Sign out</a>
</div> -->
</div>
2021-11-04 19:42:29 +00:00
</div>
</div>
</div>
2021-11-14 14:32:55 +00:00
<!----------------------------- Mobile menu ----------------------------->
2021-11-14 18:10:25 +00:00
<div id="mobile-menu" class="sm:hidden fixed z-10 overflow-hidden">
<div class="nav-links flex flex-col space-y-4 items-center w-screen dark:bg-gray-800 transition-all ease-out duration-500 h-0">
2021-11-06 14:33:42 +00:00
<!-- Current: "bg-gray-900 text-white", Default: "text-gray-300 hover:bg-gray-700 hover:text-white" -->
2021-11-14 14:15:17 +00:00
{% for item in config.extra.navbar.items %}
{% if lang == item.lang %}
{% for link in item.links %}
<a href="{{ link.url }}" class="text-gray-800 dark:text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">{{ link.name }}</a>
{% endfor %}
{% endif %}
{% endfor %}
2021-11-14 19:23:20 +00:00
{% if config.extra.zt.enable_sidebar %}
{% for item in config.extra.sidebar.items %}
{% if lang == item.lang %}
{% for link in item.links %}
<a href="{{ link.url }}" class="text-gray-800 dark:text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">{{ link.name }}</a>
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
2021-11-06 14:33:42 +00:00
</div>
2021-11-04 19:42:29 +00:00
</div>
2021-11-06 14:33:42 +00:00
</nav>
<!----------------------------------------------------------->
<!------------------------- CONTENT ------------------------->
<!----------------------------------------------------------->
2021-11-09 20:15:38 +00:00
<main class="max-w-7xl mx-auto text-black dark:text-gray-200 w-full mb-auto">
2021-11-06 14:33:42 +00:00
{% block content %}
{% endblock content %}
</main>
2021-11-04 19:42:29 +00:00
2021-11-11 20:12:56 +00:00
<!----------------------------------------------------------->
<!------------------------- PAGINATION ---------------------->
<!----------------------------------------------------------->
{% block pagination %}
{% endblock%}
2021-11-06 14:33:42 +00:00
<!---------------------------------------------------------->
<!------------------------- FOOTER ------------------------->
<!---------------------------------------------------------->
2021-11-08 19:10:30 +00:00
<footer class="max-w-7xl mx-auto relative pt-1 border-b-2 border-gray-300 dark:border-gray-200 w-full">
2021-11-06 14:38:25 +00:00
<!-- <div class="container mx-auto px-6">
2021-11-06 14:33:42 +00:00
<div class="sm:flex sm:mt-8">
<div class="mt-8 sm:mt-0 sm:w-full sm:px-8 flex flex-col md:flex-row justify-between">
<div class="flex flex-col">
<span class="font-bold text-gray-700 uppercase mb-2">Footer header 1</span>
<span class="my-2"><a href="#" class="text-blue-700 text-md hover:text-blue-500">link 1</a></span>
<span class="my-2"><a href="#" class="text-blue-700 text-md hover:text-blue-500">link 1</a></span>
<span class="my-2"><a href="#" class="text-blue-700 text-md hover:text-blue-500">link 1</a></span>
</div>
<div class="flex flex-col">
<span class="font-bold text-gray-700 uppercase mt-4 md:mt-0 mb-2">Footer header 2</span>
<span class="my-2"><a href="#" class="text-blue-700 text-md hover:text-blue-500">link 1</a></span>
<span class="my-2"><a href="#" class="text-blue-700 text-md hover:text-blue-500">link 1</a></span>
<span class="my-2"><a href="#" class="text-blue-700 text-md hover:text-blue-500">link 1</a></span>
</div>
<div class="flex flex-col">
<span class="font-bold text-gray-700 uppercase mt-4 md:mt-0 mb-2">Footer header 3</span>
<span class="my-2"><a href="#" class="text-blue-700 text-md hover:text-blue-500">link 1</a></span>
<span class="my-2"><a href="#" class="text-blue-700 text-md hover:text-blue-500">link 1</a></span>
<span class="my-2"><a href="#" class="text-blue-700 text-md hover:text-blue-500">link 1</a></span>
</div>
</div>
</div>
2021-11-06 14:38:25 +00:00
</div> -->
2021-11-06 14:40:27 +00:00
<div class="mt-16 border-t-2 border-gray-300 flex flex-col items-center">
<div class="sm:w-2/3 text-center py-6">
2021-11-06 14:43:40 +00:00
<p class="text-sm text-black dark:text-white font-bold mb-2">
2021-11-06 14:40:27 +00:00
© 2021 zola-tailwind theme made for <a href="https://www.getzola.org/" target="_blank">Zola</a> by <a href="https://tchartron.com" target="_blank">Thomas CHARTRON</a>
</p>
2021-11-06 14:33:42 +00:00
</div>
</div>
</footer>
2021-11-04 21:45:53 +00:00
2021-11-06 14:33:42 +00:00
<!------------------------- SCRIPTS ------------------------->
<script defer src="/js/main.js"></script>
{% if config.extra.zt.enable_search %}
2021-11-07 11:47:14 +00:00
<script src="https://cdnjs.cloudflare.com/ajax/libs/elasticlunr/0.9.6/elasticlunr.min.js"></script>
<script src="/search_index.{{lang}}.js"></script>
2021-11-06 14:33:42 +00:00
<script defer src="/js/search.js"></script>
{% endif %}
2021-11-14 12:44:27 +00:00
{% if config.extra.zt.enable_multilingue %}
<script defer src="/js/lang.js"></script>
{% endif %}
2021-11-11 15:00:25 +00:00
{% if config.extra.zt.enable_adsense %}
<script async src="{{config.extra.zt.adsense_link}}"
crossorigin="anonymous"></script>
{% endif %}
2021-11-09 20:09:39 +00:00
{% block extra_js %}
{% endblock extra_js %}
2021-11-03 19:41:31 +00:00
</body>
2021-11-06 14:33:42 +00:00
</html>