feat: support icon custom

This commit is contained in:
Erzbir
2026-08-22 17:49:28 +08:00
parent 97a8234ef3
commit 27f21f7d2c
5 changed files with 223 additions and 57 deletions
+3
View File
@@ -70,6 +70,9 @@
| 深浅切换按钮 | `header.appearance_switcher_enable` | 在浅色, 深色和跟随系统之间循环 | | 深浅切换按钮 | `header.appearance_switcher_enable` | 在浅色, 深色和跟随系统之间循环 |
| 像素化按钮 | `header.pixel_style_switcher_enable` | 切换像素字体和像素图标 | | 像素化按钮 | `header.pixel_style_switcher_enable` | 切换像素字体和像素图标 |
搜索, 配色切换, 深浅切换和像素化按钮都可以自定义普通图标与像素风格图标. 深浅切换按钮可分别设置浅色, 深色和
跟随系统三种状态的图标. 只设置其中一种自定义图标时, 普通和像素模式都会使用该图标; 两者都留空时才使用主题内置图标.
外观切换顺序为 `浅色 -> 深色 -> 跟随系统`; 图标依次为太阳, 月亮和圆圈. 切换外观模式时会清除访客单独选择的配色, 外观切换顺序为 `浅色 -> 深色 -> 跟随系统`; 图标依次为太阳, 月亮和圆圈. 切换外观模式时会清除访客单独选择的配色,
让浅色和深色模式重新使用主题设置中对应的方案. 让浅色和深色模式重新使用主题设置中对应的方案.
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 817 KiB

+88
View File
@@ -51,24 +51,112 @@ spec:
help: 设置左上角 logo 文本, 不设置默认为 halo 中设置的站点标题 help: 设置左上角 logo 文本, 不设置默认为 halo 中设置的站点标题
- $formkit: checkbox - $formkit: checkbox
name: search_button_enable name: search_button_enable
id: search_button_enable
label: 展示搜索按钮 label: 展示搜索按钮
value: true value: true
help: 搜索组件插件可用时在页头展示搜索按钮 help: 搜索组件插件可用时在页头展示搜索按钮
- $formkit: iconify
if: "$get(search_button_enable).value === true"
key: search-icon
name: search_icon
label: 搜索按钮图标
format: svg
help: 留空时使用自定义像素风格图标; 像素图标也未设置时使用内置图标
- $formkit: iconify
if: "$get(search_button_enable).value === true"
key: search-pixel-icon
name: search_pixel_icon
label: 搜索按钮像素风格图标
format: svg
help: 留空时使用自定义普通图标; 普通图标也未设置时使用内置像素图标
- $formkit: checkbox - $formkit: checkbox
name: color_scheme_switcher_enable name: color_scheme_switcher_enable
id: color_scheme_switcher_enable
label: 展示配色切换按钮 label: 展示配色切换按钮
value: false value: false
help: 在页头展示配色选择下拉框 help: 在页头展示配色选择下拉框
- $formkit: iconify
if: "$get(color_scheme_switcher_enable).value === true"
key: color-scheme-icon
name: color_scheme_icon
label: 配色切换按钮图标
format: svg
help: 留空时使用自定义像素风格图标; 像素图标也未设置时使用内置图标
- $formkit: iconify
if: "$get(color_scheme_switcher_enable).value === true"
key: color-scheme-pixel-icon
name: color_scheme_pixel_icon
label: 配色切换按钮像素风格图标
format: svg
help: 留空时使用自定义普通图标; 普通图标也未设置时使用内置像素图标
- $formkit: checkbox - $formkit: checkbox
name: appearance_switcher_enable name: appearance_switcher_enable
id: appearance_switcher_enable
label: 展示深浅切换按钮 label: 展示深浅切换按钮
value: true value: true
help: 在页头展示浅色, 深色和跟随系统三态切换按钮 help: 在页头展示浅色, 深色和跟随系统三态切换按钮
- $formkit: iconify
if: "$get(appearance_switcher_enable).value === true"
key: appearance-light-icon
name: appearance_light_icon
label: 浅色模式图标
format: svg
help: 留空时使用自定义像素风格图标; 像素图标也未设置时使用内置图标
- $formkit: iconify
if: "$get(appearance_switcher_enable).value === true"
key: appearance-light-pixel-icon
name: appearance_light_pixel_icon
label: 浅色模式像素风格图标
format: svg
help: 留空时使用自定义普通图标; 普通图标也未设置时使用内置像素图标
- $formkit: iconify
if: "$get(appearance_switcher_enable).value === true"
key: appearance-dark-icon
name: appearance_dark_icon
label: 深色模式图标
format: svg
help: 留空时使用自定义像素风格图标; 像素图标也未设置时使用内置图标
- $formkit: iconify
if: "$get(appearance_switcher_enable).value === true"
key: appearance-dark-pixel-icon
name: appearance_dark_pixel_icon
label: 深色模式像素风格图标
format: svg
help: 留空时使用自定义普通图标; 普通图标也未设置时使用内置像素图标
- $formkit: iconify
if: "$get(appearance_switcher_enable).value === true"
key: appearance-system-icon
name: appearance_system_icon
label: 跟随系统模式图标
format: svg
help: 留空时使用自定义像素风格图标; 像素图标也未设置时使用内置图标
- $formkit: iconify
if: "$get(appearance_switcher_enable).value === true"
key: appearance-system-pixel-icon
name: appearance_system_pixel_icon
label: 跟随系统模式像素风格图标
format: svg
help: 留空时使用自定义普通图标; 普通图标也未设置时使用内置像素图标
- $formkit: checkbox - $formkit: checkbox
name: pixel_style_switcher_enable name: pixel_style_switcher_enable
id: pixel_style_switcher_enable
label: 展示像素化按钮 label: 展示像素化按钮
value: true value: true
help: 在页头展示像素风格切换按钮 help: 在页头展示像素风格切换按钮
- $formkit: iconify
if: "$get(pixel_style_switcher_enable).value === true"
key: pixel-style-icon
name: pixel_style_icon
label: 像素化按钮图标
format: svg
help: 留空时使用自定义像素风格图标; 像素图标也未设置时使用内置图标
- $formkit: iconify
if: "$get(pixel_style_switcher_enable).value === true"
key: pixel-style-pixel-icon
name: pixel_style_pixel_icon
label: 像素化按钮像素风格图标
format: svg
help: 留空时使用自定义普通图标; 普通图标也未设置时使用内置像素图标
- group: typography - group: typography
label: 字体与排版 label: 字体与排版
formSchema: formSchema:
+13 -3
View File
@@ -4,15 +4,25 @@
} }
.button-icon { .button-icon {
align-items: center;
justify-content: center;
width: calc(var(--size-theme-font) * 1.85); width: calc(var(--size-theme-font) * 1.85);
height: calc(var(--size-theme-font) * 1.85);
line-height: 0;
> svg {
display: block;
width: 100%;
height: 100%;
}
} }
html[data-pixel-style='false'] .icon-regular { html[data-pixel-style='false'] .icon-regular {
display: inline; display: inline-flex;
} }
html[data-pixel-style='true'] .icon-pixel { html[data-pixel-style='true'] .icon-pixel {
display: inline; display: inline-flex;
} }
#appearance-toggle .appearance-icon { #appearance-toggle .appearance-icon {
@@ -25,5 +35,5 @@ html[data-pixel-style='false'][data-theme-mode='system'] #appearance-toggle .ico
html[data-pixel-style='true'][data-theme-mode='light'] #appearance-toggle .icon-pixel[data-appearance-mode='light'], html[data-pixel-style='true'][data-theme-mode='light'] #appearance-toggle .icon-pixel[data-appearance-mode='light'],
html[data-pixel-style='true'][data-theme-mode='dark'] #appearance-toggle .icon-pixel[data-appearance-mode='dark'], html[data-pixel-style='true'][data-theme-mode='dark'] #appearance-toggle .icon-pixel[data-appearance-mode='dark'],
html[data-pixel-style='true'][data-theme-mode='system'] #appearance-toggle .icon-pixel[data-appearance-mode='system'] { html[data-pixel-style='true'][data-theme-mode='system'] #appearance-toggle .icon-pixel[data-appearance-mode='system'] {
display: inline; display: inline-flex;
} }
+78 -13
View File
@@ -10,20 +10,32 @@
</div> </div>
<button <button
id="search-button" id="search-button"
th:with="regularIcon=${theme.config.header.search_icon != null ? theme.config.header.search_icon.value : null},
pixelIcon=${theme.config.header.search_pixel_icon != null ? theme.config.header.search_pixel_icon.value : null}"
th:attr="aria-label=#{header.search.open}" th:attr="aria-label=#{header.search.open}"
type="button" type="button"
data-header-action="open-search" data-header-action="open-search"
th:if="${theme.config.header.search_button_enable != false and pluginFinder.available('PluginSearchWidget')}"> th:if="${theme.config.header.search_button_enable != false and pluginFinder.available('PluginSearchWidget')}">
<svg class="icon-regular button-icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> <span class="icon-regular button-icon" aria-hidden="true">
<th:block th:if="${not #strings.isEmpty(regularIcon) or not #strings.isEmpty(pixelIcon)}"
th:utext="${not #strings.isEmpty(regularIcon) ? regularIcon : pixelIcon}"></th:block>
<svg th:unless="${not #strings.isEmpty(regularIcon) or not #strings.isEmpty(pixelIcon)}"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path <path
fill="currentColor" fill="currentColor"
d="m19.6 21l-6.3-6.3q-.75.6-1.725.95T9.5 16q-2.725 0-4.612-1.888T3 9.5q0-2.725 1.888-4.612T9.5 3q2.725 0 4.612 1.888T16 9.5q0 1.1-.35 2.075T14.7 13.3l6.3 6.3l-1.4 1.4ZM9.5 14q1.875 0 3.188-1.313T14 9.5q0-1.875-1.313-3.188T9.5 5Q7.625 5 6.312 6.313T5 9.5q0 1.875 1.313 3.188T9.5 14Z" d="m19.6 21l-6.3-6.3q-.75.6-1.725.95T9.5 16q-2.725 0-4.612-1.888T3 9.5q0-2.725 1.888-4.612T9.5 3q2.725 0 4.612 1.888T16 9.5q0 1.1-.35 2.075T14.7 13.3l6.3 6.3l-1.4 1.4ZM9.5 14q1.875 0 3.188-1.313T14 9.5q0-1.875-1.313-3.188T9.5 5Q7.625 5 6.312 6.313T5 9.5q0 1.875 1.313 3.188T9.5 14Z"
/> />
</svg> </svg>
<svg class="icon-pixel button-icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> </span>
<span class="icon-pixel button-icon" aria-hidden="true">
<th:block th:if="${not #strings.isEmpty(regularIcon) or not #strings.isEmpty(pixelIcon)}"
th:utext="${not #strings.isEmpty(pixelIcon) ? pixelIcon : regularIcon}"></th:block>
<svg th:unless="${not #strings.isEmpty(regularIcon) or not #strings.isEmpty(pixelIcon)}"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path fill="currentColor" <path fill="currentColor"
d="M6 2h8v2H6zM4 6V4h2v2zm0 8H2V6h2zm2 2H4v-2h2zm8 0v2H6v-2zm2-2h-2v2h2v2h2v2h2v2h2v-2h-2v-2h-2v-2h-2zm0-8h2v8h-2zm0 0V4h-2v2z"/> d="M6 2h8v2H6zM4 6V4h2v2zm0 8H2V6h2zm2 2H4v-2h2zm8 0v2H6v-2zm2-2h-2v2h2v2h2v2h2v2h2v-2h-2v-2h-2v-2h-2zm0-8h2v8h-2zm0 0V4h-2v2z"/>
</svg> </svg>
</span>
</button> </button>
<div <div
id="color-scheme-picker" id="color-scheme-picker"
@@ -32,18 +44,29 @@
<button <button
id="color-scheme-trigger" id="color-scheme-trigger"
class="color-scheme-trigger" class="color-scheme-trigger"
th:with="regularIcon=${theme.config.header.color_scheme_icon != null ? theme.config.header.color_scheme_icon.value : null},
pixelIcon=${theme.config.header.color_scheme_pixel_icon != null ? theme.config.header.color_scheme_pixel_icon.value : null}"
type="button" type="button"
th:attr="aria-label=#{header.color_scheme.open}" th:attr="aria-label=#{header.color_scheme.open}"
aria-haspopup="listbox" aria-haspopup="listbox"
aria-expanded="false" aria-expanded="false"
aria-controls="color-scheme-menu"> aria-controls="color-scheme-menu">
<svg class="icon-regular button-icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> <span class="icon-regular button-icon" aria-hidden="true">
<th:block th:if="${not #strings.isEmpty(regularIcon) or not #strings.isEmpty(pixelIcon)}"
th:utext="${not #strings.isEmpty(regularIcon) ? regularIcon : pixelIcon}"></th:block>
<svg th:unless="${not #strings.isEmpty(regularIcon) or not #strings.isEmpty(pixelIcon)}"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path fill="currentColor" d="M12.6 3.6c-5.96 0-10.8 4.3-10.8 9.6c0 3.97 3.23 7.2 7.2 7.2h1.98c.98 0 1.62-1 1.25-1.91c-.5-1.22.4-2.59 1.73-2.59h2.24c3.31 0 6-2.69 6-6c0-3.48-4.3-6.3-9.6-6.3ZM6 14.4a1.8 1.8 0 1 1 0-3.6a1.8 1.8 0 0 1 0 3.6Zm3.6-4.8a1.8 1.8 0 1 1 0-3.6a1.8 1.8 0 0 1 0 3.6Zm6 0a1.8 1.8 0 1 1 0-3.6a1.8 1.8 0 0 1 0 3.6Zm3.6 4.8a1.8 1.8 0 1 1 0-3.6a1.8 1.8 0 0 1 0 3.6Z"></path> <path fill="currentColor" d="M12.6 3.6c-5.96 0-10.8 4.3-10.8 9.6c0 3.97 3.23 7.2 7.2 7.2h1.98c.98 0 1.62-1 1.25-1.91c-.5-1.22.4-2.59 1.73-2.59h2.24c3.31 0 6-2.69 6-6c0-3.48-4.3-6.3-9.6-6.3ZM6 14.4a1.8 1.8 0 1 1 0-3.6a1.8 1.8 0 0 1 0 3.6Zm3.6-4.8a1.8 1.8 0 1 1 0-3.6a1.8 1.8 0 0 1 0 3.6Zm6 0a1.8 1.8 0 1 1 0-3.6a1.8 1.8 0 0 1 0 3.6Zm3.6 4.8a1.8 1.8 0 1 1 0-3.6a1.8 1.8 0 0 1 0 3.6Z"></path>
</svg> </svg>
<svg class="icon-pixel button-icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" </span>
viewBox="0 0 24 24"> <span class="icon-pixel button-icon" aria-hidden="true">
<th:block th:if="${not #strings.isEmpty(regularIcon) or not #strings.isEmpty(pixelIcon)}"
th:utext="${not #strings.isEmpty(pixelIcon) ? pixelIcon : regularIcon}"></th:block>
<svg th:unless="${not #strings.isEmpty(regularIcon) or not #strings.isEmpty(pixelIcon)}"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<g fill="currentColor"><path d="M22.29 6.285h1.14V12h-1.14ZM21.143 12h1.147v2.287h-1.147ZM21.143 3.998h1.147v2.287h-1.147ZM20.003 14.288h1.14v1.14h-1.14ZM20.003 2.858h1.14v1.14h-1.14ZM18.855 15.428h1.148v1.147h-1.148ZM18.855 8.573h1.148v4.567h-1.148ZM17.715 16.575h1.14v1.14h-1.14ZM17.715 13.14h1.14v1.148h-1.14ZM17.715 1.718h2.287v1.14h-2.287ZM16.575 17.715h1.14v1.14h-1.14ZM16.575 14.288h1.14v1.14h-1.14ZM15.428 7.433h3.427v1.14h-3.427ZM15.428 18.855h1.147v1.148h-1.147ZM14.288 20.003h1.14v1.14h-1.14ZM12 15.428h4.575v1.147H12ZM14.288 8.573h1.14v1.14h-1.14ZM14.288 6.285h2.287v-1.14h1.14V3.998h-1.14v-1.14h-2.287v1.14h-1.14v1.147h1.14zM13.148 21.143h1.14v1.14h-1.14ZM13.148 9.712h1.14v1.148h-1.14ZM12 10.86h1.148V12H12ZM6.285 22.283h6.863v1.147H6.285ZM10.86 12H12v3.428h-1.14ZM9.712.57h8.003v1.148H9.712ZM10.86 16.575H8.573v1.14h-1.14v2.288h1.14v1.14h2.287v-1.14H12v-2.288h-1.14zM7.433 1.718h2.28v1.14h-2.28ZM7.433 9.712h2.28v-1.14h1.147V6.285H9.713v-1.14h-2.28v1.14H6.284v2.287h1.147zM4.005 15.428h2.28v-1.14h1.148V12H6.285v-1.14h-2.28V12H2.858v2.287h1.147zM5.145 2.858h2.288v1.14H5.145ZM5.145 21.143h1.14v1.14h-1.14ZM2.858 20.003h2.287v1.14H2.858ZM4.005 3.998h1.14v1.147h-1.14ZM2.858 5.145h1.147v2.288H2.858ZM1.718 17.715h1.14v2.287h-1.14ZM1.718 7.433h1.14v2.28h-1.14Z"/><path d="M.57 9.712h1.148v8.003H.57Z"/></g> <g fill="currentColor"><path d="M22.29 6.285h1.14V12h-1.14ZM21.143 12h1.147v2.287h-1.147ZM21.143 3.998h1.147v2.287h-1.147ZM20.003 14.288h1.14v1.14h-1.14ZM20.003 2.858h1.14v1.14h-1.14ZM18.855 15.428h1.148v1.147h-1.148ZM18.855 8.573h1.148v4.567h-1.148ZM17.715 16.575h1.14v1.14h-1.14ZM17.715 13.14h1.14v1.148h-1.14ZM17.715 1.718h2.287v1.14h-2.287ZM16.575 17.715h1.14v1.14h-1.14ZM16.575 14.288h1.14v1.14h-1.14ZM15.428 7.433h3.427v1.14h-3.427ZM15.428 18.855h1.147v1.148h-1.147ZM14.288 20.003h1.14v1.14h-1.14ZM12 15.428h4.575v1.147H12ZM14.288 8.573h1.14v1.14h-1.14ZM14.288 6.285h2.287v-1.14h1.14V3.998h-1.14v-1.14h-2.287v1.14h-1.14v1.147h1.14zM13.148 21.143h1.14v1.14h-1.14ZM13.148 9.712h1.14v1.148h-1.14ZM12 10.86h1.148V12H12ZM6.285 22.283h6.863v1.147H6.285ZM10.86 12H12v3.428h-1.14ZM9.712.57h8.003v1.148H9.712ZM10.86 16.575H8.573v1.14h-1.14v2.288h1.14v1.14h2.287v-1.14H12v-2.288h-1.14zM7.433 1.718h2.28v1.14h-2.28ZM7.433 9.712h2.28v-1.14h1.147V6.285H9.713v-1.14h-2.28v1.14H6.284v2.287h1.147zM4.005 15.428h2.28v-1.14h1.148V12H6.285v-1.14h-2.28V12H2.858v2.287h1.147zM5.145 2.858h2.288v1.14H5.145ZM5.145 21.143h1.14v1.14h-1.14ZM2.858 20.003h2.287v1.14H2.858ZM4.005 3.998h1.14v1.147h-1.14ZM2.858 5.145h1.147v2.288H2.858ZM1.718 17.715h1.14v2.287h-1.14ZM1.718 7.433h1.14v2.28h-1.14Z"/><path d="M.57 9.712h1.148v8.003H.57Z"/></g>
</svg> </svg>
</span>
</button> </button>
<div <div
id="color-scheme-menu" id="color-scheme-menu"
@@ -63,52 +86,94 @@
</div> </div>
<button <button
id="appearance-toggle" id="appearance-toggle"
th:with="lightRegularIcon=${theme.config.header.appearance_light_icon != null ? theme.config.header.appearance_light_icon.value : null},
lightPixelIcon=${theme.config.header.appearance_light_pixel_icon != null ? theme.config.header.appearance_light_pixel_icon.value : null},
darkRegularIcon=${theme.config.header.appearance_dark_icon != null ? theme.config.header.appearance_dark_icon.value : null},
darkPixelIcon=${theme.config.header.appearance_dark_pixel_icon != null ? theme.config.header.appearance_dark_pixel_icon.value : null},
systemRegularIcon=${theme.config.header.appearance_system_icon != null ? theme.config.header.appearance_system_icon.value : null},
systemPixelIcon=${theme.config.header.appearance_system_pixel_icon != null ? theme.config.header.appearance_system_pixel_icon.value : null}"
th:attr="aria-label=#{header.appearance.current}" th:attr="aria-label=#{header.appearance.current}"
th:if="${theme.config.header.appearance_switcher_enable != false}" th:if="${theme.config.header.appearance_switcher_enable != false}"
type="button"> type="button">
<svg class="appearance-icon icon-regular button-icon" data-appearance-mode="light" aria-hidden="true" <span class="appearance-icon icon-regular button-icon" data-appearance-mode="light" aria-hidden="true">
<th:block th:if="${not #strings.isEmpty(lightRegularIcon) or not #strings.isEmpty(lightPixelIcon)}"
th:utext="${not #strings.isEmpty(lightRegularIcon) ? lightRegularIcon : lightPixelIcon}"></th:block>
<svg th:unless="${not #strings.isEmpty(lightRegularIcon) or not #strings.isEmpty(lightPixelIcon)}"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="4" fill="currentColor"/> <circle cx="12" cy="12" r="4" fill="currentColor"/>
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="2" <path fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="2"
d="M12 2v2m0 16v2M4.93 4.93l1.42 1.42m11.3 11.3l1.42 1.42M2 12h2m16 0h2M4.93 19.07l1.42-1.42m11.3-11.3l1.42-1.42"/> d="M12 2v2m0 16v2M4.93 4.93l1.42 1.42m11.3 11.3l1.42 1.42M2 12h2m16 0h2M4.93 19.07l1.42-1.42m11.3-11.3l1.42-1.42"/>
</svg> </svg>
<svg class="appearance-icon icon-pixel button-icon" data-appearance-mode="light" aria-hidden="true" </span>
<span class="appearance-icon icon-pixel button-icon" data-appearance-mode="light" aria-hidden="true">
<th:block th:if="${not #strings.isEmpty(lightRegularIcon) or not #strings.isEmpty(lightPixelIcon)}"
th:utext="${not #strings.isEmpty(lightPixelIcon) ? lightPixelIcon : lightRegularIcon}"></th:block>
<svg th:unless="${not #strings.isEmpty(lightRegularIcon) or not #strings.isEmpty(lightPixelIcon)}"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path fill="currentColor" <path fill="currentColor"
d="M10 0h4v4h-4zM10 20h4v4h-4zM0 10h4v4H0zM20 10h4v4h-4zM4 4h3v3H4zM17 4h3v3h-3zM4 17h3v3H4zM17 17h3v3h-3zM8 8h8v8H8z"/> d="M10 0h4v4h-4zM10 20h4v4h-4zM0 10h4v4H0zM20 10h4v4h-4zM4 4h3v3H4zM17 4h3v3h-3zM4 17h3v3H4zM17 17h3v3h-3zM8 8h8v8H8z"/>
</svg> </svg>
<svg class="appearance-icon icon-regular button-icon" data-appearance-mode="dark" aria-hidden="true" </span>
<span class="appearance-icon icon-regular button-icon" data-appearance-mode="dark" aria-hidden="true">
<th:block th:if="${not #strings.isEmpty(darkRegularIcon) or not #strings.isEmpty(darkPixelIcon)}"
th:utext="${not #strings.isEmpty(darkRegularIcon) ? darkRegularIcon : darkPixelIcon}"></th:block>
<svg th:unless="${not #strings.isEmpty(darkRegularIcon) or not #strings.isEmpty(darkPixelIcon)}"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path fill="currentColor" d="M20.69 15.95A9 9 0 0 1 8.05 3.31a9 9 0 1 0 12.64 12.64Z"/> <path fill="currentColor" d="M20.69 15.95A9 9 0 0 1 8.05 3.31a9 9 0 1 0 12.64 12.64Z"/>
</svg> </svg>
<svg class="appearance-icon icon-pixel button-icon" data-appearance-mode="dark" aria-hidden="true" </span>
<span class="appearance-icon icon-pixel button-icon" data-appearance-mode="dark" aria-hidden="true">
<th:block th:if="${not #strings.isEmpty(darkRegularIcon) or not #strings.isEmpty(darkPixelIcon)}"
th:utext="${not #strings.isEmpty(darkPixelIcon) ? darkPixelIcon : darkRegularIcon}"></th:block>
<svg th:unless="${not #strings.isEmpty(darkRegularIcon) or not #strings.isEmpty(darkPixelIcon)}"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path fill="currentColor" <path fill="currentColor"
d="M8 2h6v2h-2v2h-2v6h2v2h6v-2h2v4h-2v2h-2v2H8v-2H6v-2H4V8h2V4h2z"/> d="M8 2h6v2h-2v2h-2v6h2v2h6v-2h2v4h-2v2h-2v2H8v-2H6v-2H4V8h2V4h2z"/>
</svg> </svg>
<svg class="appearance-icon icon-regular button-icon" data-appearance-mode="system" aria-hidden="true" </span>
<span class="appearance-icon icon-regular button-icon" data-appearance-mode="system" aria-hidden="true">
<th:block th:if="${not #strings.isEmpty(systemRegularIcon) or not #strings.isEmpty(systemPixelIcon)}"
th:utext="${not #strings.isEmpty(systemRegularIcon) ? systemRegularIcon : systemPixelIcon}"></th:block>
<svg th:unless="${not #strings.isEmpty(systemRegularIcon) or not #strings.isEmpty(systemPixelIcon)}"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="8" fill="none" stroke="currentColor" stroke-width="2"/> <circle cx="12" cy="12" r="8" fill="none" stroke="currentColor" stroke-width="2"/>
</svg> </svg>
<svg class="appearance-icon icon-pixel button-icon" data-appearance-mode="system" aria-hidden="true" </span>
<span class="appearance-icon icon-pixel button-icon" data-appearance-mode="system" aria-hidden="true">
<th:block th:if="${not #strings.isEmpty(systemRegularIcon) or not #strings.isEmpty(systemPixelIcon)}"
th:utext="${not #strings.isEmpty(systemPixelIcon) ? systemPixelIcon : systemRegularIcon}"></th:block>
<svg th:unless="${not #strings.isEmpty(systemRegularIcon) or not #strings.isEmpty(systemPixelIcon)}"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path fill="currentColor" <path fill="currentColor"
d="M8 2h8v2h4v4h2v8h-2v4h-4v2H8v-2H4v-4H2V8h2V4h4v2H6v2H4v8h2v2h2v2h8v-2h2v-2h2V8h-2V6h-2V4H8z"/> d="M8 2h8v2h4v4h2v8h-2v4h-4v2H8v-2H4v-4H2V8h2V4h4v2H6v2H4v8h2v2h2v2h8v-2h2v-2h2V8h-2V6h-2V4H8z"/>
</svg> </svg>
</span>
</button> </button>
<button <button
id="pixel-toggle" id="pixel-toggle"
th:with="regularIcon=${theme.config.header.pixel_style_icon != null ? theme.config.header.pixel_style_icon.value : null},
pixelIcon=${theme.config.header.pixel_style_pixel_icon != null ? theme.config.header.pixel_style_pixel_icon.value : null}"
th:attr="aria-label=#{header.pixel_style.toggle}" th:attr="aria-label=#{header.pixel_style.toggle}"
th:if="${theme.config.header.pixel_style_switcher_enable != false}" th:if="${theme.config.header.pixel_style_switcher_enable != false}"
type="button"> type="button">
<svg class="icon-pixel button-icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> <span class="icon-pixel button-icon" aria-hidden="true">
<th:block th:if="${not #strings.isEmpty(regularIcon) or not #strings.isEmpty(pixelIcon)}"
th:utext="${not #strings.isEmpty(pixelIcon) ? pixelIcon : regularIcon}"></th:block>
<svg th:unless="${not #strings.isEmpty(regularIcon) or not #strings.isEmpty(pixelIcon)}"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path fill="currentColor" <path fill="currentColor"
d="M22 17h2v2h-2Zm-1 2h1v2h-1Zm1-6V9h1V6h-4v3h2v4h1zm-3 8h2v1h-2Zm0-8h2v1h-2Zm-1 9h1v2h-1Zm0-8h1v1h-1Zm-1 1h1v1h-1Zm-1 1h1v8h-1Zm1-3V3h1V0h-3v3h1v10ZM16 1h1v1h-1Zm-1 12h1v1h-1Zm-1 1h1v10h-1Zm-4-3h1v13h2V11h1V8h-4v3zm-1 3h1v10H9Zm-1-1h1v1H8Zm-1 5h1v6H7ZM8 7h1V3H6v4h1v6h1V7zM6 17h1v1H6Zm-1 5h1v2H5Zm0-6h1v1H5Zm1-1v-4H2v4h1v1h2v-1Zm-3-1v-1h2v1Zm0 7h2v1H3Zm-1-2h1v2H2Zm-2-2h2v2H0Z"/> d="M22 17h2v2h-2Zm-1 2h1v2h-1Zm1-6V9h1V6h-4v3h2v4h1zm-3 8h2v1h-2Zm0-8h2v1h-2Zm-1 9h1v2h-1Zm0-8h1v1h-1Zm-1 1h1v1h-1Zm-1 1h1v8h-1Zm1-3V3h1V0h-3v3h1v10ZM16 1h1v1h-1Zm-1 12h1v1h-1Zm-1 1h1v10h-1Zm-4-3h1v13h2V11h1V8h-4v3zm-1 3h1v10H9Zm-1-1h1v1H8Zm-1 5h1v6H7ZM8 7h1V3H6v4h1v6h1V7zM6 17h1v1H6Zm-1 5h1v2H5Zm0-6h1v1H5Zm1-1v-4H2v4h1v1h2v-1Zm-3-1v-1h2v1Zm0 7h2v1H3Zm-1-2h1v2H2Zm-2-2h2v2H0Z"/>
</svg> </svg>
<svg class="icon-regular button-icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> </span>
<span class="icon-regular button-icon" aria-hidden="true">
<th:block th:if="${not #strings.isEmpty(regularIcon) or not #strings.isEmpty(pixelIcon)}"
th:utext="${not #strings.isEmpty(regularIcon) ? regularIcon : pixelIcon}"></th:block>
<svg th:unless="${not #strings.isEmpty(regularIcon) or not #strings.isEmpty(pixelIcon)}"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path fill="currentColor" <path fill="currentColor"
d="M22 17h2v2h-2Zm-1 2h1v2h-1Zm1-6V9h1V6h-4v3h2v4h1zm-3 8h2v1h-2Zm0-8h2v1h-2Zm-1 9h1v2h-1Zm0-8h1v1h-1Zm-1 1h1v1h-1Zm-1 1h1v8h-1Zm1-3V3h1V0h-3v3h1v10ZM16 1h1v1h-1Zm-1 12h1v1h-1Zm-1 1h1v10h-1Zm-4-3h1v13h2V11h1V8h-4v3zm-1 3h1v10H9Zm-1-1h1v1H8Zm-1 5h1v6H7ZM8 7h1V3H6v4h1v6h1V7zM6 17h1v1H6Zm-1 5h1v2H5Zm0-6h1v1H5Zm1-1v-4H2v4h1v1h2v-1Zm-3-1v-1h2v1Zm0 7h2v1H3Zm-1-2h1v2H2Zm-2-2h2v2H0Z"/> d="M22 17h2v2h-2Zm-1 2h1v2h-1Zm1-6V9h1V6h-4v3h2v4h1zm-3 8h2v1h-2Zm0-8h2v1h-2Zm-1 9h1v2h-1Zm0-8h1v1h-1Zm-1 1h1v1h-1Zm-1 1h1v8h-1Zm1-3V3h1V0h-3v3h1v10ZM16 1h1v1h-1Zm-1 12h1v1h-1Zm-1 1h1v10h-1Zm-4-3h1v13h2V11h1V8h-4v3zm-1 3h1v10H9Zm-1-1h1v1H8Zm-1 5h1v6H7ZM8 7h1V3H6v4h1v6h1V7zM6 17h1v1H6Zm-1 5h1v2H5Zm0-6h1v1H5Zm1-1v-4H2v4h1v1h2v-1Zm-3-1v-1h2v1Zm0 7h2v1H3Zm-1-2h1v2H2Zm-2-2h2v2H0Z"/>
</svg> </svg>
</span>
</button> </button>
</div> </div>
<nav class="navigation-menu"> <nav class="navigation-menu">