summaryrefslogtreecommitdiff
path: root/article.js
diff options
context:
space:
mode:
Diffstat (limited to 'article.js')
-rw-r--r--article.js20
1 files changed, 9 insertions, 11 deletions
diff --git a/article.js b/article.js
index 292d61c..2a495c4 100644
--- a/article.js
+++ b/article.js
@@ -2,7 +2,7 @@ function addMetadata() {
// Favicon
const favicon = document.createElement("link");
favicon.rel = "icon";
- favicon.href = "/Logo.svg";
+ favicon.href = "https://static.williamsfam.us.com/Logo.svg";
favicon.type = "image/svg+xml";
document.head.appendChild(favicon);
@@ -27,20 +27,19 @@ function addMetadata() {
function addHeader() {
const header = document.querySelector("header");
- // Logo
+ const headerTop = document.createElement("div");
+ headerTop.classList.add("header-top");
+
const logoLink = document.createElement("a");
- logoLink.href = "/writing.html";
+ logoLink.href = "writing";
logoLink.classList.add("header-logo-link");
- header.appendChild(logoLink);
+ headerTop.appendChild(logoLink);
- // Right-side content
const info = document.createElement("div");
info.classList.add("header-info");
-
const h1 = document.createElement("h1");
h1.textContent = document.title;
info.appendChild(h1);
-
const time = document.createElement("time");
const metaDate = document.querySelector('meta[property="article:published_time"]');
const dateString = metaDate.getAttribute("content");
@@ -50,12 +49,11 @@ function addHeader() {
year: "numeric",
timeZone: "UTC"
});
-
time.setAttribute("datetime", dateString);
time.textContent = `Published ${displayDate}`;
info.appendChild(time);
-
- header.appendChild(info);
+ headerTop.appendChild(info);
+ header.appendChild(headerTop);
const hr = document.createElement("hr");
header.appendChild(hr);
@@ -89,4 +87,4 @@ document.addEventListener("DOMContentLoaded", () => {
addMetadata()
addHeader()
addTOC()
-}) \ No newline at end of file
+})