document-processor/app/templates/base.html

39 lines
1.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>{% block title %}Document Processor{% endblock %}</title>
<link rel="stylesheet" href="/static/app.css?v=12">
</head>
<body>
<div class="app-shell">
{% include "partials/sidebar.html" %}
{% include "partials/header.html" %}
<main class="main">
<div class="main-content">
{% block content %}{% endblock %}
</div>
</main>
</div>
<script>
document.addEventListener("DOMContentLoaded", () => {
const menuToggle = document.getElementById("menu-toggle");
const appShell = document.querySelector(".app-shell");
if (!menuToggle || !appShell) return;
const toggleNav = () => appShell.classList.toggle("nav-open");
menuToggle.addEventListener("click", toggleNav);
menuToggle.addEventListener("keydown", (e) => {
if (e.key === "Enter" || e.key === " ") {
e.preventDefault();
toggleNav();
}
});
});
</script>
</body>
</html>