Files
maoxiang d36050cff7 初始化仓库
初始化仓库
2026-09-09 13:19:09 +08:00

101 lines
4.4 KiB
HTML

<!doctype html>
<html
lang="zh-CN"
xmlns:th="https://www.thymeleaf.org"
th:lang="${#locale.toLanguageTag}"
th:fragment="html (head, content)"
th:with="primaryColor = ${theme.config.global?.primary_color}, brandName = ${site.title}"
>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title th:if="${head == null}" th:text="${brandName}">源蝶工作室</title>
<th:block th:if="${head != null}">
<th:block th:replace="${head}" />
</th:block>
<script type="module" crossorigin src="/themes/theme-mdocs/assets/main-BAX9Eehy.js"></script>
<link rel="stylesheet" crossorigin href="/themes/theme-mdocs/assets/main-OuYKDL0n.css">
</head>
<body
th:style="'--radius:' + (${theme.config.global?.border_radius} ?: '12px') + ';--font-size:' + (${theme.config.global?.font_size} ?: '16px')"
th:attr="data-bg-light=${theme.config.global?.bg_color_light ?: '#ffffff'},data-bg-dark=${theme.config.global?.bg_color_dark ?: '#0d1117'},data-bg-image=${theme.config.global?.background_image},data-primary=${primaryColor}"
th:with="siteLogo = ${not #strings.isEmpty(theme.config.global?.site_logo) ? theme.config.global?.site_logo : site.logo}, showSiteName = ${theme.config.global?.show_site_name != false}, headerMenu = ${menuFinder.getPrimary()}"
>
<header class="site-header">
<div class="container header-inner">
<a class="site-brand" th:href="@{/}">
<img
th:if="${not #strings.isEmpty(siteLogo)}"
th:src="${siteLogo}"
class="brand-logo"
alt="logo"
/>
<span class="brand-name" th:if="${showSiteName}" th:text="${brandName}">源蝶工作室</span>
</a>
<nav class="site-nav" th:if="${headerMenu != null && not #lists.isEmpty(headerMenu.menuItems)}">
<ul class="site-nav-list">
<li class="site-nav-item" th:each="item : ${headerMenu.menuItems}">
<a
class="site-nav-link"
th:href="@{${item.status.href}}"
th:text="${item.status.displayName}"
th:target="${item.spec.target?.value}"
></a>
<ul class="site-nav-dropdown" th:if="${not #lists.isEmpty(item.children)}">
<li th:each="child : ${item.children}">
<a
th:href="@{${child.status.href}}"
th:text="${child.status.displayName}"
th:target="${child.spec.target?.value}"
></a>
</li>
</ul>
</li>
</ul>
</nav>
<button
class="theme-toggle"
id="theme-toggle"
aria-label="切换明暗主题"
>
<svg class="icon-sun" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="5"></circle>
<line x1="12" y1="1" x2="12" y2="3"></line>
<line x1="12" y1="21" x2="12" y2="23"></line>
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
<line x1="1" y1="12" x2="3" y2="12"></line>
<line x1="21" y1="12" x2="23" y2="12"></line>
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
</svg>
<svg class="icon-moon" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
</svg>
</button>
</div>
</header>
<main class="site-main">
<th:block th:replace="${content}" />
</main>
<footer class="site-footer">
<div class="container footer-inner">
<div class="footer-brand">
<div class="footer-brand-name" th:text="${brandName}">源蝶工作室</div>
<p
class="footer-copyright"
th:if="${not #strings.isEmpty(theme.config.footer?.copyright)}"
th:text="${theme.config.footer?.copyright}"
></p>
<p class="footer-icp" th:if="${not #strings.isEmpty(theme.config.footer?.icp)}" th:text="${theme.config.footer?.icp}"></p>
</div>
</div>
<halo:footer />
</footer>
</body>
</html>