feat: support PostScript names for fonts

This commit is contained in:
Erzbir
2026-08-22 14:22:35 +08:00
parent 922dc6ced6
commit fbc44b42fe
7 changed files with 272 additions and 225 deletions
+5 -5
View File
@@ -3,7 +3,7 @@
<div class="header-logo">
<a data-pjax th:href="@{/}">
<div class="logo"
th:text="${#strings.isEmpty(theme.config.basic.logo) ? site.title : theme.config.basic.logo}">
th:text="${#strings.isEmpty(theme.config.header.logo) ? site.title : theme.config.header.logo}">
Blog Title
</div>
</a>
@@ -13,7 +13,7 @@
th:attr="aria-label=#{header.search.open}"
type="button"
data-header-action="open-search"
th:if="${theme.config.style.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">
<path
fill="currentColor"
@@ -28,7 +28,7 @@
<div
id="color-scheme-picker"
class="color-scheme-picker"
th:if="${theme.config.style.color_scheme_switcher_enable != false}">
th:if="${theme.config.header.color_scheme_switcher_enable != false}">
<button
id="color-scheme-trigger"
class="color-scheme-trigger"
@@ -64,7 +64,7 @@
<button
id="appearance-toggle"
th:attr="aria-label=#{header.appearance.current}"
th:if="${theme.config.style.appearance_switcher_enable != false}"
th:if="${theme.config.header.appearance_switcher_enable != false}"
type="button">
<svg class="appearance-icon icon-regular button-icon" data-appearance-mode="light" aria-hidden="true"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
@@ -99,7 +99,7 @@
<button
id="pixel-toggle"
th:attr="aria-label=#{header.pixel_style.toggle}"
th:if="${theme.config.style.pixel_style_switcher_enable != false}"
th:if="${theme.config.header.pixel_style_switcher_enable != false}"
type="button">
<svg class="icon-pixel button-icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path fill="currentColor"
+8 -8
View File
@@ -1,15 +1,15 @@
<th:block th:fragment="theme-preferences">
<script data-no-pjax th:inline="javascript">
window.TerminalThemeConfig = {
darkTheme: /*[[${theme.config.style.dark_color_scheme}]]*/ "dark",
lightTheme: /*[[${theme.config.style.light_color_scheme}]]*/ "light",
customDarkTheme: /*[[${theme.config.style.custom_dark_scheme}]]*/ "",
customLightTheme: /*[[${theme.config.style.custom_light_scheme}]]*/ "",
defaultMode: /*[[${theme.config.style.default_scheme_mode}]]*/ "system",
preferTTL: /*[[${theme.config.style.prefer_ttl ?: 24}]]*/ 24,
pixelStyle: /*[[${theme.config.style.pixel_style}]]*/ false,
darkTheme: /*[[${theme.config.color_scheme.dark_color_scheme}]]*/ "dark",
lightTheme: /*[[${theme.config.color_scheme.light_color_scheme}]]*/ "light",
customDarkTheme: /*[[${theme.config.color_scheme.custom_dark_scheme}]]*/ "",
customLightTheme: /*[[${theme.config.color_scheme.custom_light_scheme}]]*/ "",
defaultMode: /*[[${theme.config.color_scheme.default_scheme_mode}]]*/ "system",
preferTTL: /*[[${theme.config.general.prefer_ttl ?: 24}]]*/ 24,
pixelStyle: /*[[${theme.config.global_style.pixel_style}]]*/ false,
pixelCssHref: /*[[@{/assets/dist/pixel.css?v={version}(version=${theme.spec.version})}]]*/ "",
customCss: /*[[${theme.config.style.custom}]]*/ "",
customCss: /*[[${theme.config.advanced.custom}]]*/ "",
messages: {
currentColorScheme: /*[[#{header.color_scheme.current}]]*/ "Current color scheme",
currentAppearance: /*[[#{header.appearance.current}]]*/ "Current appearance",