dairydemon.net/elements.js

42 lines
805 B
JavaScript
Raw Normal View History

2024-03-20 01:33:14 +00:00
class DDHeader extends HTMLElement {
constructor() {
super();
}
connectedCallback() {
this.innerHTML = `
2024-03-26 03:44:54 +00:00
<header>
2024-08-16 01:00:43 +00:00
<img id="headerimg" src="/watching.jpg" alt="cows with glowing eyes" width=150 height=150 />
2024-03-26 03:44:54 +00:00
<div id="headermain">
<p><a id="homelink" href="/">dairydemon.net</a></p>
<nav>
<ul>
<li><a href="https://social.dairydemon.net">mastodon</a></li>
<li><a href="https://scm.dairydemon.net">git</a></li>
</ul>
</nav>
</div>
</header>
2024-03-20 01:33:14 +00:00
`;
}
}
2024-05-27 19:39:25 +00:00
class DDFooter extends HTMLElement {
constructor() {
super();
}
connectedCallback() {
this.innerHTML = `
<footer>
<ul>
<li><a href="/about.html">about</a></li>
</ul>
</footer>
`;
}
}
2024-03-26 03:44:54 +00:00
customElements.define("dd-header", DDHeader);
2024-05-27 19:39:25 +00:00
customElements.define("dd-footer", DDFooter);