199 lines
8.0 KiB
HTML
199 lines
8.0 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.basic.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.style.media_max_width)}" th:inline="css">
|
|
:root {
|
|
--width-theme-media-max: [(${theme.config.style.media_max_width})];
|
|
}
|
|
</style>
|
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.style.font_size)}" th:inline="css">
|
|
:root {
|
|
--size-theme-font: [(${theme.config.style.font_size})];
|
|
}
|
|
</style>
|
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.style.line_height)}" th:inline="css">
|
|
:root {
|
|
--height-theme-line: [(${theme.config.style.line_height})];
|
|
}
|
|
</style>
|
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.style.post_paragraph_spacing)}" th:inline="css">
|
|
:root {
|
|
--spacing-theme-post-paragraph: [(${theme.config.style.post_paragraph_spacing})];
|
|
}
|
|
</style>
|
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.style.post_meta_divider)}" th:inline="css">
|
|
:root {
|
|
--content-theme-post-meta-divider: "[(${theme.config.style.post_meta_divider})]";
|
|
}
|
|
</style>
|
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.style.content_padding)}" th:inline="css">
|
|
:root {
|
|
--spacing-theme-container-padding: [(${theme.config.style.content_padding})];
|
|
--spacing-theme-container-padding-mobile: [(${theme.config.style.content_padding})];
|
|
}
|
|
</style>
|
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.style.list_marker)}" th:inline="css">
|
|
:root {
|
|
--list-theme-marker: [(${theme.config.style.list_marker})];
|
|
}
|
|
</style>
|
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.style.border_width)}" th:inline="css">
|
|
:root {
|
|
--width-theme-border: [(${theme.config.style.border_width})];
|
|
}
|
|
</style>
|
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.style.border_style)}" th:inline="css">
|
|
:root {
|
|
--style-theme-border: [(${theme.config.style.border_style})];
|
|
}
|
|
</style>
|
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.style.table_border_width)}" th:inline="css">
|
|
:root {
|
|
--width-theme-table-border: [(${theme.config.style.table_border_width})];
|
|
}
|
|
</style>
|
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.style.table_border_style)}" th:inline="css">
|
|
:root {
|
|
--style-theme-table-border: [(${theme.config.style.table_border_style})];
|
|
}
|
|
</style>
|
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.style.title_divider_style)}" th:inline="css">
|
|
:root {
|
|
--style-theme-title-divider: [(${theme.config.style.title_divider_style})];
|
|
}
|
|
</style>
|
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.style.default_font)}" th:inline="css">
|
|
:root {
|
|
--family-theme-font: [(${theme.config.style.default_font})];
|
|
}
|
|
</style>
|
|
<script data-no-pjax>
|
|
window.TerminalTheme?.applyCustomCss?.();
|
|
</script>
|
|
<style th:inline="css">
|
|
[# th:each="scheme : ${theme.config.style.custom_color_schemes}"]
|
|
html[data-theme-color-scheme="[(${scheme.id})]"] {
|
|
--color-theme-background: [(${scheme.background})];
|
|
--color-theme-foreground: [(${scheme.foreground})];
|
|
--color-theme-accent: [(${scheme.accent})];
|
|
|
|
[# th:if="${not #strings.isEmpty(scheme.tag)}"]
|
|
--color-theme-tag: [(${scheme.tag})];
|
|
[/]
|
|
|
|
[# th:if="${not #strings.isEmpty(scheme.title)}"]
|
|
--color-theme-title: [(${scheme.title})];
|
|
[/]
|
|
|
|
[# th:if="${not #strings.isEmpty(scheme.meta)}"]
|
|
--color-theme-meta: [(${scheme.meta})];
|
|
[/]
|
|
|
|
[# th:if="${not #strings.isEmpty(scheme.framed)}"]
|
|
--color-theme-framed: [(${scheme.framed})];
|
|
[/]
|
|
|
|
[# th:if="${not #strings.isEmpty(scheme.menu)}"]
|
|
--color-theme-menu: [(${scheme.menu})];
|
|
[/]
|
|
|
|
[# th:if="${not #strings.isEmpty(scheme.header)}"]
|
|
--color-theme-header: [(${scheme.header})];
|
|
[/]
|
|
|
|
[# th:if="${not #strings.isEmpty(scheme.foreground_muted)}"]
|
|
--color-theme-foreground-muted: [(${scheme.foreground_muted})];
|
|
[/]
|
|
|
|
[# th:if="${not #strings.isEmpty(scheme.link)}"]
|
|
--color-theme-link: [(${scheme.link})];
|
|
[/]
|
|
|
|
[# th:if="${not #strings.isEmpty(scheme.muted)}"]
|
|
--color-theme-muted: [(${scheme.muted})];
|
|
[/]
|
|
|
|
[# 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?.style?.custom_font_enable
|
|
and not theme.config?.style?.system_font_enable
|
|
and theme.config?.style?.custom_fonts != null
|
|
and not #lists.isEmpty(theme.config.style.custom_fonts)}">
|
|
|
|
<!-- Preload primary font -->
|
|
<th:block th:with="font=${theme.config.style.custom_fonts[0]}">
|
|
<link rel="preload"
|
|
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.style.custom_fonts}"]
|
|
@font-face {
|
|
font-display: swap;
|
|
font-family: "[(${font.name})]";
|
|
font-style: normal;
|
|
font-weight: 400;
|
|
src: url("[(${font.file})]") format("[(${font.format})]");
|
|
}
|
|
[/]
|
|
|
|
:root {
|
|
--family-theme-font:
|
|
[# th:each="font, stat : ${theme.config.style.custom_fonts}"]
|
|
"[(${font.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.style.fullscreen_layout ? 'fullscreen' : 'normal'},
|
|
data-table-full-width=${theme.config.style.table_full_width ? 'true' : 'false'}">
|
|
<div class="wrapper">
|
|
<div class="container"
|
|
th:attr="style=${theme.config.style.fullscreen_layout or #strings.isEmpty(theme.config.style.max_width) ? null : 'max-width:' + theme.config.style.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>
|