8 Commits

Author SHA1 Message Date
Dome c6b0919eb3 Update readme.md 2026-04-23 23:32:07 +02:00
Dome 4f87ca1475 Update readme.md 2026-04-23 23:30:48 +02:00
Dome 271b7fef7f Update readme.md 2026-04-23 23:30:07 +02:00
Dome 32f17f6e9d Update readme.md 2026-04-23 23:29:14 +02:00
Dome a7c71933a8 cleanup fonts.css 2026-04-23 23:15:33 +02:00
Dome a3f69b4118 Update style.css 2026-04-23 21:14:47 +02:00
Dome 84ebfcadf2 Update fonts.css 2026-04-23 21:13:40 +02:00
Dome 5152784a20 feat(typography): migrate from Google Fonts to local font hosting
feat(typography): migrate from Google Fonts to local font hosting

Replaced external Google Fonts integration with locally hosted font files
for Oswald and Roboto.

- Added local @font-face definitions for Oswald (400, 500, 700)
- Added local @font-face definitions for Roboto (400, 500, 700)
- Removed Google Fonts enqueue and external requests
- Implemented unicode-range optimized font loading (latin subset)
- Fixed font file path inconsistencies causing fallback rendering
- Ensured correct font-weight mapping across all variants
- Maintained existing typography system via CSS variables

Result:
- No external font requests (fonts.googleapis.com / fonts.gstatic.com removed)
- Improved performance and privacy (GDPR compliant)
- Consistent rendering with original Google Fonts appearance
- Full control over font loading and optimization
2026-04-23 21:00:32 +02:00
10 changed files with 219 additions and 66 deletions
+94 -8
View File
@@ -1,35 +1,121 @@
/* =========================
Typography System (Static)
Local Fonts
========================= */
/* OSWALD */
@font-face {
font-family: 'Oswald';
src: url('../fonts/oswald-400.woff2') format('woff2');
font-weight: 400;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Oswald';
src: url('../fonts/oswald-500.woff2') format('woff2');
font-weight: 500;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Oswald';
src: url('../fonts/oswald-700.woff2') format('woff2');
font-weight: 700;
font-style: normal;
font-display: swap;
}
/* ROBOTO */
@font-face {
font-family: 'Roboto';
src: url('../fonts/roboto-400.woff2') format('woff2');
font-weight: 400;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Roboto';
src: url('../fonts/roboto-500.woff2') format('woff2');
font-weight: 500;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Roboto';
src: url('../fonts/roboto-700.woff2') format('woff2');
font-weight: 700;
font-style: normal;
font-display: swap;
}
/* =========================
Typography System
========================= */
:root {
--primary-font: 'Oswald', sans-serif;
--secondary-font: 'Roboto', sans-serif;
--primary-font: 'Oswald', var(--zeitfresser-heading-fallback);
--secondary-font: 'Roboto', var(--zeitfresser-body-fallback);
--site-identity-font-size: 40px;
--font-weight: 400;
--line-height: 1.6;
}
/* Base */
/* =========================
Base Typography
========================= */
body {
font-family: var(--secondary-font);
font-weight: var(--font-weight);
line-height: var(--line-height);
}
/* Headlines */
/* =========================
Headlines
========================= */
h1, h2, h3, h4, h5, h6,
.entry-title {
font-family: var(--primary-font);
font-weight: var(--font-weight);
font-weight: 500;
line-height: 1.3;
}
/* Site Title */
/* =========================
Site Title
========================= */
.site-title,
.site-title a {
font-family: var(--primary-font);
font-size: var(--site-identity-font-size);
font-weight: var(--font-weight);
font-weight: 700;
line-height: 1.2;
}
/* =========================
Content Typography
========================= */
.site-description,
.entry-content,
.post-content,
.inner-article-content {
font-family: var(--secondary-font);
}
html {
font-synthesis: none;
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+13 -24
View File
@@ -201,19 +201,6 @@ function zeitfresser_enqueue_static_colors() {
}
add_action( 'wp_enqueue_scripts', 'zeitfresser_enqueue_static_colors', 20 );
/**
* Load Google Fonts (required for static font setup)
*/
function zeitfresser_enqueue_google_fonts() {
wp_enqueue_style(
'zeitfresser-google-fonts',
'https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;700&family=Roboto:wght@400;500;700&display=swap',
array(),
null
);
}
add_action('wp_enqueue_scripts', 'zeitfresser_enqueue_google_fonts');
function zeitfresser_enqueue_static_fonts() {
wp_enqueue_style(
'zeitfresser-fonts',
@@ -281,18 +268,20 @@ function zeitfresser_cleanup_wp_head() {
add_action( 'init', 'zeitfresser_cleanup_wp_head' );
/**
* Ensure Google Fonts domains are allowed and preconnected
* Preload local fonts for better performance
*/
add_filter('wp_resource_hints', function($urls, $relation_type) {
if ($relation_type === 'preconnect') {
$urls[] = 'https://fonts.googleapis.com';
$urls[] = array(
'href' => 'https://fonts.gstatic.com',
'crossorigin' => 'anonymous',
);
}
return $urls;
}, 10, 2);
function zeitfresser_preload_fonts() {
?>
<link rel="preload" href="<?php echo get_template_directory_uri(); ?>/fonts/oswald-400.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="<?php echo get_template_directory_uri(); ?>/fonts/oswald-500.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="<?php echo get_template_directory_uri(); ?>/fonts/oswald-700.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="<?php echo get_template_directory_uri(); ?>/fonts/roboto-400.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="<?php echo get_template_directory_uri(); ?>/fonts/roboto-500.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="<?php echo get_template_directory_uri(); ?>/fonts/roboto-700.woff2" as="font" type="font/woff2" crossorigin>
<?php
}
add_action('wp_head', 'zeitfresser_preload_fonts', 1);
/**
* Remove front-end dashicons for visitors.
+110 -32
View File
@@ -9,7 +9,7 @@ Zeitfresser Wordpress Theme
</h1>
<h4 align="center">
A performance-optimized, minimalist dark blog theme for WordPress, inspired by the popular Dracula aesthetic.
A performance-optimized, minimalist dark blog theme for WordPress, built for fast and distraction-free technical writing.
</h4>
<h6 align="center">
@@ -30,89 +30,167 @@ A performance-optimized, minimalist dark blog theme for WordPress, inspired by t
## ✨ Overview
Zeitfresser is a custom-built WordPress theme designed with a clear focus: **fast, readable, and distraction-free technical blogging**.
Zeitfresser is a custom-built WordPress theme designed with a clear focus:
**fast, readable, and distraction-free technical blogging**.
Originally based on the popular [Daisy Blog](https://wordpress.org/themes/daisy-blog/) Theme. However with this version the theme has evolved into a fully independent, heavily optimized codebase. Every part of the system has been reworked with performance, clarity, and maintainability in mind. The result is not just a styled theme, but a streamlined platform for long-form content.
Originally based on the popular [Daisy Blog](https://wordpress.org/themes/daisy-blog/) theme, Zeitfresser has evolved into a fully independent and heavily optimized codebase. Every part of the system has been refactored with performance, clarity, and maintainability in mind.
The design follows a minimalist dark aesthetic inspired by Dracula, while placing strong emphasis on typography, structure, and reading flow.
The design follows a minimalist dark aesthetic inspired by Dracula, with a strong emphasis on typography, structure, and reading flow.
## 🚀 Performance & Architecture
Performance is not treated as an afterthought, but as a core design principle. The theme removes unnecessary WordPress overhead and delivers a lean frontend experience with minimal dependencies.
Performance is a core design principle.
Assets are loaded selectively, scripts are deferred where possible, and no heavy libraries are used. The entire frontend runs on lightweight, purpose-built logic, avoiding common bottlenecks such as render-blocking JavaScript or bloated CSS.
- No unnecessary dependencies or heavy libraries
- Minimal JavaScript footprint
- Deferred and optimized script loading
- Lean CSS architecture with reduced redundancy
- Clean DOM structure for predictable rendering
Images are handled intelligently: large uploads are automatically scaled down, unused sizes are removed, and modern formats like WebP are supported when available. Combined with lazy loading and async decoding, this ensures efficient delivery without sacrificing visual quality.
Assets are loaded only when needed, avoiding common bottlenecks such as render-blocking scripts or excessive CSS overhead.
## 🧠 Core Web Vitals
### Key Benefits
Zeitfresser is designed to perform well under real-world conditions.
- No inline styles or dynamically injected CSS
- No dependency on the WordPress Customizer for color rendering
- Consistent color usage across all components
- Easy to maintain and extend
- Fully compatible with modern browsers and rendering pipelines
Layout shifts are avoided by design, the DOM structure is kept clean and predictable, and the Largest Contentful Paint is optimized through prioritization of key elements. The result is a stable and responsive experience that holds up even for long, content-heavy articles.
### Design Approach
The theme follows a dark-first design with carefully selected contrast values:
- Background and surface colors are optimized for readability
- Accent colors are used sparingly to guide attention
- Typography and spacing work together with color to create hierarchy
This approach ensures a clean, stable, and performant visual system without unnecessary complexity.
## 🔤 Local Fonts & Typography System
Zeitfresser uses a fully self-hosted font system:
- **Oswald** (400, 500, 700) for headings
- **Roboto** (400, 500, 700) for body text
Key improvements:
- No external font requests (Google Fonts removed)
- Fonts served locally via optimized `.woff2` files
- Critical font assets are **preloaded** for faster rendering
- Consistent typography across all environments
- Full control over font loading and rendering behavior
The typography system is based on CSS variables and designed to be predictable, maintainable, and visually consistent.
## 🎨 CSS-Based Color System
Zeitfresser uses a fully static, CSS variable-driven color system.
All colors are defined using native CSS custom properties (`:root`) and applied consistently across the entire theme. This replaces traditional PHP-driven or dynamically generated styles with a simpler and more predictable approach.
## ⚡ Core Web Vitals
The theme is optimized for real-world performance:
- Stable layout with no unexpected shifts (CLS-safe)
- Optimized Largest Contentful Paint (LCP)
- Reduced render-blocking resources
- Early font availability through preload strategy
Even long-form articles render quickly and consistently.
## 📑 Floating Table of Contents
One of the core features of the theme is its editorial-style floating Table of Contents.
A core feature of the theme is its editorial-style floating Table of Contents.
The TOC is automatically generated from the article structure and positioned outside the main content area, allowing readers to navigate long articles without breaking reading flow. It follows the scroll position, highlights the current section, and includes a subtle progress indicator.
- Automatically generated from headings
- Positioned outside the main content flow
- Highlights the active section
- Includes a subtle progress indicator
- Smooth scroll behavior
Special care has been taken to ensure that this feature enhances usability without adding visual noise or performance overhead.
Designed to enhance navigation without adding visual noise.
## ⚙️ Customization
The theme integrates directly into the WordPress Customizer, allowing essential behavior to be configured without introducing unnecessary complexity.
The theme integrates cleanly with the WordPress Customizer.
Within the General Options, the Table of Contents can be enabled or disabled globally. Additionally, a threshold can be defined that determines how many headings must be present before the TOC appears. This prevents unnecessary UI elements on shorter posts while keeping the feature effective for longer content.
- Enable/disable TOC globally
- Configure heading thresholds for TOC visibility
- Adjust layout behavior without adding complexity
All options are intentionally minimal and focused.
## 🎨 Design Philosophy
Zeitfresser follows a simple but strict philosophy: **clarity over decoration**.
Zeitfresser follows a strict philosophy:
**clarity over decoration**.
The visual design is intentionally minimal, using a dark color scheme with subtle purple accents to guide attention. Instead of relying on visual noise, the theme uses spacing, typography, and structure to create hierarchy.
- Minimal dark UI with subtle accent colors
- Typography-driven hierarchy
- Clean spacing instead of visual clutter
- Focus on long-form readability
This results in a reading experience that feels focused and calm, even for very long and complex articles.
The result is a calm, distraction-free reading experience.
## 🧹 Code Quality
The theme has been systematically cleaned and refactored.
The codebase has been systematically refactored:
Legacy components and unused features have been removed, CSS conflicts reduced, and functionality centralized where appropriate. The codebase is modular, predictable, and designed for long-term maintainability.
- Legacy components removed
- CSS conflicts minimized
- Modular structure
- No unnecessary abstractions
- No technical debt patterns
No unnecessary dependencies are introduced, and the theme avoids patterns that typically lead to technical debt in WordPress environments.
The theme is designed for long-term maintainability.
## 📱 Responsiveness
The layout adapts cleanly across devices.
While the full editorial experience is optimized for larger screens, essential functionality remains accessible on smaller devices. Features such as the Table of Contents are intelligently disabled when they no longer provide value, ensuring that the mobile experience remains clean and usable.
- Desktop: full editorial experience
- Mobile: simplified, focused layout
- Feature-aware behavior (e.g. TOC disabled when not useful)
All core functionality remains accessible.
## 📦 Installation
To install the theme:
1. Download or clone the repository
2. Upload it to your WordPress installation: /wp-content/themes/
3. Activate it via: Appearance → Themes
2. Upload it to your WordPress installation: `/wp-content/themes/`
3. Activate it via: **Appearance → Themes**
## ⚡ Recommended Setup
For best results, it is recommended to run the theme in a modern environment with caching enabled.
For best performance:
A CDN can further improve delivery performance, especially for global audiences. If migrating from another theme, existing images should be optimized to fully benefit from the built-in image handling.
- Enable caching (server or plugin)
- Use a CDN for global delivery
- Optimize existing media assets
The theme is designed to perform well out of the box, but benefits from a modern hosting setup.
## 🛠 Development & Support
Zeitfresser is actively developed and designed to evolve.
If you need to get support or want to participate in the active development of this software, you can <a href="https://ztfr.eu/matrix">join our Zeitfresser Matrix Community</a> or the <a href="https://look.ztfr.eu/#/#support:ztfr.eu">Development & Support Channel</a> on Matrix.
## 📄 License
GPL v2 or later. Originally based on the [Daisy Blog](https://wordpress.org/themes/daisy-blog/) Theme, now heavily modified and optimized into an independent theme.
GPL v2 or later.
Originally based on the [Daisy Blog](https://wordpress.org/themes/daisy-blog/) theme, now heavily modified into an independent codebase.
## 💬 Final Note
Zeitfresser is built for people who care about performance, readability, and clean engineering.
Zeitfresser is built for developers and writers who value:
It avoids unnecessary complexity and focuses on doing a few things exceptionally well:
**presenting content clearly, loading fast, and staying maintainable.**
- performance
- readability
- clean engineering
It avoids unnecessary complexity and focuses on doing a few things exceptionally well: **presenting content clearly, loading fast, and staying maintainable.**
+1 -1
View File
@@ -5,7 +5,7 @@ Author: Zeitfresser
Author URI: https://ztfr.eu/
Theme URI: https://ztfr.eu/
Description: Zeitfresser Wordpress Theme
Version: 1.5
Version: 1.6
Tested up to: 6.2
Requires PHP: 7.0
License: GNU General Public License v2 or later