[object Object]

← back to Microsite Engine

auto-save: 2026-07-17T09:16:00 (2 files) — public/index.html server.js

92c9d7e03c8e5cdb971adf9fc74cd7b5fce3ce9e · 2026-07-17 09:16:04 -0700 · Steve Abrams

Files touched

Diff

commit 92c9d7e03c8e5cdb971adf9fc74cd7b5fce3ce9e
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Fri Jul 17 09:16:04 2026 -0700

    auto-save: 2026-07-17T09:16:00 (2 files) — public/index.html server.js
---
 public/index.html |  1 +
 server.js         | 12 ++++++++++++
 2 files changed, 13 insertions(+)

diff --git a/public/index.html b/public/index.html
index cbce4b0..03a191f 100644
--- a/public/index.html
+++ b/public/index.html
@@ -2,6 +2,7 @@
 <meta charset="utf-8">
 <meta name="viewport" content="width=device-width,initial-scale=1">
 <title>Microsite Engine — DW fleet site generator</title>
+<link rel="icon" href="/favicon.svg" type="image/svg+xml">
 <style>
   :root{ --bg:#12100d; --panel:#1b1813; --ink:#f1ece2; --dim:#9c9484; --accent:#c98a3a; --rule:#332e26; --good:#5fae6b; --warn:#d98a3a; --bad:#d15b5b;
     --serif:'Cormorant Garamond',Georgia,serif; --sans:-apple-system,'Inter',system-ui,sans-serif; --cols:5; }
diff --git a/server.js b/server.js
index ad714e9..2df68b3 100644
--- a/server.js
+++ b/server.js
@@ -176,6 +176,12 @@ function authed(req) {
   return (req.headers['authorization'] || '') === AUTH;
 }
 
+// tiny on-brand favicon (serif "M" monogram in the dashboard's accent) — served
+// inline so there's no binary asset to ship. SVG favicons render in modern Chrome/Safari.
+const FAVICON = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">'
+  + '<rect width="32" height="32" rx="6" fill="#12100d"/>'
+  + '<text x="16" y="23" text-anchor="middle" font-family="Georgia,serif" font-size="20" font-weight="600" fill="#c98a3a">M</text></svg>';
+
 function send(res, code, type, body) { res.writeHead(code, { 'Content-Type': type }); res.end(body); }
 function json(res, code, obj) { send(res, code, 'application/json', JSON.stringify(obj)); }
 
@@ -192,6 +198,12 @@ const server = http.createServer(async (req, res) => {
   const u = new URL(req.url, 'http://localhost');
   const p = u.pathname;
 
+  // favicon — served pre-auth (not sensitive) so browsers stop 404'ing on it
+  if (p === '/favicon.ico' || p === '/favicon.svg') {
+    res.writeHead(200, { 'Content-Type': 'image/svg+xml', 'Cache-Control': 'public, max-age=86400' });
+    return res.end(FAVICON);
+  }
+
   if (!authed(req)) {
     res.writeHead(401, { 'WWW-Authenticate': 'Basic realm="microsite-engine"' });
     return res.end('auth required');

← ed286d5 microsite-engine: prefilled dropdowns + typed autocomplete o  ·  back to Microsite Engine  ·  chore: lint, refactor, v0.2.1 (session close) e01e000 →