Major changes: - New ThemeManager with Twig templating and SCSS compilation - Dynamic themes system (themes/default, themes/demo) - LogManager with SQLite storage and syslog forwarding - RequestLogger with static helper methods - Admin UI overhaul (Bootstrap 5, dark mode) - Admin config page with logging and theme settings - Admin logs page with filters and search - Removed legacy Mustache templates - Removed test plugin and theme - Composer dependencies: Twig, scssphp, CommonMark, MaxMind GeoIP
22 lines
695 B
JavaScript
22 lines
695 B
JavaScript
// CodePress default theme JavaScript
|
|
// Loaded after the global app.js on every page.
|
|
|
|
(function () {
|
|
'use strict';
|
|
|
|
// Sidebar toggle (used by the breadcrumb toggle button)
|
|
function toggleSidebar() {
|
|
var sidebar = document.getElementById('site-sidebar');
|
|
if (!sidebar) return;
|
|
sidebar.classList.toggle('sidebar-hidden');
|
|
var btn = document.querySelector('.sidebar-toggle-btn');
|
|
if (btn) {
|
|
var hidden = sidebar.classList.contains('sidebar-hidden');
|
|
btn.setAttribute('aria-expanded', hidden ? 'false' : 'true');
|
|
}
|
|
}
|
|
|
|
// Expose for inline onclick handlers
|
|
window.toggleSidebar = toggleSidebar;
|
|
})();
|