1
1
<!DOCTYPE html>
2
2
{{ $.Scratch.Delete "social_list" }}
3
+ {{ $.Scratch.Set "pathName" (printf "%s" (.Site.Params.docs.pathName | default "docs")) }}
3
4
<!-- social_list -->
4
5
<!-- change -->
5
6
{{ $social_params := slice "github" "twitter" "instagram" "rss" "wechat" }}
6
7
{{ range $social_params }}
7
- {{ if isset site.Params.social . }}
8
- {{ $.Scratch.Add "social_list" (slice .) }}
9
- {{ end }}
8
+ {{ if isset site.Params.social . }}
9
+ {{ $.Scratch.Add "social_list" (slice .) }}
10
+ {{ end }}
10
11
{{ end }}
11
12
< html lang ="{{ site.LanguageCode }} ">
12
- {{- partial (printf "%s/%s" (.Site.Params.docs.pathName | default "docs ") "head.html") . -}}
13
+ {{- partial (printf "%s/%s" ($.Scratch.Get "pathName ") "head.html") . -}}
13
14
< body >
14
15
< div class ="content ">
15
16
< div class ="page-wrapper toggled ">
16
- {{- partial (printf "%s/%s" (.Site.Params.docs.pathName | default "docs ") "sidebar.html") . -}}
17
+ {{- partial (printf "%s/%s" ($.Scratch.Get "pathName ") "sidebar.html") . -}}
17
18
<!-- Start Page Content -->
18
19
< main class ="page-content bg-transparent ">
19
- {{- partialCached (printf "%s/%s" (.Site.Params.docs.pathName | default "docs ") "top-header.html") . -}}
20
+ {{- partialCached (printf "%s/%s" ($.Scratch.Get "pathName ") "top-header.html") . -}}
20
21
< div class ="container-fluid ">
21
22
< div class ="layout-spacing ">
22
23
{{ $currentPage := . -}}
23
24
{{ if site.Params.docs.breadcrumbs | default true }}
24
25
< div class ="d-md-flex justify-content-between align-items-center ">
25
- {{- partial (printf "%s/%s" (.Site.Params.docs.pathName | default "docs ") "breadcrumbs.html") . -}}
26
+ {{- partial (printf "%s/%s" ($.Scratch.Get "pathName ") "breadcrumbs.html") . -}}
26
27
</ div >
27
28
{{ end }}
28
29
< div class ="row flex-xl-nowrap ">
29
30
{{ if site.Params.docs.toc | default true }}
30
31
< div class ="docs-toc col-xl-3 {{ if .IsNode }}visually-hidden{{ else }}{{end}} {{ if and (ne .Params.toc false) (ne .TableOfContents "< nav id =\ "TableOfContents\"> </ nav > ") }}{{ else }}visually-hidden{{ end }} {{ if site.Params.docs.toc | default true }}{{ else }}visually-hidden{{ end }} d-xl-block">
31
- {{- partial (printf "%s/%s" (.Site.Params.docs.pathName | default "docs ") "toc.html") . -}}
32
+ {{- partial (printf "%s/%s" ($.Scratch.Get "pathName ") "toc.html") . -}}
32
33
</ div >
33
34
{{ end }}
34
35
{{ if site.Params.docs.tocMobile | default true }}
35
36
< div class ="docs-toc-mobile {{ if .IsNode }}visually-hidden{{ else }}{{end}} {{ if and (ne .Params.toc false) (ne .TableOfContents "< nav id =\ "TableOfContents\"> </ nav > ") }}{{ else }}visually-hidden{{ end }} {{ if site.Params.docs.tocMobile | default true }}{{ else }}visually-hidden{{ end }} d-print-none d-xl-none">
36
37
< button id ="toc-dropdown-btn " class ="btn-secondary dropdown-toggle " type ="button " data-bs-toggle ="dropdown " data-bs-offset ="0,0 " aria-expanded ="false ">
37
- Contents
38
+ Table of Contents
38
39
</ button >
39
- {{- partial (printf "%s/%s" (.Site.Params.docs.pathName | default "docs ") "toc-mobile.html") . -}}
40
+ {{- partial (printf "%s/%s" ($.Scratch.Get "pathName ") "toc-mobile.html") . -}}
40
41
</ div >
41
42
{{ end -}}
43
+ <!-- change -->
42
44
< div class ="docs-content col-12 {{ if .IsNode }}{{ else }}{{ if site.Params.docs.toc | default true }}{{ if and (ne .Params.toc false) }}col-xl-9{{else}}{{end}}{{ else }}{{ end }}{{ end }} mt-0 ">
43
45
< div class ="mb-3 ">
44
46
< h1 class ="content-title mb-0 ">
@@ -60,44 +62,44 @@ <h1 class="content-title mb-0">
60
62
{{ block "main" . }}{{ end }}
61
63
</ div >
62
64
< div >
63
- {{- partial (printf "%s/%s" (.Site.Params.docs.pathName | default "docs ") "doc-nav.html") . -}}
65
+ {{- partial (printf "%s/%s" ($.Scratch.Get "pathName ") "doc-nav.html") . -}}
64
66
</ div >
65
67
</ div >
66
68
</ div >
67
69
</ div >
68
70
</ div >
69
- {{- partialCached (printf "%s/%s" (.Site.Params.docs.pathName | default "docs ") "footer.html") . -}}
71
+ {{- partialCached (printf "%s/%s" ($.Scratch.Get "pathName ") "footer.html") . -}}
70
72
71
73
</ main >
72
74
</ div >
73
75
</ div >
74
76
75
77
{{ if site.Params.docs.backToTop | default true }}
76
78
<!-- Back to top -->
77
- < button onclick ="topFunction() " id ="back-to-top " class ="back-to-top fs-5 "> < svg width ="24 " height ="24 "> < path d ="M12,10.224l-6.3,6.3L4.32,15.152,12,7.472l7.68,7.68L18.3,16.528Z " style ="fill:#fff "/> </ svg > </ button >
79
+ < button onclick ="topFunction() " id ="back-to-top " aria-label =" Back to Top Button " class ="back-to-top fs-5 "> < svg width ="24 " height ="24 "> < path d ="M12,10.224l-6.3,6.3L4.32,15.152,12,7.472l7.68,7.68L18.3,16.528Z " style ="fill:#fff "/> </ svg > </ button >
78
80
<!-- Back to top -->
79
81
{{ end }}
80
82
81
83
<!-- Dark Mode Switch JS -->
82
84
{{ if eq .Site.Params.docs.darkMode true -}}
83
- {{ $darkModeSwitch := resources.Get (printf "/%s/%s" (.Site.Params.docs.pathName | default "docs ") "js/darkmode-switch.js") | js.Build | minify }}
85
+ {{ $darkModeSwitch := resources.Get (printf "/%s/%s" ($.Scratch.Get "pathName ") "js/darkmode-switch.js") | js.Build | minify }}
84
86
< script > { { $darkModeSwitch . Content | safeJS } } </ script >
85
87
{{ end -}}
86
88
87
- {{- partialCached (printf "%s/%s" (.Site.Params.docs.pathName | default "docs ") "footer/footer-scripts.html") . -}}
89
+ {{- partialCached (printf "%s/%s" ($.Scratch.Get "pathName ") "footer/footer-scripts.html") . -}}
88
90
89
91
<!-- DocSearch Config -->
90
92
{{ if and (.Site.Params.docsearch.appID) (.Site.Params.docsearch.apiKey) -}}
91
- {{- partialCached (printf "%s/%s" (.Site.Params.docs.pathName | default "docs ") "footer/docsearch.html") . -}}
93
+ {{- partialCached (printf "%s/%s" ($.Scratch.Get "pathName ") "footer/docsearch.html") . -}}
92
94
{{ end }}
93
95
94
96
<!-- FlexSearch Config -->
95
97
{{ if or (not (isset .Site.Params.flexsearch "enabled")) (eq .Site.Params.flexsearch.enabled true) -}}
96
98
{{ if and (.Site.Params.docsearch.appID) (.Site.Params.docsearch.apiKey) -}}
97
99
{{ else }}
98
- {{- partialCached (printf "%s/%s" (.Site.Params.docs.pathName | default "docs ") "footer/flexsearch.html") . -}}
100
+ {{- partialCached (printf "%s/%s" ($.Scratch.Get "pathName ") "footer/flexsearch.html") . -}}
99
101
{{ end }}
100
102
{{ end }}
101
103
</ body >
102
- {{- partial (printf "%s/%s" (.Site.Params.docs.pathName | default "docs ") "modals.html") . -}}
104
+ {{- partial (printf "%s/%s" ($.Scratch.Get "pathName ") "modals.html") . -}}
103
105
</ html >
0 commit comments