diff --git a/README.md b/README.md new file mode 100644 index 0000000..c54456e --- /dev/null +++ b/README.md @@ -0,0 +1,67 @@ +# Blowdit + +A clean, minimal theme for [Bludit](https://www.bludit.com) inspired by the +[Blowfish](https://blowfish.page/) Hugo theme. + +  + +## Features + +- 🌗 **Light / dark mode toggle** — remembers the visitor's choice and falls back to the OS preference. +- 🧱 **Monochrome design** — restrained grayscale palette with crisp typography (Inter). +- 👤 **Profile hero** — circular avatar, site title, slogan and social links on the homepage. +- 📚 **Right sidebar** — drop any Bludit sidebar plugin into it (categories, tags, search…). +- ⏱️ **Reading time & dates** shown on the post list and single posts. +- 🔗 **Social icons** in the navbar and hero, using SVG files in `img/` (GitHub, Mastodon, Bluesky, LinkedIn, and more). +- 🏷️ **Tags & categories** rendered as pill badges. +- 📱 Fully responsive, no flash of the wrong theme on load. + +## Installation + +1. Download or clone this repository into your Bludit `bl-themes` directory: + + ``` + bl-themes/blowdit/ + ``` + +2. In the Bludit admin panel go to **Settings → Themes** and activate **Blowdit**. + +3. Add your assets to `blowdit/img/`: + - The social-network SVG icons (`github.svg`, `mastodon.svg`, …) named after each + Bludit social-network key. + - Your avatar as `spleenftw.jpeg` — used for the homepage profile hero **and** the favicon. + To use a different filename, change it in [php/head.php](php/head.php) (favicon) and + [php/home.php](php/home.php) (`$profileImage`). + +## Layout + +``` +blowdit/ +├── index.php Main template +├── metadata.json Theme metadata +├── css/ +│ └── style.css Light & dark styles (CSS custom properties) +├── php/ +│ ├── head.php
, fonts, favicon, anti-FOUC theme script +│ ├── navbar.php Navbar, social SVG icons, theme toggle +│ ├── home.php Profile hero + post listing +│ ├── page.php Single page / post +│ ├── sidebar.php Sidebar plugin container +│ └── footer.php Footer +├── img/ Social SVG icons + avatar (spleenftw.jpeg) +└── languages/ Translations +``` + +## Dark mode + +The colour scheme is driven by CSS custom properties. Light mode lives in +`:root`; dark mode overrides them under `[data-theme="dark"]`. The attribute is +set on `` before paint (in `php/head.php`) to avoid a flash, and the +toggle button in the navbar persists the choice to `localStorage`. + +To tweak the palette, edit the variables at the top of +[css/style.css](css/style.css). + +## License + +[MIT](LICENSE) diff --git a/css/style.css b/css/style.css new file mode 100644 index 0000000..d476164 --- /dev/null +++ b/css/style.css @@ -0,0 +1,821 @@ +/* ======================================== + BLOWDIT — a Bludit theme inspired by Blowfish + Monochrome palette with light & dark modes + ======================================== */ + +/* ---------------------------------------- + THEME TOKENS — Light Mode (default) + ---------------------------------------- */ +:root { + color-scheme: light; + + /* Accent (monochrome: near-black in light mode) */ + --accent: #1f1f1f; + --accent-hover: #000000; + --accent-contrast: #ffffff; + + /* Surfaces */ + --bg-body: #ffffff; + --bg-surface: #ffffff; + --bg-subtle: #f5f5f5; + --bg-hover: #f0f0f0; + + /* Text */ + --text-primary: #1f1f1f; + --text-secondary: #595959; + --text-muted: #8c8c8c; + + /* Borders */ + --border-color: #e5e5e5; + --border-subtle: #ededed; + + /* Chrome (navbar / footer) — fixed dark in both modes */ + --chrome-bg: #1f1f1f; + --chrome-text: rgba(255, 255, 255, 0.92); + --chrome-text-hover: #ffffff; + + /* Shadows */ + --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04); + --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08); + --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.12); + + /* Code */ + --code-bg: #f5f5f5; + --code-text: #1f1f1f; + + /* Spacing scale */ + --space-xs: 0.5rem; + --space-sm: 1rem; + --space-md: 1.5rem; + --space-lg: 2rem; + --space-xl: 3rem; + + /* Radii */ + --radius-sm: 8px; + --radius-md: 12px; + --radius-lg: 18px; + + /* Typography */ + --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; + --font-size-base: 1.05rem; + --font-size-sm: 0.875rem; + --font-size-xs: 0.78rem; + --line-height-base: 1.7; +} + +/* ---------------------------------------- + THEME TOKENS — Dark Mode + ---------------------------------------- */ +[data-theme="dark"] { + color-scheme: dark; + + --accent: #e5e5e5; + --accent-hover: #ffffff; + --accent-contrast: #171717; + + --bg-body: #171717; + --bg-surface: #1f1f1f; + --bg-subtle: #262626; + --bg-hover: #2e2e2e; + + --text-primary: #ededed; + --text-secondary: #b0b0b0; + --text-muted: #808080; + + --border-color: #333333; + --border-subtle: #2a2a2a; + + --chrome-bg: #0f0f0f; + --chrome-text: rgba(255, 255, 255, 0.88); + --chrome-text-hover: #ffffff; + + --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4); + --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45); + --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.5); + + --code-bg: #262626; + --code-text: #ededed; +} + +/* ======================================== + BASE + ======================================== */ +html { + position: relative; + min-height: 100%; + scroll-behavior: smooth; +} + +body { + font-family: var(--font-sans); + padding-top: 56px; + margin-bottom: 64px; + background-color: var(--bg-body); + color: var(--text-primary); + font-size: var(--font-size-base); + line-height: var(--line-height-base); + transition: background-color 0.25s ease, color 0.25s ease; + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; +} + +img { + max-width: 100%; + height: auto; +} + +::selection { + background: var(--accent); + color: var(--accent-contrast); +} + +/* ======================================== + LINKS + ======================================== */ +a { + color: var(--text-primary); + text-decoration: none; + transition: color 0.2s ease; +} + +a:hover { + color: var(--text-secondary); + text-decoration: none; +} + +a:focus-visible { + outline: 2px solid var(--accent); + outline-offset: 2px; + border-radius: 2px; +} + +/* ======================================== + TYPOGRAPHY + ======================================== */ +h1, h2, h3, h4, h5, h6 { + color: var(--text-primary); + font-weight: 700; + line-height: 1.25; + letter-spacing: -0.02em; +} + +h1.title { + font-size: 2.4rem; + margin-bottom: var(--space-md); +} + +h2.title { + font-size: 1.85rem; + margin-bottom: var(--space-sm); +} + +.content { + margin-top: var(--space-md); +} + +.content h2 { font-size: 1.6rem; margin-top: var(--space-xl); } +.content h3 { font-size: 1.3rem; margin-top: var(--space-lg); } + +.content p, +.content ul, +.content ol { + margin-bottom: var(--space-md); +} + +.content img { + border-radius: var(--radius-md); + margin: var(--space-md) 0; +} + +hr { + border: none; + border-top: 1px solid var(--border-color); + margin: var(--space-xl) 0; +} + +/* ======================================== + FORMS + ======================================== */ +input, +textarea, +select, +.form-control { + background-color: var(--bg-surface); + color: var(--text-primary); + border: 1px solid var(--border-color); + border-radius: var(--radius-sm); +} + +.form-control:focus { + background-color: var(--bg-surface); + color: var(--text-primary); + border-color: var(--accent); + box-shadow: 0 0 0 3px rgba(127, 127, 127, 0.18); +} + +/* ======================================== + CODE + ======================================== */ +pre, +code { + background: var(--code-bg); + color: var(--code-text); + border-radius: var(--radius-sm); + font-family: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; + transition: background-color 0.25s ease, color 0.25s ease; +} + +pre { + border: 1px solid var(--border-color); + border-left: 3px solid var(--accent); + padding: var(--space-md); + overflow-x: auto; +} + +code { + display: inline-block; + padding: 0.15em 0.45em; + font-size: 0.875em; +} + +pre code { + padding: 0; + background: transparent; + border: none; +} + +/* ======================================== + TABLES + ======================================== */ +table { + empty-cells: show; + border: 1px solid var(--border-color); + width: 100%; + font-size: 0.95em; + margin-bottom: var(--space-md); + border-radius: var(--radius-sm); + overflow: hidden; + border-collapse: collapse; +} + +thead { + background: var(--bg-subtle); + color: var(--text-primary); + text-align: left; +} + +tbody tr { + transition: background-color 0.2s ease; +} + +tbody tr:hover { + background-color: var(--bg-hover); +} + +th, td { + padding: 0.75em 1em; + border-bottom: 1px solid var(--border-color); +} + +/* ======================================== + BLOCKQUOTES + ======================================== */ +blockquote { + padding: var(--space-md) var(--space-lg); + margin: 0 0 var(--space-lg) 0; + border-left: 4px solid var(--accent); + background-color: var(--bg-subtle); + border-radius: var(--radius-sm); + color: var(--text-secondary); + font-style: italic; +} + +/* ======================================== + NAVBAR + ======================================== */ +.navbar-modern { + background: var(--chrome-bg) !important; + box-shadow: var(--shadow-sm); + padding-top: 0.5rem; + padding-bottom: 0.5rem; + min-height: 56px; + transition: background-color 0.25s ease; +} + +.navbar-brand { + font-weight: 700; + font-size: 1.1rem; + letter-spacing: -0.01em; +} + +.navbar-brand .text-white { + color: #ffffff !important; +} + +.navbar .nav-link { + font-size: 0.85rem; + font-weight: 500; + color: var(--chrome-text) !important; + padding: 0.4rem 0.85rem !important; + border-radius: var(--radius-sm); + transition: background-color 0.2s ease, color 0.2s ease; +} + +.navbar .nav-link:hover { + background-color: rgba(255, 255, 255, 0.12); + color: var(--chrome-text-hover) !important; +} + +.navbar .nav-link.active { + background-color: rgba(255, 255, 255, 0.18); + color: var(--chrome-text-hover) !important; +} + +.navbar .nav-link .bi { + font-size: 1.15rem; + margin-right: 0; + vertical-align: -0.05em; +} + +/* Social SVG icons (img/slogan(); ?>
+ description()) : ?> +description(); ?>
+ + + + + + +