239 lines
12 KiB
HTML
239 lines
12 KiB
HTML
<!DOCTYPE html>
|
|
<html
|
|
xmlns:th="https://www.thymeleaf.org"
|
|
th:lang="${#locale.toLanguageTag}"
|
|
th:fragment="html (head, content)">
|
|
<head>
|
|
<meta charset="UTF-8"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
|
<title th:if="${head == null}" th:text="${site.title}">Site title</title>
|
|
<th:block th:replace="~{modules/theme-preferences :: theme-preferences}"/>
|
|
<link data-no-pjax rel="stylesheet" th:href="@{/assets/dist/main.css?v={version}(version=${theme.spec.version})}"/>
|
|
<script data-no-pjax type="module" th:src="@{/assets/dist/main.js?v={version}(version=${theme.spec.version})}"></script>
|
|
<script data-no-pjax type="module" th:if="${theme.config.general.pjax_enable}"
|
|
th:src="@{/assets/dist/libs/pjax.js?v={version}(version=${theme.spec.version})}"></script>
|
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.layout.media_max_width)}" th:inline="css">
|
|
:root {
|
|
--width-theme-media-max: [(${theme.config.layout.media_max_width})];
|
|
}
|
|
</style>
|
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.typography.font_size)}" th:inline="css">
|
|
:root {
|
|
--size-theme-font: [(${theme.config.typography.font_size})];
|
|
}
|
|
</style>
|
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.typography.line_height)}" th:inline="css">
|
|
:root {
|
|
--height-theme-line: [(${theme.config.typography.line_height})];
|
|
}
|
|
</style>
|
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.typography.post_paragraph_spacing)}" th:inline="css">
|
|
:root {
|
|
--spacing-theme-post-paragraph: [(${theme.config.typography.post_paragraph_spacing})];
|
|
}
|
|
</style>
|
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.global_style.post_meta_divider)}" th:inline="css">
|
|
:root {
|
|
--content-theme-post-meta-divider: "[(${theme.config.global_style.post_meta_divider})]";
|
|
}
|
|
</style>
|
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.layout.content_padding)}" th:inline="css">
|
|
:root {
|
|
--spacing-theme-container-padding: [(${theme.config.layout.content_padding})];
|
|
--spacing-theme-container-padding-mobile: [(${theme.config.layout.content_padding})];
|
|
}
|
|
</style>
|
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.global_style.list_style)}" th:inline="css">
|
|
:root {
|
|
--list-theme-style: [(${theme.config.global_style.list_style})];
|
|
}
|
|
</style>
|
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.global_style.border_width)}" th:inline="css">
|
|
:root {
|
|
--width-theme-border: [(${theme.config.global_style.border_width})];
|
|
}
|
|
</style>
|
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.global_style.border_style)}" th:inline="css">
|
|
:root {
|
|
--style-theme-border: [(${theme.config.global_style.border_style})];
|
|
}
|
|
</style>
|
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.global_style.table_border_width)}" th:inline="css">
|
|
:root {
|
|
--width-theme-table-border: [(${theme.config.global_style.table_border_width})];
|
|
}
|
|
</style>
|
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.global_style.table_border_style)}" th:inline="css">
|
|
:root {
|
|
--style-theme-table-border: [(${theme.config.global_style.table_border_style})];
|
|
}
|
|
</style>
|
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.global_style.title_divider_style)}" th:inline="css">
|
|
:root {
|
|
--style-theme-title-divider: [(${theme.config.global_style.title_divider_style})];
|
|
}
|
|
</style>
|
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.typography.default_font)}" th:inline="css">
|
|
:root {
|
|
--family-theme-font: [(${theme.config.typography.default_font})];
|
|
}
|
|
</style>
|
|
<script data-no-pjax>
|
|
window.TerminalTheme?.applyCustomCss?.();
|
|
</script>
|
|
<style th:inline="css">
|
|
[# th:each="scheme : ${theme.config.color_scheme.custom_color_schemes}"]
|
|
html[data-theme-color-scheme="[(${scheme.id})]"] {
|
|
--color-theme-background: [(${scheme.background})];
|
|
--color-theme-text: [(${#strings.isEmpty(scheme.text) ? scheme.foreground : scheme.text})];
|
|
--color-theme-action: [(${#strings.isEmpty(scheme.action) ? scheme.accent : scheme.action})];
|
|
|
|
[# th:if="${not #strings.isEmpty(scheme.text_secondary) or not #strings.isEmpty(scheme.foreground_muted)}"]
|
|
--color-theme-text-secondary: [(${#strings.isEmpty(scheme.text_secondary) ? scheme.foreground_muted : scheme.text_secondary})];
|
|
[/]
|
|
|
|
[# th:if="${not #strings.isEmpty(scheme.text_muted) or not #strings.isEmpty(scheme.muted) or not #strings.isEmpty(scheme.meta)}"]
|
|
--color-theme-text-muted: [(${not #strings.isEmpty(scheme.text_muted) ? scheme.text_muted : (not #strings.isEmpty(scheme.muted) ? scheme.muted : scheme.meta)})];
|
|
[/]
|
|
|
|
[# th:if="${not #strings.isEmpty(scheme.text_inverse)}"]
|
|
--color-theme-text-inverse: [(${scheme.text_inverse})];
|
|
[/]
|
|
|
|
[# th:if="${not #strings.isEmpty(scheme.heading) or not #strings.isEmpty(scheme.title)}"]
|
|
--color-theme-heading: [(${#strings.isEmpty(scheme.heading) ? scheme.title : scheme.heading})];
|
|
[/]
|
|
|
|
[# th:if="${not #strings.isEmpty(scheme.label) or not #strings.isEmpty(scheme.tag)}"]
|
|
--color-theme-label: [(${#strings.isEmpty(scheme.label) ? scheme.tag : scheme.label})];
|
|
[/]
|
|
|
|
[# th:if="${not #strings.isEmpty(scheme.link)}"]
|
|
--color-theme-link: [(${scheme.link})];
|
|
[/]
|
|
|
|
[# th:if="${not #strings.isEmpty(scheme.navigation) or not #strings.isEmpty(scheme.menu)}"]
|
|
--color-theme-navigation: [(${#strings.isEmpty(scheme.navigation) ? scheme.menu : scheme.navigation})];
|
|
[/]
|
|
|
|
[# th:if="${not #strings.isEmpty(scheme.control) or not #strings.isEmpty(scheme.header)}"]
|
|
--color-theme-control: [(${#strings.isEmpty(scheme.control) ? scheme.header : scheme.control})];
|
|
[/]
|
|
|
|
[# th:if="${not #strings.isEmpty(scheme.border)}"]
|
|
--color-theme-border: [(${scheme.border})];
|
|
[/]
|
|
|
|
[# th:if="${not #strings.isEmpty(scheme.border_accent)}"]
|
|
--color-theme-border-accent: [(${scheme.border_accent})];
|
|
[/]
|
|
|
|
[# th:if="${not #strings.isEmpty(scheme.border_emphasis) or not #strings.isEmpty(scheme.framed)}"]
|
|
--color-theme-border-emphasis: [(${#strings.isEmpty(scheme.border_emphasis) ? scheme.framed : scheme.border_emphasis})];
|
|
[/]
|
|
|
|
[# th:if="${not #strings.isEmpty(scheme.selection)}"]
|
|
--color-theme-selection: [(${scheme.selection})];
|
|
[/]
|
|
|
|
[# th:if="${not #strings.isEmpty(scheme.caret) or not #strings.isEmpty(scheme.framed)}"]
|
|
--color-theme-caret: [(${#strings.isEmpty(scheme.caret) ? scheme.framed : scheme.caret})];
|
|
[/]
|
|
|
|
[# th:if="${not #strings.isEmpty(scheme.code_text)}"]
|
|
--color-theme-code-text: [(${scheme.code_text})];
|
|
[/]
|
|
|
|
[# th:if="${not #strings.isEmpty(scheme.code_background)}"]
|
|
--color-theme-code-background: [(${scheme.code_background})];
|
|
[/]
|
|
}
|
|
[/]
|
|
</style>
|
|
<th:block
|
|
th:if="${theme.config?.typography?.custom_font_enable
|
|
and theme.config?.typography?.custom_fonts != null
|
|
and not #lists.isEmpty(theme.config.typography.custom_fonts)}">
|
|
|
|
<!-- Preload primary font -->
|
|
<th:block th:with="font=${theme.config.typography.custom_fonts[0]}">
|
|
<link th:href="${font.file}"
|
|
as="font"
|
|
th:type="${font.format == 'woff2' ? 'font/woff2' :
|
|
(font.format == 'woff' ? 'font/woff' :
|
|
(font.format == 'truetype' ? 'font/ttf' :
|
|
(font.format == 'opentype' ? 'font/otf' : 'application/octet-stream')))}"
|
|
crossorigin/>
|
|
</th:block>
|
|
|
|
<!--/*/
|
|
<style th:inline="css">
|
|
[# th:each="font : ${theme.config.typography.custom_fonts}"]
|
|
@font-face {
|
|
font-display: swap;
|
|
font-family: "[(${font.family_name})]";
|
|
src: local("[(${#strings.isEmpty(font.postscript_name) ? font.family_name : font.postscript_name})]"),
|
|
url("[(${font.file})]") format("[(${font.format})]");
|
|
font-style: [(${font.advanced ? #objects.nullSafe(font.style, 'normal') : 'normal'})];
|
|
font-weight: [(${font.advanced ? #objects.nullSafe(font.weight, '400') : '400'})];
|
|
font-display: [(${font.advanced ? #objects.nullSafe(font.display, 'swap') : 'swap'})];
|
|
[# th:if="${font.advanced && font.unicode_range != null && !#strings.isEmpty(font.unicode_range)}"]
|
|
unicode-range: [(${font.unicode_range})];
|
|
[/]
|
|
[# th:if="${font.advanced && font.width != null && !#strings.isEmpty(font.width)}"]
|
|
font-width: [(${font.width})];
|
|
[/]
|
|
[# th:if="${font.advanced && font.feature_settings != null && !#strings.isEmpty(font.feature_settings)}"]
|
|
font-feature-settings: [(${font.feature_settings})];
|
|
[/]
|
|
[# th:if="${font.advanced && font.variation_settings != null && !#strings.isEmpty(font.variation_settings)}"]
|
|
font-variation-settings: [(${font.variation_settings})];
|
|
[/]
|
|
[# th:if="${font.advanced && font.size_adjust != null && !#strings.isEmpty(font.size_adjust)}"]
|
|
size-adjust: [(${font.size_adjust})];
|
|
[/]
|
|
[# th:if="${font.advanced && font.ascent_override != null && !#strings.isEmpty(font.ascent_override)}"]
|
|
ascent-override: [(${font.ascent_override})];
|
|
[/]
|
|
[# th:if="${font.advanced && font.descent_override != null && !#strings.isEmpty(font.descent_override)}"]
|
|
descent-override: [(${font.descent_override})];
|
|
[/]
|
|
[# th:if="${font.advanced && font.line_gap_override != null && !#strings.isEmpty(font.line_gap_override)}"]
|
|
line-gap-override: [(${font.line_gap_override})];
|
|
[/]
|
|
}
|
|
[/]
|
|
|
|
:root {
|
|
--family-theme-font:
|
|
[# th:each="font, stat : ${theme.config.typography.custom_fonts}"]
|
|
"[(${font.family_name})]"[# th:if="${!stat.last}"],[/]
|
|
[/];
|
|
}
|
|
</style>
|
|
/*/-->
|
|
</th:block>
|
|
<th:block th:if="${head != null}">
|
|
<th:block th:replace="${head}"/>
|
|
</th:block>
|
|
</head>
|
|
|
|
<body th:attr="data-layout-mode=${theme.config.layout.fullscreen_layout ? 'fullscreen' : 'normal'},
|
|
data-table-full-width=${theme.config.layout.table_full_width ? 'true' : 'false'}">
|
|
<div class="wrapper">
|
|
<div class="container"
|
|
th:attr="style=${theme.config.layout.fullscreen_layout or #strings.isEmpty(theme.config.layout.max_width) ? null : 'max-width:' + theme.config.layout.max_width}">
|
|
<header class="header">
|
|
<th:block th:replace="~{modules/header :: header}"/>
|
|
</header>
|
|
<main class="content">
|
|
<th:block th:replace="${content}"/>
|
|
</main>
|
|
</div>
|
|
<footer class="footer">
|
|
<th:block th:replace="~{modules/footer :: footer}"/>
|
|
</footer>
|
|
</div>
|
|
</body>
|
|
</html>
|