From 401b552b05b8741f06fcc0efea8843a0ae9930eb Mon Sep 17 00:00:00 2001
From: Ethan Marks <87040432+ColourlessSpearmint@users.noreply.github.com>
Date: Mon, 29 Dec 2025 22:28:49 -0500
Subject: [PATCH 1/2] use relative links in header and footer
---
layouts/partials/footer.html | 2 +-
layouts/partials/header.html | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 3730c410..bd5ebd79 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -2,7 +2,7 @@
Website Source
- Ethan Marks, ©2025
+ Ethan Marks, ©2025
Contact
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 9a472e4d..0e354c67 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -1,10 +1,10 @@
From 1a22cd258048ae8079366dfe98490b5c5652de92 Mon Sep 17 00:00:00 2001
From: Ethan Marks <87040432+ColourlessSpearmint@users.noreply.github.com>
Date: Mon, 29 Dec 2025 22:30:44 -0500
Subject: [PATCH 2/2] hardcode ethmarks-components.js
---
.../js/ethmarks-components.js | 36 +++++++++++--------
layouts/partials/publish.html | 2 +-
2 files changed, 23 insertions(+), 15 deletions(-)
rename layouts/partials/ethmarks-components-js.html => assets/js/ethmarks-components.js (54%)
diff --git a/layouts/partials/ethmarks-components-js.html b/assets/js/ethmarks-components.js
similarity index 54%
rename from layouts/partials/ethmarks-components-js.html
rename to assets/js/ethmarks-components.js
index 4c6de4c8..bfc7a96f 100644
--- a/layouts/partials/ethmarks-components-js.html
+++ b/assets/js/ethmarks-components.js
@@ -1,19 +1,21 @@
-{{- $header := partial "header.html" . | jsonify -}}
-{{- $footer := partial "footer.html" . | jsonify -}}
-{{- $js := printf `// Ethmarks Web Components
-// Generated automatically from Hugo partials
+// Ethmarks Web Components
class EthmarksHeader extends HTMLElement {
connectedCallback() {
- this.innerHTML = %s;
+ this.innerHTML = `
+ `;
const activeLink = this.getAttribute('active');
if (activeLink) {
- // Remove any existing active classes
- const navLinks = this.querySelectorAll('nav a');
- navLinks.forEach(link => link.classList.remove('active'));
-
- // Add active class to the specified link by ID
const targetLink = this.querySelector('#nav-' + activeLink.toLowerCase());
if (targetLink) {
targetLink.classList.add('active');
@@ -24,7 +26,16 @@
class EthmarksFooter extends HTMLElement {
connectedCallback() {
- this.innerHTML = %s;
+ this.innerHTML = `
+ `;
const sourceLink = this.getAttribute('source');
if (sourceLink) {
@@ -64,6 +75,3 @@
// Register the custom elements
customElements.define('ethmarks-header', EthmarksHeader);
customElements.define('ethmarks-footer', EthmarksFooter);
-` $header $footer -}}
-{{- $resource := resources.FromString "js/ethmarks-components.js" $js -}}
-{{- $resource.Publish -}}
diff --git a/layouts/partials/publish.html b/layouts/partials/publish.html
index e665cf99..fc4439cc 100644
--- a/layouts/partials/publish.html
+++ b/layouts/partials/publish.html
@@ -1,3 +1,3 @@
{{ partial "publish-media.html" . }}
{{ partial "publish-scss.html" . }}
-{{ partial "ethmarks-components-js.html" . }}
+{{ (resources.Get "js/ethmarks-components.js").Publish }}