mirror of
https://github.com/PR0M3TH3AN/Archivox.git
synced 2025-09-08 15:08:43 +00:00
Add base templates, theme, and dark mode
This commit is contained in:
21
templates/layout.njk
Normal file
21
templates/layout.njk
Normal file
@@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" data-theme="{{ config.theme.darkMode ? 'dark' : 'light' }}">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>{{ title or config.site.title }}</title>
|
||||
<link rel="stylesheet" href="/assets/theme.css" />
|
||||
</head>
|
||||
<body>
|
||||
{% include "partials/header.njk" %}
|
||||
<div class="container">
|
||||
{% include "partials/sidebar.njk" %}
|
||||
<main id="content">
|
||||
<nav id="breadcrumbs" class="breadcrumbs"></nav>
|
||||
{{ content | safe }}
|
||||
</main>
|
||||
</div>
|
||||
{% include "partials/footer.njk" %}
|
||||
<script src="/assets/theme.js"></script>
|
||||
</body>
|
||||
</html>
|
3
templates/partials/footer.njk
Normal file
3
templates/partials/footer.njk
Normal file
@@ -0,0 +1,3 @@
|
||||
<footer class="footer">
|
||||
<p>© {{ config.site.title }} {{ new Date().getFullYear() }}</p>
|
||||
</footer>
|
5
templates/partials/header.njk
Normal file
5
templates/partials/header.njk
Normal file
@@ -0,0 +1,5 @@
|
||||
<header class="header">
|
||||
<button id="sidebar-toggle" class="sidebar-toggle" aria-label="Toggle navigation">☰</button>
|
||||
<a href="/" class="logo">{{ config.site.title }}</a>
|
||||
<button id="theme-toggle" class="theme-toggle" aria-label="Toggle dark mode">🌓</button>
|
||||
</header>
|
9
templates/partials/sidebar.njk
Normal file
9
templates/partials/sidebar.njk
Normal file
@@ -0,0 +1,9 @@
|
||||
<aside class="sidebar" id="sidebar">
|
||||
<nav>
|
||||
<ul>
|
||||
{% for item in navigation %}
|
||||
<li><a href="{{ item.path }}">{{ item.page.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
</aside>
|
Reference in New Issue
Block a user