feat: format

This commit is contained in:
Barrett Ruth 2025-04-15 13:42:57 -04:00
parent 9effc1cab9
commit 24685b693c

View file

@ -8,13 +8,9 @@ class SiteHeader extends HTMLElement {
const isHome = path === "/" || path === "/index.html"; const isHome = path === "/" || path === "/index.html";
const topic = this.getTopic(); const topic = this.getTopic();
const promptText = isHome const promptText = isHome ? "barrett@ruth:~$" : `barrett@ruth:~$ ${topic}`;
? "barrett@ruth:~$"
: `barrett@ruth:~$ ${topic}`;
const clickHandler = isHome const clickHandler = isHome ? "refresh(event)" : "goHome(event)";
? "refresh(event)"
: "goHome(event)";
this.innerHTML = ` this.innerHTML = `
<header> <header>
@ -61,8 +57,8 @@ class SiteFooter extends HTMLElement {
} }
// Register the custom elements // Register the custom elements
customElements.define('site-header', SiteHeader); customElements.define("site-header", SiteHeader);
customElements.define('site-footer', SiteFooter); customElements.define("site-footer", SiteFooter);
// Add styles once when DOM is loaded // Add styles once when DOM is loaded
document.addEventListener("DOMContentLoaded", function () { document.addEventListener("DOMContentLoaded", function () {