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:
1 parent
57bb59e768
commit
29a28ce6d7
12 files changed
+1350
-73
No files matched your search
@@ -1,4 +1,8 @@
|
||||
<?php
|
||||
// Inline-SVG icon helper (replaces the Bootstrap Icons webfont). Included
|
||||
// first so blowdit_icon() is available to head.php and every body template.
|
||||
include(THEME_DIR_PHP.'icons.php');
|
||||
|
||||
// Read the theme from a cookie so the root element can be rendered
|
||||
// pre-coloured. This paints the page in the theme colour from the first
|
||||
// byte of every response, eliminating the white flash between navigations.
|
||||
@@ -165,6 +169,9 @@
|
||||
The anti-flash theme bootstrap stays inline in head.php — it must
|
||||
run before the first paint and so cannot be deferred. -->
|
||||
<script>
|
||||
// Theme directory URL, so the deferred bundle can load self-hosted assets
|
||||
// (highlight.js + its theme CSS) relative to the theme.
|
||||
window.BLOWDIT_THEME_URL = <?php echo json_encode(DOMAIN_THEME); ?>;
|
||||
// Localised UI strings for the deferred bundle. $L->get() falls back to
|
||||
// the key itself when a translation is missing, so this is safe in any language.
|
||||
window.BLOWDIT_I18N = {
|
||||
|
||||
Reference in new issue
Block a user