Commit b4bc6fa9 authored by jan.koester's avatar jan.koester
Browse files

New theme "aurora", old default theme removed

aurora: glass surfaces (translucent, backdrop blur) over a soft aurora
background, light/dark mode with a visitor toggle (data-theme,
remembered in localStorage, else the system setting), separate
desktop and mobile pages (fold-out navigation on phones).

- every colour comes from blogi's colour system (--blogi-*), the theme
  only derives shades and transparency with color-mix(); its defaults
  for dark and light are the palette "aurora" in src/theme.cpp, so the
  settings show them and can change each of them per mode
- reduced transparency/motion and browsers without backdrop-filter get
  opaque surfaces
- a default logo, styles for blog index, posts, tags, pager, comments,
  forms, search, footer and the cookie banner; survey.css kept
- i18n: I18N_THEME_TOGGLE, I18N_MENU

The old "default" theme (style.css still had merge-conflict markers)
is gone; the example configs, the Debian/FreeBSD default configs, the
editor's docker config and run.sh (THEMEPATH default) use aurora.

Co-Authored-By: default avatarClaude Opus 5.5 <noreply@anthropic.com>
parent 13d6f3f1
Loading
Loading
Loading
Loading
+2 −2
Changes for config.yaml: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
BLOGI:
  TEMPLATE: "/usr/local/share/blogi/themes/default"
  TEMPLATE: "/usr/local/share/blogi/themes/aurora"
  LANGUAGE: "DE"
  STARTPAGE: "/blog/content/index"
  PLUGINDIR:
@@ -96,7 +96,7 @@ BLOGI:
        - "lnx.example.com"
      DB_DRIVER: "sqlite"
      DB_CONNECTION: "/var/lib/blogi/blog-example.db"
      TEMPLATE: "/usr/local/share/blogi/themes/default"
      TEMPLATE: "/usr/local/share/blogi/themes/aurora"
      STARTPAGE: "/blog/content/index"
      URL: "https://blog.example.com"
      PREFIX: "/blog"
+31 −0
Changes for data/themes/aurora/cookie.html: 31 added lines, 0 removed lines.
Original line number Diff line number Diff line
<!DOCTYPE html>
<html lang="de">
  <head>
    <title>${SITE_TITLE}</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="robots" content="noindex">
    <meta name="color-scheme" content="dark light">
    <script>
      (function () {
        try {
          var t = localStorage.getItem('blogi-theme');
          if (t === 'light' || t === 'dark') document.documentElement.setAttribute('data-theme', t);
        } catch (e) {}
      })();
    </script>
    <style>${RESET_CSS}${STYLE_CSS}</style>
  </head>
  <body class="a-cookie">
    <div class="a-aurora" aria-hidden="true"><span></span><span></span><span></span></div>
    <div id="cookiebanner">
      <div id="cookieoverlay"></div>
      <div id="cookiecontent">
        <h1>${I18N_COOKIE_SETTINGS}</h1>
        <form id="cookiesettings">
        </form>
        <button id="cookiesubmit" type="submit" form="cookiesettings" value="Submit" formmethod="post">${I18N_COOKIE_ACCEPT}</button>
      </div>
    </div>
  </body>
</html>
+59 −0
Changes for data/themes/aurora/index.html: 59 added lines, 0 removed lines.
Original line number Diff line number Diff line
<!DOCTYPE html>
<html lang="de">
  <head>
    <title>${SITE_TITLE}</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="robots" content="all">
    <meta name="color-scheme" content="dark light">
    <script>
      (function () {
        try {
          var t = localStorage.getItem('blogi-theme');
          if (t === 'light' || t === 'dark') document.documentElement.setAttribute('data-theme', t);
        } catch (e) {}
      })();
    </script>
    <style>${RESET_CSS}${STYLE_CSS}${SURVEY_CSS}</style>
    <link rel="icon" type="image/x-icon" href="${PREFIX}/theme/public/favicon.ico">
  </head>
  <body class="a-desktop">
    <div class="a-aurora" aria-hidden="true"><span></span><span></span><span></span></div>
    <header id="header">
      <div class="a-bar">
        <a class="a-brand" href="${PREFIX}/">
          <img alt="${SITE_TITLE}" width="${LOGO_WIDTH}" height="${LOGO_HEIGHT}" id="banner" src="${LOGO_URL}">
        </a>
        <nav id="headnav" aria-label="Navigation">
        </nav>
        <button type="button" id="a-theme-toggle" class="a-icon-btn" title="${I18N_THEME_TOGGLE}" aria-label="${I18N_THEME_TOGGLE}"></button>
      </div>
    </header>
    <main id="main">
      <div id="WebEditor"></div>
    </main>
    <div id="ghost"></div>
    <footer id="footer">
      <div class="a-bar">
        <span id="copyrigt">&copy; ${SITE_TITLE}</span>
        <nav id="footernav" aria-label="Footer">
        </nav>
      </div>
    </footer>
    <a id="cookie-icon" href="${PREFIX}/cookie" title="${I18N_COOKIE_SETTINGS}" aria-label="${I18N_COOKIE_SETTINGS}">&#127850;</a>
    <script>
      (function () {
        var btn = document.getElementById('a-theme-toggle');
        if (!btn) return;
        btn.addEventListener('click', function () {
          var root = document.documentElement;
          var cur = root.getAttribute('data-theme');
          if (cur !== 'light' && cur !== 'dark') cur = window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark';
          var next = cur === 'light' ? 'dark' : 'light';
          root.setAttribute('data-theme', next);
          try { localStorage.setItem('blogi-theme', next); } catch (e) {}
        });
      })();
    </script>
  </body>
</html>
+65 −0
Changes for data/themes/aurora/mobile.html: 65 added lines, 0 removed lines.
Original line number Diff line number Diff line
<!DOCTYPE html>
<html lang="de">
  <head>
    <title>${SITE_TITLE}</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
    <meta name="robots" content="all">
    <meta name="color-scheme" content="dark light">
    <script>
      (function () {
        try {
          var t = localStorage.getItem('blogi-theme');
          if (t === 'light' || t === 'dark') document.documentElement.setAttribute('data-theme', t);
        } catch (e) {}
      })();
    </script>
    <style>${RESET_CSS}${STYLE_CSS}${MSTYLE_CSS}${SURVEY_CSS}</style>
    <link rel="icon" type="image/x-icon" href="${PREFIX}/theme/public/favicon.ico">
  </head>
  <body class="a-mobile">
    <div class="a-aurora" aria-hidden="true"><span></span><span></span><span></span></div>
    <header id="header">
      <div class="a-bar">
        <button type="button" id="menunav" class="a-icon-btn a-burger" aria-label="${I18N_MENU}" aria-expanded="false"><span></span><span></span><span></span></button>
        <a class="a-brand" href="${PREFIX}/">
          <img alt="${SITE_TITLE}" width="${LOGO_WIDTH}" height="${LOGO_HEIGHT}" id="banner" src="${LOGO_URL}">
        </a>
        <button type="button" id="a-theme-toggle" class="a-icon-btn" title="${I18N_THEME_TOGGLE}" aria-label="${I18N_THEME_TOGGLE}"></button>
      </div>
      <nav id="headnav" aria-label="Navigation">
      </nav>
    </header>
    <main id="main">
      <div id="WebEditor"></div>
    </main>
    <div id="ghost"></div>
    <footer id="footer">
      <div class="a-bar">
        <span id="copyrigt">&copy; ${SITE_TITLE}</span>
        <nav id="footernav" aria-label="Footer">
        </nav>
      </div>
    </footer>
    <a id="cookie-icon" href="${PREFIX}/cookie" title="${I18N_COOKIE_SETTINGS}" aria-label="${I18N_COOKIE_SETTINGS}">&#127850;</a>
    <script>
      (function () {
        var header = document.getElementById('header');
        var burger = document.getElementById('menunav');
        if (burger) burger.addEventListener('click', function () {
          var open = header.classList.toggle('a-open');
          burger.setAttribute('aria-expanded', open ? 'true' : 'false');
        });
        var btn = document.getElementById('a-theme-toggle');
        if (btn) btn.addEventListener('click', function () {
          var root = document.documentElement;
          var cur = root.getAttribute('data-theme');
          if (cur !== 'light' && cur !== 'dark') cur = window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark';
          var next = cur === 'light' ? 'dark' : 'light';
          root.setAttribute('data-theme', next);
          try { localStorage.setItem('blogi-theme', next); } catch (e) {}
        });
      })();
    </script>
  </body>
</html>
Loading