Add inline SVG icons for UI and theme picker

This commit introduces a new PHP file `icons.php` that defines a set of inline SVG icons to replace the Bootstrap Icons webfont. The icons include common UI elements such as calendar, clock, folder, and tag, as well as theme picker icons like sun, moon, snow, droplet, cup, and half. The SVGs are designed to scale with existing font-size rules and are accessible via the `blowdit_icon` function. Additionally, a mapping function `blowdit_theme_icon` is provided to associate theme keys with their corresponding icon names.
This commit is contained in:
interlope committed 2026-06-02 00:08:11 +02:00
1 parent 57bb59e768
commit 29a28ce6d7
12 files changed
+1350 -73

No files matched your search

+10 -2
View File
@@ -16,6 +16,11 @@
?>
<meta name="theme-color" content="<?php echo $blowditChrome; ?>">
<?php if (!empty($blowditIsArticle) && $page->coverImage()): ?>
<!-- Preload the article cover image (typically the LCP element) -->
<link rel="preload" as="image" href="<?php echo htmlspecialchars($page->coverImage(true), ENT_QUOTES, 'UTF-8'); ?>" fetchpriority="high">
<?php endif ?>
<!-- Set the colour theme as early as possible to avoid a white flash.
Sets data-theme AND paints the html background/color-scheme inline, so the
very first frame (before style.css loads) already uses the theme colour. -->
@@ -157,6 +162,9 @@
}
?>
<!-- RSS feed auto-discovery (RSS plugin serves /rss.xml) -->
<link rel="alternate" type="application/rss+xml" title="<?php echo htmlspecialchars($site->title(), ENT_QUOTES, 'UTF-8'); ?>" href="<?php echo rtrim(Theme::siteUrl(), '/') . '/rss.xml'; ?>">
<!-- Include Favicon -->
<?php echo Theme::favicon('img/favicon.png'); ?>
@@ -170,8 +178,8 @@
<!-- Include Bootstrap CSS file bootstrap.css -->
<?php echo Theme::cssBootstrap(); ?>
<!-- Include CSS Bootstrap ICONS file from Bludit Core -->
<?php echo Theme::cssBootstrapIcons(); ?>
<!-- Bootstrap Icons webfont removed: the few icons used are inline SVGs
(see php/icons.php + blowdit.js), saving ~120 KB font + ~80 KB CSS. -->
<!-- Include CSS Styles from this theme (cache-busted by file mtime) -->
<?php