diff --git a/logs/debug/debug-2025-07-04.log.gz b/logs/debug/debug-2025-07-04.log.gz new file mode 100644 index 0000000..2b9f9f3 --- /dev/null +++ b/logs/debug/debug-2025-07-04.log.gz Binary files differ diff --git a/logs/error/error-2025-07-04.log.gz b/logs/error/error-2025-07-04.log.gz new file mode 100644 index 0000000..38baf19 --- /dev/null +++ b/logs/error/error-2025-07-04.log.gz Binary files differ diff --git a/logs/info/info-2025-07-04.log.gz b/logs/info/info-2025-07-04.log.gz new file mode 100644 index 0000000..edd396b --- /dev/null +++ b/logs/info/info-2025-07-04.log.gz Binary files differ diff --git a/logs/warn/warn-2025-07-04.log.gz b/logs/warn/warn-2025-07-04.log.gz new file mode 100644 index 0000000..ed73b74 --- /dev/null +++ b/logs/warn/warn-2025-07-04.log.gz Binary files differ diff --git a/public/css/styles.css b/public/css/styles.css index 5d20fa0..f2ce772 100644 --- a/public/css/styles.css +++ b/public/css/styles.css @@ -91,14 +91,6 @@ footer .social-contact p svg:hover { opacity: 1; } -@media (max-width: 600px) { - footer .container { - padding: 1.5rem; - } - footer p { - font-size: 0.8rem; - } -} /* Header */ header#site-header { background-color: #2c3e50; @@ -138,7 +130,6 @@ header#site-header .logo a:hover::after { transform: scaleX(1); } -/* Layout */ .layout { display: flex; max-width: 1200px; @@ -146,12 +137,6 @@ padding: 0 1.5rem; gap: 2rem; } -/* Responsive layout */ -@media (max-width: 900px) { - .layout { - flex-direction: column; - } -} /* Main content */ main.container { flex: 1; @@ -171,60 +156,16 @@ font-size: 1rem; color: #444; } -/* Content area */ main { - margin-left: 200px; padding: 1rem; } -/* Responsive main */ -@media (max-width: 900px) { - main.container { - margin: 0; - } -} -@media (max-width: 600px) { - main { - margin-left: 0; - padding: 1rem 0.5rem; - } -} -.menu-years, -.menu-months, -.menu-posts { - list-style: none; - padding-left: 0; - margin: 0; -} -.menu-year { - margin-bottom: 1em; -} -.year-label { - font-weight: bold; - font-size: 1.2em; - display: block; - margin-bottom: 0.5em; -} -.menu-month { - margin-left: 1em; - margin-bottom: 0.5em; -} -.month-label { - font-weight: normal; - display: block; - margin-bottom: 0.3em; -} -.menu-posts { - margin-left: 1em; -} -.menu-posts li { - margin-bottom: 0.3em; -} -.menu-posts a { - text-decoration: none; - color: #007bff; -} -.menu-posts a:hover { - text-decoration: underline; +.layout { + display: flex; + align-items: flex-start; + max-width: 1200px; + margin: 2rem auto; + padding: 0 1.5rem; + gap: 2rem; } header#site-header nav.site-nav { display: flex; @@ -246,7 +187,7 @@ } nav.site-nav .dropdown { position: relative; - display: inline-block; + display: block; } nav.site-nav .dropbtn { display: inline-block; @@ -273,38 +214,12 @@ nav.site-nav .dropdown:hover .dropdown-content { display: block; } -/* Navigation adjustments for small screens */ -@media (max-width: 600px) { - nav.site-nav { - width: 100%; - height: auto; - float: none; - padding: 0.5rem; - text-align: center; - border-bottom: 1px solid #444; - background: #111; - } - nav.site-nav ul { - display: block; - justify-content: center; - flex-wrap: wrap; - gap: 1rem; - padding: 0.5rem 0; - margin: 0; - list-style: none; - } - nav.site-nav ul li { - margin: 0.25rem 0; - border: none; - } - nav.site-nav ul li a { - padding: 0.5rem 1rem; - display: block; - border-radius: 0; - } - nav.site-nav a { - text-transform: capitalize; - } +header#site-header .menu-toggle { + display: none; + background: none; + border: none; + font-size: 1.5em; + padding: 0.5em; } /* Reset */ * { @@ -312,7 +227,6 @@ padding: 0; box-sizing: border-box; } -/* Sidebar */ .sidebar { width: 250px; background-color: #f8f9fa; @@ -321,10 +235,15 @@ font-size: 0.95rem; font-family: Arial, sans-serif; box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05); + position: relative; } -.sidebar h3.menu-year, -.sidebar h4, -.sidebar a { +/* Apply to all lists */ +.sidebar nav ul { + list-style: none; + padding-left: 0; +} +.sidebar h4.month-label, +.sidebar a.post-label { text-transform: capitalize !important; } .sidebar .menu-year { @@ -337,39 +256,34 @@ text-transform: uppercase; letter-spacing: 1px; } -.sidebar nav ul { - list-style: none; - padding-left: 0; -} .sidebar .menu-month { margin-bottom: 1rem; font-weight: 600; color: #555555; } -.sidebar .menu-month ul { +.sidebar .menu-month ul.posts-list { list-style: none; padding-left: 1rem; margin-top: 0.3rem; } -.sidebar .menu-month li a { +.sidebar .menu-month li.post-label a { color: #2c3e50; text-decoration: none; display: block; padding: 0.2rem 0; transition: color 0.2s ease-in-out; } -.sidebar .menu-month li a:hover { +.sidebar .menu-month li.post-label a:hover { color: #1a73e8; text-decoration: underline; } -/* Responsive sidebar */ -@media (max-width: 900px) { - .sidebar { - width: 100%; - border-right: none; - border-bottom: 1px solid #e0e0e0; - margin-bottom: 1rem; - } +.sidebar .menu-year { + margin-bottom: 1em; +} +.sidebar .month-label { + font-weight: normal; + display: block; + margin-bottom: 0.3em; } /* Enhanced TOC Styles */ .toc { @@ -469,47 +383,6 @@ text-transform: uppercase; letter-spacing: 0.5px; } -/* Responsive adjustments */ -@media (max-width: 900px) { - .toc.sticky { - position: relative; - top: auto; - left: auto; - width: auto !important; - max-height: 300px; - z-index: auto; - } -} -@media (max-width: 600px) { - .toc { - padding: 1rem; - margin-bottom: 1.5rem; - } - - .toc-header { - font-size: 1rem; - } - - .toc a { - padding: 0.4rem 0.5rem; - font-size: 0.9rem; - } - - .toc li.h3 { - margin-left: 0.5rem; - } -} -/* Sidebar adjustments for better TOC integration */ -.sidebar { - width: 250px; - background-color: #f8f9fa; - border-right: 1px solid #e0e0e0; - padding: 1em; - font-size: 0.95rem; - font-family: Arial, sans-serif; - box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05); - position: relative; /* Ensure proper positioning context */ -} /* Ensure proper spacing between sidebar sections */ .sidebar nav > * + .toc { margin-top: 2rem; @@ -533,3 +406,113 @@ transform: translateY(0); } } +@media (max-width: 600px) { + main { + padding: 1rem 0.5rem; + } + footer .container { + padding: 1.5rem; + } + footer p { + font-size: 0.8rem; + } + .toc { + padding: 1rem; + margin-bottom: 1.5rem; + } + + .toc-header { + font-size: 1rem; + } + + .toc a { + padding: 0.4rem 0.5rem; + font-size: 0.9rem; + } + + .toc li.h3 { + margin-left: 0.5rem; + } +} +@media (max-width: 900px) { + main { + margin-left: 0; + margin-left: 200px; + } + main.container { + margin: 0; + } + .layout { + flex-direction: column; + } + .toc.sticky { + position: relative; + top: auto; + left: auto; + width: auto !important; + max-height: 300px; + z-index: auto; + } +} +/* Navigation adjustments for small screens */ +@media (max-width: 768px) { + .layout { + flex-direction: column; + } + .sidebar { + width: 100%; + } + header#site-header nav.site-nav { + flex-direction: column; + gap: 0; + position: unset; + top: 3em; + left: 0; + + width: 100%; + height: auto; + float: none; + padding: 0.5rem; + border-bottom: 1px solid #444; + + text-align: left; + } + header#site-header nav.site-nav.hide { + display: none; + } + header#site-header #siteNav.hide a { + display: none; + } + nav.site-nav ul { + display: block; + justify-content: center; + flex-wrap: wrap; + gap: 1rem; + padding: 0.5rem 0; + margin: 0; + list-style: none; + } + nav.site-nav ul li { + margin: 0.25rem 0; + border: none; + } + nav.site-nav ul li a { + padding: 0.5rem 1rem; + display: block; + border-radius: 0; + } + nav.site-nav a { + text-transform: capitalize; + } + header#site-header .menu-toggle { + display: block; + width: 100%; + text-align: left; + } + header#site-header .dropdown { + position: relative; + } + header#site-header .dropdown-content { + position: static; + } +} diff --git a/public/js/nav-toggle.js b/public/js/nav-toggle.js new file mode 100644 index 0000000..ba7c24c --- /dev/null +++ b/public/js/nav-toggle.js @@ -0,0 +1,25 @@ +function setupNavToggle() { + const nav = document.getElementById("siteNav"); + const toggleBtn = document.getElementById("menuToggle"); + + nav.classList.add("hide"); + + if (window.innerWidth <= 768) { + toggleBtn.onclick = toggleMenu; + + document.addEventListener("click", (e) => { + const clickedInside = + nav.contains(e.target) || toggleBtn.contains(e.target); + if (!clickedInside && !nav.classList.contains("hide")) { + nav.classList.add("hide"); + } + }); + } +} + +window.addEventListener("DOMContentLoaded", setupNavToggle); +window.addEventListener("resize", setupNavToggle); + +function toggleMenu() { + document.getElementById("siteNav").classList.toggle("hide"); +} diff --git a/src/css/footer.css b/src/css/footer.css index 42615c5..9a3fc98 100644 --- a/src/css/footer.css +++ b/src/css/footer.css @@ -89,12 +89,3 @@ footer .social-contact p svg:hover { opacity: 1; } - -@media (max-width: 600px) { - footer .container { - padding: 1.5rem; - } - footer p { - font-size: 0.8rem; - } -} diff --git a/src/css/layout.css b/src/css/layout.css index 50873d3..c8794ec 100644 --- a/src/css/layout.css +++ b/src/css/layout.css @@ -1,4 +1,3 @@ -/* Layout */ .layout { display: flex; max-width: 1200px; @@ -6,11 +5,3 @@ padding: 0 1.5rem; gap: 2rem; } - -/* Responsive layout */ -@media (max-width: 900px) { - .layout { - flex-direction: column; - } -} - diff --git a/src/css/main.css b/src/css/main.css index e3e94a6..79b8989 100644 --- a/src/css/main.css +++ b/src/css/main.css @@ -20,23 +20,15 @@ color: #444; } -/* Content area */ main { - margin-left: 200px; padding: 1rem; } -/* Responsive main */ -@media (max-width: 900px) { - main.container { - margin: 0; - } +.layout { + display: flex; + align-items: flex-start; + max-width: 1200px; + margin: 2rem auto; + padding: 0 1.5rem; + gap: 2rem; } - -@media (max-width: 600px) { - main { - margin-left: 0; - padding: 1rem 0.5rem; - } -} - diff --git a/src/css/menu.css b/src/css/menu.css deleted file mode 100644 index 781d695..0000000 --- a/src/css/menu.css +++ /dev/null @@ -1,46 +0,0 @@ -.menu-years, -.menu-months, -.menu-posts { - list-style: none; - padding-left: 0; - margin: 0; -} - -.menu-year { - margin-bottom: 1em; -} - -.year-label { - font-weight: bold; - font-size: 1.2em; - display: block; - margin-bottom: 0.5em; -} - -.menu-month { - margin-left: 1em; - margin-bottom: 0.5em; -} - -.month-label { - font-weight: normal; - display: block; - margin-bottom: 0.3em; -} - -.menu-posts { - margin-left: 1em; -} - -.menu-posts li { - margin-bottom: 0.3em; -} - -.menu-posts a { - text-decoration: none; - color: #007bff; -} - -.menu-posts a:hover { - text-decoration: underline; -} diff --git a/src/css/nav.css b/src/css/nav.css index ae4df01..caad281 100644 --- a/src/css/nav.css +++ b/src/css/nav.css @@ -22,7 +22,7 @@ nav.site-nav .dropdown { position: relative; - display: inline-block; + display: block; } nav.site-nav .dropbtn { @@ -55,60 +55,7 @@ display: block; } -/* Navigation adjustments for small screens */ -@media (max-width: 768px) { - nav.site-nav { - display: none; - flex-direction: column; - gap: 0; - position: absolute; - top: 3em; - left: 0; - - width: 100%; - height: auto; - float: none; - padding: 0.5rem; - text-align: center; - border-bottom: 1px solid #444; - background: #111; - } - .site-nav.active { - display: flex; - } - nav.site-nav ul { - display: block; - justify-content: center; - flex-wrap: wrap; - gap: 1rem; - padding: 0.5rem 0; - margin: 0; - list-style: none; - } - nav.site-nav ul li { - margin: 0.25rem 0; - border: none; - } - nav.site-nav ul li a { - padding: 0.5rem 1rem; - display: block; - border-radius: 0; - } - nav.site-nav a { - text-transform: capitalize; - } - .menu-toggle { - display: inline-block; - } - .dropdown { - position: relative; - } - .dropdown-content { - position: static; - } -} - -.menu-toggle { +header#site-header .menu-toggle { display: none; background: none; border: none; diff --git a/src/css/responsive.css b/src/css/responsive.css new file mode 100644 index 0000000..b41fcad --- /dev/null +++ b/src/css/responsive.css @@ -0,0 +1,113 @@ + +@media (max-width: 600px) { + main { + padding: 1rem 0.5rem; + } + footer .container { + padding: 1.5rem; + } + footer p { + font-size: 0.8rem; + } + .toc { + padding: 1rem; + margin-bottom: 1.5rem; + } + + .toc-header { + font-size: 1rem; + } + + .toc a { + padding: 0.4rem 0.5rem; + font-size: 0.9rem; + } + + .toc li.h3 { + margin-left: 0.5rem; + } +} + +@media (max-width: 900px) { + main { + margin-left: 0; + margin-left: 200px; + } + main.container { + margin: 0; + } + .layout { + flex-direction: column; + } + .toc.sticky { + position: relative; + top: auto; + left: auto; + width: auto !important; + max-height: 300px; + z-index: auto; + } +} + +/* Navigation adjustments for small screens */ +@media (max-width: 768px) { + .layout { + flex-direction: column; + } + .sidebar { + width: 100%; + } + header#site-header nav.site-nav { + flex-direction: column; + gap: 0; + position: unset; + top: 3em; + left: 0; + + width: 100%; + height: auto; + float: none; + padding: 0.5rem; + border-bottom: 1px solid #444; + + text-align: left; + } + header#site-header nav.site-nav.hide { + display: none; + } + header#site-header #siteNav.hide a { + display: none; + } + nav.site-nav ul { + display: block; + justify-content: center; + flex-wrap: wrap; + gap: 1rem; + padding: 0.5rem 0; + margin: 0; + list-style: none; + } + nav.site-nav ul li { + margin: 0.25rem 0; + border: none; + } + nav.site-nav ul li a { + padding: 0.5rem 1rem; + display: block; + border-radius: 0; + } + nav.site-nav a { + text-transform: capitalize; + } + header#site-header .menu-toggle { + display: block; + width: 100%; + text-align: left; + } + header#site-header .dropdown { + position: relative; + } + header#site-header .dropdown-content { + position: static; + } +} diff --git a/src/css/sidebar.css b/src/css/sidebar.css index 835befa..391f93d 100644 --- a/src/css/sidebar.css +++ b/src/css/sidebar.css @@ -1,4 +1,3 @@ -/* Sidebar */ .sidebar { width: 250px; background-color: #f8f9fa; @@ -7,10 +6,17 @@ font-size: 0.95rem; font-family: Arial, sans-serif; box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05); + position: relative; } -.sidebar h3.menu-year, -.sidebar h4, -.sidebar a { + +/* Apply to all lists */ +.sidebar nav ul { + list-style: none; + padding-left: 0; +} + +.sidebar h4.month-label, +.sidebar a.post-label { text-transform: capitalize !important; } .sidebar .menu-year { @@ -24,24 +30,19 @@ letter-spacing: 1px; } -.sidebar nav ul { - list-style: none; - padding-left: 0; -} - .sidebar .menu-month { margin-bottom: 1rem; font-weight: 600; color: #555555; } -.sidebar .menu-month ul { +.sidebar .menu-month ul.posts-list { list-style: none; padding-left: 1rem; margin-top: 0.3rem; } -.sidebar .menu-month li a { +.sidebar .menu-month li.post-label a { color: #2c3e50; text-decoration: none; display: block; @@ -49,18 +50,17 @@ transition: color 0.2s ease-in-out; } -.sidebar .menu-month li a:hover { +.sidebar .menu-month li.post-label a:hover { color: #1a73e8; text-decoration: underline; } -/* Responsive sidebar */ -@media (max-width: 900px) { - .sidebar { - width: 100%; - border-right: none; - border-bottom: 1px solid #e0e0e0; - margin-bottom: 1rem; - } -} +.sidebar .menu-year { + margin-bottom: 1em; +} +.sidebar .month-label { + font-weight: normal; + display: block; + margin-bottom: 0.3em; +} diff --git a/src/css/styles.css b/src/css/styles.css index 18e76f3..190f3cb 100644 --- a/src/css/styles.css +++ b/src/css/styles.css @@ -3,8 +3,8 @@ @import url('header.css'); @import url('layout.css'); @import url('main.css'); -@import url('menu.css'); @import url('nav.css'); @import url('reset.css'); @import url('sidebar.css'); @import url('toc.css'); +@import url('responsive.css'); diff --git a/src/css/toc.css b/src/css/toc.css index 9c2cbd3..5c5c5e1 100644 --- a/src/css/toc.css +++ b/src/css/toc.css @@ -112,50 +112,6 @@ letter-spacing: 0.5px; } -/* Responsive adjustments */ -@media (max-width: 900px) { - .toc.sticky { - position: relative; - top: auto; - left: auto; - width: auto !important; - max-height: 300px; - z-index: auto; - } -} - -@media (max-width: 600px) { - .toc { - padding: 1rem; - margin-bottom: 1.5rem; - } - - .toc-header { - font-size: 1rem; - } - - .toc a { - padding: 0.4rem 0.5rem; - font-size: 0.9rem; - } - - .toc li.h3 { - margin-left: 0.5rem; - } -} - -/* Sidebar adjustments for better TOC integration */ -.sidebar { - width: 250px; - background-color: #f8f9fa; - border-right: 1px solid #e0e0e0; - padding: 1em; - font-size: 0.95rem; - font-family: Arial, sans-serif; - box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05); - position: relative; /* Ensure proper positioning context */ -} - /* Ensure proper spacing between sidebar sections */ .sidebar nav > * + .toc { margin-top: 2rem; diff --git a/src/routes/index.js b/src/routes/index.js index e39b258..696e818 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -27,6 +27,8 @@ }, }) ); +router.get("/favicon.ico", (req, res) => res.status(204).end()); + router.post("/track", analytics); router.use(blog_index); diff --git a/src/views/partials/headers.handlebars b/src/views/partials/headers.handlebars index a5830c9..412769a 100644 --- a/src/views/partials/headers.handlebars +++ b/src/views/partials/headers.handlebars @@ -3,8 +3,8 @@
- -