From 03dfad28ae33e469a5d11fced760bcd38541b695 Mon Sep 17 00:00:00 2001 From: Jim Remsik Date: Sun, 29 Mar 2026 12:36:14 -0500 Subject: [PATCH] Move inline section handler script into app.js to fix CSP violation --- default.hbs | 14 -------------- src/js/app/index.js | 6 ++++++ 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/default.hbs b/default.hbs index ce4a0c5..55bacf0 100644 --- a/default.hbs +++ b/default.hbs @@ -27,20 +27,6 @@ {{> "footer"}} - {{!-- Outputs important scripts - should always be included before closing body tag --}} {{ghost_foot}} diff --git a/src/js/app/index.js b/src/js/app/index.js index f3cec64..a5d6079 100644 --- a/src/js/app/index.js +++ b/src/js/app/index.js @@ -1,6 +1,12 @@ import "../../css/app.css" import './navigation-top'; +document.querySelectorAll('.section-header').forEach((header) => { + header.addEventListener('click', function () { + this.parentNode.classList.toggle('active'); + }); +}); + // LiveReload server if (ENV === 'development') { const script = document.createElement('script');