348 lines
15 KiB
HTML
348 lines
15 KiB
HTML
<!doctype html>
|
||
<html
|
||
lang="zh-CN"
|
||
xmlns:th="https://www.thymeleaf.org"
|
||
th:lang="${#locale.toLanguageTag}"
|
||
class="color-scheme-auto"
|
||
data-color-scheme="auto"
|
||
>
|
||
<head>
|
||
<meta charset="UTF-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
|
||
<title th:text="|文档中心 - ${site.title}|">文档中心</title>
|
||
|
||
<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=${theme.config.global?.primary_color}"
|
||
th:with="siteLogo = ${not #strings.isEmpty(theme.config.global?.site_logo) ? theme.config.global?.site_logo : site.logo}, siteLogoDark = ${not #strings.isEmpty(theme.config.global?.site_logo_dark) ? theme.config.global?.site_logo_dark : siteLogo}, showSiteName = ${theme.config.global?.show_site_name != false}"
|
||
>
|
||
<header class="site-header">
|
||
<div
|
||
class="container header-inner"
|
||
th:with="primaryMenu = ${menuFinder.getPrimary()}"
|
||
>
|
||
<a class="site-brand" th:href="@{/}">
|
||
<img
|
||
th:if="${not #strings.isEmpty(siteLogo)}"
|
||
th:src="${siteLogo}"
|
||
th:attr="data-logo-light=${siteLogo},data-logo-dark=${siteLogoDark}"
|
||
class="brand-logo"
|
||
alt="logo"
|
||
/>
|
||
<span class="brand-name" th:if="${showSiteName}" th:text="${site.title}">源蝶工作室</span>
|
||
</a>
|
||
|
||
<nav class="primary-nav" th:if="${not #lists.isEmpty(theme.config.nav?.doc_nav_buttons)}">
|
||
<a
|
||
class="primary-nav-link"
|
||
th:each="btn : ${theme.config.nav?.doc_nav_buttons ?: T(java.util.Collections).emptyList()}"
|
||
th:href="@{${btn.url ?: '/'}}"
|
||
th:text="${btn.title}"
|
||
></a>
|
||
</nav>
|
||
|
||
<div
|
||
class="header-right"
|
||
>
|
||
<button
|
||
class="search-trigger"
|
||
id="search-trigger"
|
||
type="button"
|
||
th:if="${pluginFinder.available('PluginSearchWidget')}"
|
||
onclick="SearchWidget.open()"
|
||
aria-label="搜索"
|
||
>
|
||
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||
<circle cx="11" cy="11" r="8"></circle>
|
||
<line x1="21" y1="21" x2="16.65" y2="16.65"></line>
|
||
</svg>
|
||
<span class="search-trigger-text">搜索</span>
|
||
<kbd class="search-trigger-kbd">⌘K</kbd>
|
||
</button>
|
||
|
||
<button
|
||
class="mobile-menu-toggle"
|
||
id="mobile-menu-toggle"
|
||
type="button"
|
||
th:if="${primaryMenu != null && not #lists.isEmpty(primaryMenu.menuItems)}"
|
||
aria-label="打开菜单"
|
||
aria-controls="header-menu-panel"
|
||
aria-expanded="false"
|
||
>
|
||
<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||
</svg>
|
||
</button>
|
||
|
||
<div
|
||
class="header-menu-wrap"
|
||
id="header-menu-panel"
|
||
th:if="${primaryMenu != null && not #lists.isEmpty(primaryMenu.menuItems)}"
|
||
>
|
||
<th:block th:replace="~{header-menu :: menu}" />
|
||
</div>
|
||
|
||
<div
|
||
class="header-divider"
|
||
aria-hidden="true"
|
||
th:if="${primaryMenu != null && not #lists.isEmpty(primaryMenu.menuItems)}"
|
||
></div>
|
||
|
||
<div class="header-actions">
|
||
<th:block
|
||
th:if="${not #lists.isEmpty(theme.config.nav?.user_buttons)}"
|
||
th:each="btn : ${theme.config.nav?.user_buttons ?: T(java.util.Collections).emptyList()}"
|
||
>
|
||
<a
|
||
class="header-action-btn header-icon-btn header-action-icon-btn"
|
||
th:if="${not #strings.isEmpty(btn.svg)}"
|
||
th:href="@{${btn.url ?: '#'}}"
|
||
th:title="${btn.label}"
|
||
th:style="${not #strings.isEmpty(btn.color)} ? '--icon-color:' + btn.color : ''"
|
||
>
|
||
<span class="header-action-icon" th:utext="${btn.svg}"></span>
|
||
</a>
|
||
</th:block>
|
||
|
||
<button
|
||
class="theme-toggle header-icon-btn"
|
||
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>
|
||
|
||
<th:block th:replace="~{user-menu :: user-menu}" />
|
||
</div>
|
||
</div>
|
||
<div
|
||
class="mobile-menu-backdrop"
|
||
id="mobile-menu-backdrop"
|
||
th:if="${primaryMenu != null && not #lists.isEmpty(primaryMenu.menuItems)}"
|
||
></div>
|
||
</div>
|
||
</header>
|
||
|
||
<main class="site-main">
|
||
|
||
|
||
|
||
<!-- Docsme:/docs 项目列表页 -->
|
||
<th:block
|
||
th:if="${pluginFinder.available('plugin-docsme') and projects != null and theme.config.docsme?.plugin_enabled != false}"
|
||
>
|
||
<div class="mdocs-plugin-list mdocs-docsme-list">
|
||
<div class="container">
|
||
<header class="mdocs-plugin-list-head">
|
||
<h1 th:text="${not #strings.isEmpty(theme.config.docsme?.archive_title) ? theme.config.docsme?.archive_title : '文档'}">文档</h1>
|
||
<p th:text="${not #strings.isEmpty(theme.config.docsme?.archive_description) ? theme.config.docsme?.archive_description : '所有 Docsme 文档项目'}">所有 Docsme 文档项目</p>
|
||
</header>
|
||
|
||
<div
|
||
class="mdocs-plugin-card-grid"
|
||
th:if="${not #lists.isEmpty(projects)}"
|
||
>
|
||
<a
|
||
class="mdocs-plugin-card mdocs-project-card"
|
||
th:each="project : ${projects}"
|
||
th:href="${project.status.permalink}"
|
||
>
|
||
<span
|
||
class="mdocs-plugin-card-banner"
|
||
th:if="${not #strings.isEmpty(project.spec.icon)}"
|
||
>
|
||
<img th:src="${project.spec.icon}" th:alt="${project.spec.displayName}" />
|
||
</span>
|
||
<span class="mdocs-plugin-card-body">
|
||
<span class="mdocs-plugin-card-title" th:text="${project.spec.displayName}"></span>
|
||
<span class="mdocs-plugin-card-meta">
|
||
<span th:text="|共 ${project.status.totalDocs ?: 0} 篇文档|">共 0 篇文档</span>
|
||
<span class="mdocs-plugin-card-link" th:text="${project.status.permalink}"></span>
|
||
</span>
|
||
<span class="mdocs-plugin-card-action">访问项目 →</span>
|
||
</span>
|
||
</a>
|
||
</div>
|
||
|
||
<p class="mdocs-plugin-empty" th:if="${#lists.isEmpty(projects)}">
|
||
暂无 Docsme 文档项目。
|
||
</p>
|
||
</div>
|
||
</div>
|
||
</th:block>
|
||
|
||
<section class="section" th:if="${projects != null and theme.config.docsme?.plugin_enabled == false}">
|
||
<div class="container">
|
||
<p class="mdocs-plugin-empty">Docsme 适配页面已关闭,请在主题设置中开启后再访问。</p>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- MiniDocs:/docs 知识库列表页 -->
|
||
<th:block th:if="${pluginFinder.available('halo-plugin-minidocs') and projects == null}">
|
||
<div class="mdocs-plugin-list mdocs-minidocs-list">
|
||
<div class="container" th:with="kbResult = ${minidocsFinder.listKnowledgeBases(1, 1000)}">
|
||
<header class="mdocs-plugin-list-head">
|
||
<h1>知识库</h1>
|
||
<p>全部 MiniDocs 知识库</p>
|
||
</header>
|
||
|
||
<div class="mdocs-plugin-card-grid">
|
||
<a
|
||
class="mdocs-plugin-card mdocs-kb-card"
|
||
th:each="kb : ${kbResult.items}"
|
||
th:href="@{'/docs/view/' + ${not #strings.isEmpty(kb.spec.slug) ? kb.spec.slug : kb.metadata.name}}"
|
||
>
|
||
<span class="mdocs-plugin-card-banner" th:if="${not #strings.isEmpty(kb.spec.cover)}">
|
||
<img th:src="${kb.spec.cover}" th:alt="${kb.spec.displayName}" />
|
||
</span>
|
||
<span
|
||
class="mdocs-plugin-card-banner mdocs-plugin-card-fallback"
|
||
th:unless="${not #strings.isEmpty(kb.spec.cover)}"
|
||
>
|
||
<span
|
||
th:text="${not #strings.isEmpty(kb.spec.displayName) ? #strings.substring(kb.spec.displayName, 0, 1) : '库'}"
|
||
>库</span>
|
||
</span>
|
||
<span class="mdocs-plugin-card-body">
|
||
<span class="mdocs-plugin-card-title" th:text="${kb.spec.displayName}"></span>
|
||
<span
|
||
class="mdocs-plugin-card-desc"
|
||
th:if="${not #strings.isEmpty(kb.spec.description)}"
|
||
th:text="${kb.spec.description}"
|
||
></span>
|
||
<span class="mdocs-plugin-card-meta">
|
||
<span th:text="|共 ${kb.status != null and kb.status.docCount != null ? kb.status.docCount : 0} 篇文档|">共 0 篇文档</span>
|
||
</span>
|
||
</span>
|
||
</a>
|
||
</div>
|
||
|
||
<p class="mdocs-plugin-empty" th:if="${#lists.isEmpty(kbResult.items)}">
|
||
暂无 MiniDocs 知识库。
|
||
</p>
|
||
</div>
|
||
</div>
|
||
</th:block>
|
||
|
||
</main>
|
||
|
||
<footer
|
||
class="site-footer"
|
||
th:with="separateFooterLogo = ${theme.config.footer?.footer_separate_logo == true}, footerLogo = ${separateFooterLogo ? (not #strings.isEmpty(theme.config.footer?.footer_logo) ? theme.config.footer?.footer_logo : siteLogo) : siteLogo}, footerLogoDark = ${separateFooterLogo ? (not #strings.isEmpty(theme.config.footer?.footer_logo_dark) ? theme.config.footer?.footer_logo_dark : (not #strings.isEmpty(theme.config.footer?.footer_logo) ? theme.config.footer?.footer_logo : siteLogoDark)) : siteLogoDark}, showFooterName = ${theme.config.footer?.show_footer_name != false}"
|
||
>
|
||
<div class="footer-container">
|
||
<th:block
|
||
th:if="${not #lists.isEmpty(theme.config.footer?.footer_menus)}"
|
||
>
|
||
<div class="footer-menu-columns">
|
||
<th:block
|
||
th:each="menuName : ${theme.config.footer?.footer_menus}"
|
||
>
|
||
<th:block
|
||
th:with="footerMenu = ${not #strings.isEmpty(menuName) ? menuFinder.getByName(menuName) : null}"
|
||
>
|
||
<div
|
||
class="footer-menu-col"
|
||
th:if="${footerMenu != null and not #lists.isEmpty(footerMenu.menuItems)}"
|
||
>
|
||
<h4 th:text="${footerMenu.spec.displayName}"></h4>
|
||
<ul>
|
||
<li th:each="menuItem : ${footerMenu.menuItems}">
|
||
<a
|
||
th:href="@{${menuItem.status.href}}"
|
||
th:text="${menuItem.status.displayName}"
|
||
th:target="${menuItem.spec.target?.value}"
|
||
th:rel="${menuItem.spec.target?.value == '_blank'} ? 'noopener' : null"
|
||
></a>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</th:block>
|
||
</th:block>
|
||
</div>
|
||
</th:block>
|
||
|
||
<div class="footer-bottom">
|
||
<a
|
||
class="footer-bottom-brand"
|
||
th:href="@{/}"
|
||
th:if="${not #strings.isEmpty(footerLogo) or showFooterName}"
|
||
>
|
||
<img
|
||
th:if="${not #strings.isEmpty(footerLogo)}"
|
||
th:src="${footerLogo}"
|
||
th:attr="data-logo-light=${footerLogo},data-logo-dark=${footerLogoDark}"
|
||
class="footer-bottom-logo"
|
||
alt="logo"
|
||
/>
|
||
<span
|
||
class="footer-bottom-name"
|
||
th:if="${showFooterName}"
|
||
th:text="${site.title}"
|
||
></span>
|
||
</a>
|
||
<span
|
||
class="footer-copyright"
|
||
th:if="${not #strings.isEmpty(theme.config.footer?.copyright)}"
|
||
th:text="${theme.config.footer?.copyright}"
|
||
></span>
|
||
<span
|
||
class="footer-beian"
|
||
th:if="${not #strings.isEmpty(theme.config.footer?.icp) or not #strings.isEmpty(theme.config.footer?.gongan)}"
|
||
>
|
||
<a
|
||
th:if="${not #strings.isEmpty(theme.config.footer?.icp)}"
|
||
th:href="${theme.config.footer?.icp_link ?: 'https://beian.miit.gov.cn/'}"
|
||
target="_blank"
|
||
rel="noopener"
|
||
th:text="${theme.config.footer?.icp}"
|
||
></a>
|
||
<a
|
||
class="footer-gongan"
|
||
th:if="${not #strings.isEmpty(theme.config.footer?.gongan)}"
|
||
th:href="${theme.config.footer?.gongan_link ?: 'https://beian.mps.gov.cn/#/query/webSearch'}"
|
||
target="_blank"
|
||
rel="noopener"
|
||
>
|
||
<img
|
||
th:src="@{/assets/img/gongan.svg}"
|
||
class="footer-gongan-icon"
|
||
alt=""
|
||
/>
|
||
<span th:text="${theme.config.footer?.gongan}"></span>
|
||
</a>
|
||
</span>
|
||
</div>
|
||
</div>
|
||
<halo:footer />
|
||
</footer>
|
||
<script th:inline="javascript">
|
||
window.themePluginPage = {
|
||
docs: /*[[${theme.config.docs}]]*/ {},
|
||
docsme: /*[[${theme.config.docsme}]]*/ {},
|
||
minidocs: /*[[${theme.config.minidocs}]]*/ {},
|
||
};
|
||
</script>
|
||
</body>
|
||
</html>
|
||
|