mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-22 12:20:34 +00:00
Docs: update theme (#368)
Signed-off-by: Carson Yang <yangchuansheng33@gmail.com>
This commit is contained in:
@@ -11,8 +11,12 @@
|
||||
{{ end -}}
|
||||
|
||||
{{ if .Page.Store.Get "hasMermaid" }}
|
||||
<script type="module">
|
||||
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.esm.min.mjs';
|
||||
{{ $mermaid := resources.Get (printf "%s/%s" ($.Scratch.Get "pathName") "js/mermaid.js") }}
|
||||
{{ if hugo.IsProduction }}
|
||||
{{ $mermaid = $mermaid | minify | fingerprint "sha384" }}
|
||||
{{ end }}
|
||||
<script src="{{ $mermaid.RelPermalink }}" {{ if hugo.IsProduction }}integrity="{{ $mermaid.Data.Integrity }}"{{ end }}></script>
|
||||
<script>
|
||||
const config = {
|
||||
startOnLoad:true,
|
||||
logLevel: "error",
|
||||
|
@@ -30,6 +30,8 @@
|
||||
<meta name="Version" content="v0.1.0" />
|
||||
<!-- favicon -->
|
||||
{{ block "favicon" . }}{{ partialCached (printf "%s/%s" ($.Scratch.Get "pathName") "head/favicon.html") . }}{{ end }}
|
||||
{{- partial (printf "%s/%s" ($.Scratch.Get "pathName") "head/opengraph") . }}
|
||||
{{- partial (printf "%s/%s" ($.Scratch.Get "pathName") "head/twitter_cards") . }}
|
||||
<!-- Dark Mode -->
|
||||
{{ if eq .Site.Params.docs.darkMode true -}}
|
||||
{{ $darkModeInit := resources.Get (printf "/%s/%s" ($.Scratch.Get "pathName") "js/darkmode-init.js") | js.Build | minify -}}
|
||||
|
@@ -42,7 +42,45 @@
|
||||
<ul>
|
||||
{{ range .Pages }}
|
||||
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
||||
<li class="{{ if $active }}current{{ end }} {{ if eq .Site.Params.docs.sidebarIcons true -}}{{ else }}no-icon{{ end }}"><a class="sidebar-nested-link" href="{{ .Permalink }}">{{ .Title }}</a></li>
|
||||
{{ if .IsSection }}
|
||||
<li class="sidebar-dropdown nested {{ if eq .Site.Params.docs.sidebarIcons true -}}{{ else }}no-icon{{ end }} {{ if $active }}current active{{ end }}">
|
||||
<button class="btn">
|
||||
{{ if eq .Site.Params.docs.sidebarIcons true -}}
|
||||
<!-- <span class="material-icons me-2">{{- .Params.icon }}</span> -->
|
||||
{{ end }}
|
||||
{{- .Title }}
|
||||
</button>
|
||||
<div class="sidebar-submenu {{ if $active }}d-block{{ end }}">
|
||||
<ul>
|
||||
{{ range .Pages }}
|
||||
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
||||
{{ if .IsSection }}
|
||||
<li class="sidebar-dropdown nested {{ if eq .Site.Params.docs.sidebarIcons true -}}{{ else }}no-icon{{ end }} {{ if $active }}current active{{ end }}">
|
||||
<button class="btn">
|
||||
{{ if eq .Site.Params.docs.sidebarIcons true -}}
|
||||
<!-- <span class="material-icons me-2">{{- .Params.icon }}</span> -->
|
||||
{{ end }}
|
||||
{{- .Title }}
|
||||
</button>
|
||||
<div class="sidebar-submenu {{ if $active }}d-block{{ end }}">
|
||||
<ul>
|
||||
{{ range .Pages }}
|
||||
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
||||
<li class="{{ if $active }}current{{ end }} {{ if eq .Site.Params.docs.sidebarIcons true -}}{{ else }}no-icon{{ end }}"><a class="sidebar-nested-link" href="{{ .Permalink }}">{{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
{{ else }}
|
||||
<li class="{{ if $active }}current{{ end }} {{ if eq .Site.Params.docs.sidebarIcons true -}}{{ else }}no-icon{{ end }}"><a class="sidebar-nested-link" href="{{ .Permalink }}">{{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
{{ else }}
|
||||
<li class="{{ if $active }}current{{ end }} {{ if eq .Site.Params.docs.sidebarIcons true -}}{{ else }}no-icon{{ end }}"><a class="sidebar-nested-link" href="{{ .Permalink }}">{{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user