Skip to content

Commit 2f9439e

Browse files
committed
modified: layouts/404.html
1 parent 17a21d8 commit 2f9439e

File tree

12 files changed

+112
-57
lines changed

12 files changed

+112
-57
lines changed

layouts/404.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ <h4 class="mb-0">Didn’t find anything here!</h4>
3434

3535
</div>
3636
{{ partial "footer.html" . }}
37-
{{ template "_internal/google_analytics_async.html" . }}
37+
<!-- Google Analytics -->
38+
{{ if eq (getenv "HUGO_ENV") "production"}}
39+
{{ template "_internal/google_analytics.html" . }}
40+
{{ end }}
3841
</body>
3942

4043
</html>

layouts/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{{ define "content" }}
22
{{ partial "home.html" . }}
3-
{{ end }}
3+
{{ end }}

layouts/partials/extended_head.html

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,5 @@
4242

4343
<!-- Google Analytics -->
4444
{{ if eq (getenv "HUGO_ENV") "production"}}
45-
{{ with .Site.GoogleAnalytics }}
46-
<script async src="https://www.googletagmanager.com/gtag/js?id={{ . }}"></script>
47-
<script>
48-
if (navigator.doNotTrack !== '1') {
49-
window.dataLayer = window.dataLayer || [];
50-
function gtag() { dataLayer.push(arguments); }
51-
gtag('js', new Date());
52-
53-
gtag('config', '{{ . }}');
54-
}
55-
</script>
45+
{{ template "_internal/google_analytics.html" . }}
5646
{{ end }}
57-
{{ end }}

layouts/partials/footer.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
{{ if .Site.Copyright }}
1313
<li class="mr-3 mr-lg-0">{{ .Site.Copyright | safeHTML }}</li>
1414
{{ else }}
15-
<li class="mr-3 mr-lg-0">
16-
<a href="https://github.com/digital-clouds"><b>Digital Clouds</b></a> |
17-
<a href="https://github.com/z-shell"><b>Z-Shell</b></a>
18-
</li>
15+
<li class="mr-3 mr-lg-0">Theme by <a href='https://github.com/MeiK2333/github-style'>github-style</a></li>
1916
{{ end }}
2017
</ul>
2118
</div>

layouts/partials/head.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
<meta charset="utf-8">
33
<meta name="viewport" content="width=device-width">
44
<script type="application/javascript" src='{{ "js/theme-mode.js" | absURL }}'></script>
5-
<script defer src="fontawesome/6.3.0/js/brands.js"></script>
6-
<script defer src="fontawesome/6.3.0/js/solid.js"></script>
7-
<script defer src="fontawesome/6.3.0/js/fontawesome.js"></script>
85
<link rel="stylesheet" href='{{ "css/frameworks.min.css" | absURL }}' />
96
<link rel="stylesheet" href='{{ "css/github.min.css" | absURL }}' />
107
<link rel="stylesheet" href='{{ "css/github-style.css" | absURL }}' />
@@ -21,4 +18,4 @@
2118

2219
<!-- Extended head section-->
2320
{{ partial "extended_head.html" . }}
24-
</head>
21+
</head>

layouts/partials/header.html

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,13 @@
22
<header class="Header js-details-container Details px-3 px-md-4 px-lg-5 flex-wrap flex-md-nowrap open Details--on">
33
<div class="Header-item mobile-none" style="margin-top: -4px; margin-bottom: -4px;">
44
<a class="Header-link" href="{{ .Site.BaseURL }}">
5-
<svg class="octicon" height="32" viewBox="0 0 16 16" version="1.1" width="32">
6-
<path fill-rule="evenodd"
7-
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z">
8-
</path>
9-
</svg>
5+
<img class="octicon" height="32" width="32" src="{{ .Site.Params.headerIcon }}">
106
</a>
117
</div>
128
<div class="Header-item d-md-none">
139
<button class="Header-link btn-link js-details-target" type="button"
1410
onclick="document.querySelector('#header-search').style.display = document.querySelector('#header-search').style.display == 'none'? 'block': 'none'">
15-
<svg height="24" class="octicon octicon-three-bars" viewBox="0 0 16 16" version="1.1" width="24">
16-
<path fill-rule="evenodd"
17-
d="M1 2.75A.75.75 0 011.75 2h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 2.75zm0 5A.75.75 0 011.75 7h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 7.75zM1.75 12a.75.75 0 100 1.5h12.5a.75.75 0 100-1.5H1.75z">
18-
</path>
19-
</svg>
11+
<img height="24" class="octicon octicon-three-bars" width="24" src="{{ .Site.Params.headerIcon }}">
2012
</button>
2113
</div>
2214
<div style="display: none;" id="header-search"
@@ -40,12 +32,7 @@
4032

4133
<div class="Header-item Header-item--full flex-justify-center d-md-none position-relative">
4234
<a class="Header-link " href="{{ .Site.BaseURL }}">
43-
<svg class="octicon octicon-mark-github v-align-middle" height="32" viewBox="0 0 16 16" version="1.1"
44-
width="32">
45-
<path fill-rule="evenodd"
46-
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z">
47-
</path>
48-
</svg>
35+
<img class="octicon octicon-mark-github v-align-middle" height="32" width="32" src="{{ .Site.Params.headerIcon }}">
4936
</a>
5037
</div>
5138
<div class="Header-item" style="margin-right: 0;">
@@ -59,4 +46,4 @@
5946
</a>
6047
</div>
6148
</header>
62-
</div>
49+
</div>

layouts/partials/post.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@
1414
<div class="d-flex flex-column">
1515
<h1 class="break-word f3 text-normal mb-md-0 mb-1">
1616
<span class="author">
17-
<a href="{{ .Site.BaseURL }}">{{ .Site.Params.author }}</a></span><span
18-
class="path-divider">/</span><strong class="css-truncate-target mr-1" style="max-width: 410px"><a
19-
href="{{ .Permalink }}">{{ .Title }}</a></strong>
17+
<a href="{{ .Site.BaseURL }}">{{ .Site.Params.author }}</a>
18+
</span>
19+
<span class="path-divider">/</span>
20+
<strong class="css-truncate css-truncate-target mr-1" style="max-width: 410px">
21+
<a href="{{ .Permalink }}">{{ .Title }}</a>
22+
</strong>
2023
</h1>
2124
<div class="note m-0">
2225
Created <relative-time datetime="{{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}"
@@ -93,4 +96,4 @@ <h1 class="break-word f3 text-normal mb-md-0 mb-1">
9396
</main>
9497
</div>
9598
<script type="application/javascript" src='{{ "js/toc.js" | absURL }}'></script>
96-
<link rel="stylesheet" href='{{ "css/toc.css" | absURL }}' />
99+
<link rel="stylesheet" href='{{ "css/toc.css" | absURL }}' />

layouts/partials/posts.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<div class="user-repo-search-results-summary TableObject-item TableObject-item--primary v-align-top">
88
<strong>{{ len .Pages }}</strong>
99
results
10-
for <strong>{{ .Params.title }}</strong>
10+
for <strong>{{ .Title }}</strong>
1111
</div>
1212
<div class="TableObject-item text-right v-align-top">
1313
<a class="issues-reset-query text-normal d-inline-block ml-3" href="{{ .Site.BaseURL }}/post/">
@@ -21,6 +21,10 @@
2121
</a>
2222
</div>
2323
</div>
24+
{{else}}
25+
{{if gt (len .Site.Taxonomies.tags) 0}}
26+
{{partial "tags.html" .}}
27+
{{end}}
2428
{{ end }}
2529
<ul>
2630
{{ range .Paginator.Pages }}

layouts/partials/script.html

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,49 @@
11
<script type="application/javascript" src="{{ "js/github-style.js" | absURL }}"></script>
22
{{ if or .Params.math .Site.Params.math }}
3-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css"
3+
<link rel="stylesheet" href="https://fastly.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css"
44
integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">
5-
<script defer type="application/javascript" src="{{ "fa/js/all.min.js" | absURL }}"></script>
6-
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js"
5+
<script defer src="https://fastly.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js"
76
integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script>
8-
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/auto-render.min.js"
7+
<script defer src="https://fastly.jsdelivr.net/npm/katex@0.11.1/dist/contrib/auto-render.min.js"
98
integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous"
109
onload="renderMathInElement(document.body);"></script>
1110
{{ end }}
11+
12+
{{ if or .Params.MathJax .Site.Params.MathJax}}
13+
<script type="text/javascript" async
14+
src="https://cdn.bootcss.com/mathjax/2.7.3/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
15+
MathJax.Hub.Config({
16+
tex2jax: {
17+
inlineMath: [['$', '$'], ['\\(', '\\)']],
18+
displayMath: [['$$', '$$'], ['\[\[', '\]\]']],
19+
processEscapes: true,
20+
processEnvironments: true,
21+
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'],
22+
TeX: {
23+
equationNumbers: { autoNumber: "AMS" },
24+
extensions: ["AMSmath.js", "AMSsymbols.js"]
25+
}
26+
}
27+
});
28+
29+
MathJax.Hub.Queue(function () {
30+
// Fix <code> tags after MathJax finishes running. This is a
31+
// hack to overcome a shortcoming of Markdown. Discussion at
32+
// https://github.com/mojombo/jekyll/issues/199
33+
var all = MathJax.Hub.getAllJax(), i;
34+
for (i = 0; i < all.length; i += 1) {
35+
all[i].SourceElement().parentNode.className += ' has-jax';
36+
}
37+
});
38+
</script>
39+
40+
<style>
41+
code.has-jax {
42+
font: inherit;
43+
font-size: 100%;
44+
background: inherit;
45+
border: inherit;
46+
color: #515151;
47+
}
48+
</style>
49+
{{end}}

layouts/partials/tags.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<style>
2+
.tags { padding: 15px 0; }
3+
</style>
4+
<div class="f6 text-gray mt-2 tags border-bottom">
5+
{{ range $taxonomy, $terms := site.Taxonomies }}
6+
{{ range $term := $terms }}
7+
<a class="muted-link mr-3" href="{{ .Page.RelPermalink }}">
8+
{{ if eq $taxonomy "tags" }}
9+
<svg class="octicon octicon-tag" viewBox="0 0 16 16" version="1.1" width="16" height="16">
10+
<path fill-rule="evenodd"
11+
d="M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z">
12+
</path>
13+
</svg>
14+
{{ else }}
15+
<svg class="octicon octicon-package" viewBox="0 0 16 16" version="1.1" width="16" height="16">
16+
<path fill-rule="evenodd"
17+
d="M8.878.392a1.75 1.75 0 00-1.756 0l-5.25 3.045A1.75 1.75 0 001 4.951v6.098c0 .624.332 1.2.872 1.514l5.25 3.045a1.75 1.75 0 001.756 0l5.25-3.045c.54-.313.872-.89.872-1.514V4.951c0-.624-.332-1.2-.872-1.514L8.878.392zM7.875 1.69a.25.25 0 01.25 0l4.63 2.685L8 7.133 3.245 4.375l4.63-2.685zM2.5 5.677v5.372c0 .09.047.171.125.216l4.625 2.683V8.432L2.5 5.677zm6.25 8.271l4.625-2.683a.25.25 0 00.125-.216V5.677L8.75 8.432v5.516z">
18+
</path>
19+
</svg>
20+
{{ end }}
21+
{{ .Page.Title | lower }}
22+
</a>
23+
{{ end }}
24+
{{ end }}
25+
</div>

0 commit comments

Comments
 (0)