← back to Marketing Command Center

public/index.html

54 lines

<!doctype html><html lang="en"><head><meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ctext y='.9em' font-size='90'%3E%F0%9F%93%A3%3C/text%3E%3C/svg%3E">
<title>Marketing Command Center · Designer Wallcoverings</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="/style.css">
<script>
// Credential-safe fetch guard — if this SPA is opened with credentials in the URL
// (saved bookmark / Chrome-remembered basic-auth: https://user:pass@host/…), the
// browser poisons document.baseURI, so any relative or root-relative fetch('/api/…')
// throws "Request cannot be constructed from a URL that includes credentials". Most
// calls here use location.origin (already creds-free), but several are root-relative
// (/api/social/*, /api/calendar/*, /api/templates/*, /api/segments…). Resolve every
// non-absolute request URL against the credential-free location. (Same fix as reels.)
(function () {
  var _fetch = window.fetch.bind(window);
  var cleanBase = function () { return location.origin + location.pathname; };
  window.fetch = function (input, init) {
    try {
      if (typeof input === 'string' && !/^[a-z]+:\/\//i.test(input) && input.indexOf('//') !== 0) {
        input = new URL(input, cleanBase()).href;
      } else if (input instanceof Request && !/^[a-z]+:\/\//i.test(input.url)) {
        input = new Request(new URL(input.url, cleanBase()).href, input);
      }
    } catch (_) { /* fall through to native */ }
    return _fetch(input, init);
  };
})();
</script>
</head>
<body>
<div id="scrim"></div>
<aside id="nav">
  <div class="brand"><span class="logo">DW</span><div><b>Marketing</b><small>Command Center</small></div></div>
  <nav id="tabs"><div class="loading">Loading…</div></nav>
  <div class="navfoot"><span id="health" class="dot">…</span></div>
</aside>
<main id="stage">
  <header id="topbar">
    <button id="burger" aria-label="Toggle menu" title="Toggle menu">
      <span></span><span></span><span></span>
    </button>
    <h1 id="paneltitle">Marketing Command Center</h1>
    <span id="crumb" class="muted"></span>
  </header>
  <section id="panel"><div class="loading">Loading…</div></section>
</main>
<script src="/dw-accounts.js"></script>
<script src="/quickpost.js"></script>
<script src="/cmd-palette.js"></script>
<script src="/app.js"></script>
</body></html>