Initial commit
This commit is contained in:
commit
063f2bb49a
34 changed files with 1341 additions and 0 deletions
16
layouts/partials/disqus.html
Normal file
16
layouts/partials/disqus.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
<div id="disqus_thread"></div>
|
||||
<script type="text/javascript">
|
||||
(function () {
|
||||
// Don't ever inject Disqus on localhost--it creates unwanted
|
||||
// discussions from 'localhost:1313' on your Disqus account...
|
||||
if (window.location.hostname == "localhost")
|
||||
return;
|
||||
|
||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||
var disqus_shortname = '{{ .Site.DisqusShortname }}';
|
||||
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
})();
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by
|
||||
Disqus.</a></noscript>
|
18
layouts/partials/footer.html
Normal file
18
layouts/partials/footer.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
<footer class="row row-mob al-c-mob col-rev-mob sm-2-mob jc-bt mtb-2">
|
||||
<p>
|
||||
{{ .Site.Copyright }} |
|
||||
<a href="https://github.com/mivinci/hugo-theme-minima" target="_blank" rel="noopener noreferrer">Minima</a> theme on
|
||||
<a href="https://gohugo.io" target="_blank" rel="noopener noreferrer">Hugo</a>
|
||||
</p>
|
||||
<p class="row gap-0_5">
|
||||
{{ range $_, $key := .Site.Params.Social }}
|
||||
<a class="icon" href="{{ $key.url }}" title="{{ $key.name }}">
|
||||
{{ if $key.svg }}
|
||||
{{ $key.svg | safeHTML }}
|
||||
{{ else }}
|
||||
{{ index $.Site.Data.svg $key.name | safeHTML }}
|
||||
{{ end }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</p>
|
||||
</footer>
|
37
layouts/partials/head.html
Normal file
37
layouts/partials/head.html
Normal file
|
@ -0,0 +1,37 @@
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
{{ template "_internal/opengraph.html" . }}
|
||||
{{ template "_internal/twitter_cards.html" . }}
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#ffffff">
|
||||
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#262d33">
|
||||
<title>
|
||||
{{ if .IsHome }}
|
||||
{{ .Site.Title }} {{ if .Site.Params.subtitle }} - {{ .Site.Params.subtitle }} {{ end }}
|
||||
{{ else }}
|
||||
{{ .Site.Title }} - {{ .Title }}
|
||||
{{ end }}
|
||||
</title>
|
||||
{{ $favicon := "favicon.ico" }}
|
||||
<link rel="shortcut icon" href="{{ $favicon | relURL }}" type="image/x-icon" />
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&display=swap"
|
||||
rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://unpkg.com/normalize.css">
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="{{ .Site.BaseURL }}/css/main.css" />
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="{{ .Site.BaseURL }}/css/md.css" />
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="{{ .Site.BaseURL }}/css/syntax.css" />
|
||||
<script src="{{ .Site.BaseURL }}/js/main.js"></script>
|
||||
</head>
|
||||
<script>
|
||||
try {
|
||||
if (!('theme' in localStorage)) {
|
||||
localStorage.theme = window.matchMedia('(prefer-color-scheme: dark)').matches ? 'dark' : 'light';
|
||||
}
|
||||
document.querySelector('html').classList.add(localStorage.theme);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
</script>
|
12
layouts/partials/header.html
Normal file
12
layouts/partials/header.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
<header>
|
||||
<h1 class="row gap-1">
|
||||
<div id="theme-switcher" class="btn lg-1"></div>
|
||||
{{ .Site.Title }}
|
||||
</h1>
|
||||
<nav class="row gap-1">
|
||||
{{ range .Site.Menus.main }}
|
||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
</nav>
|
||||
<hr>
|
||||
</header>
|
25
layouts/partials/math.html
Normal file
25
layouts/partials/math.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css"
|
||||
integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous">
|
||||
<!-- The loading of KaTeX is deferred to speed up page rendering -->
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.js"
|
||||
integrity="sha384-YNHdsYkH6gMx9y3mRkmcJ2mFUjTd0qNQQvY9VYZgQd7DcN7env35GzlmFaZ23JGp" crossorigin="anonymous"></script>
|
||||
<!-- To automatically render math in text elements, include the auto-render extension: -->
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/contrib/auto-render.min.js"
|
||||
integrity="sha384-vZTG03m+2yp6N6BNi5iM4rW4oIwk5DfcNdFfxkk9ZWpDriOkXX8voJBFrAO7MpVl" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
renderMathInElement(document.body, {
|
||||
// customised options
|
||||
// • auto-render specific keys, e.g.:
|
||||
delimiters: [
|
||||
{ left: '$$', right: '$$', display: true },
|
||||
{ left: '$', right: '$', display: false },
|
||||
{ left: '\\(', right: '\\)', display: false },
|
||||
{ left: '\\[', right: '\\]', display: true }
|
||||
],
|
||||
// • rendering keys, e.g.:
|
||||
throwOnError: false
|
||||
});
|
||||
});
|
||||
</script>
|
10
layouts/partials/paginator.html
Normal file
10
layouts/partials/paginator.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
{{ $page := $.Paginator }}
|
||||
{{ if gt $page.TotalPages 1 }}
|
||||
<div class="mt-2">
|
||||
{{ if $page.HasNext }}
|
||||
<a href="{{ $page.Next.URL }}">Older →</a>
|
||||
{{ else }}
|
||||
<a href="{{ $page.Prev.URL }}">← Newer</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue