i know it is a lot
This commit is contained in:
parent
59ee3f114a
commit
f1b32bd47e
29 changed files with 415 additions and 570 deletions
|
@ -1,4 +1,4 @@
|
|||
<div id="disqus_thread" class="my-8"></div>
|
||||
<div id="disqus_thread" class="mt-8 mb-8"></div>
|
||||
<script type="text/javascript">
|
||||
(function () {
|
||||
// Don't ever inject Disqus on localhost--it creates unwanted
|
||||
|
|
|
@ -1,20 +1,22 @@
|
|||
<footer class="mt-8">
|
||||
<div class="container mt-8 flex sm:flex-col-reverse justify-between items-center">
|
||||
<p class="mt-0 text-sm">
|
||||
{{ .Site.Copyright }} |
|
||||
<a href="https://gohugo.io" target="_blank" rel="noopener noreferrer">Hugo</a> on
|
||||
<a href="https://github.com/mivinci/hugo-theme-minima" target="_blank" rel="noopener noreferrer">Minima</a>
|
||||
</p>
|
||||
<p class="flex items-center mt-0">
|
||||
{{ range $_, $key := .Site.Params.Social }}
|
||||
<a class="icon mx-2" href="{{ $key.url }}" title="{{ $key.name }}">
|
||||
{{ if $key.svg }}
|
||||
{{ $key.svg | safeHTML }}
|
||||
{{ else }}
|
||||
{{ index $.Site.Data.svg $key.name | safeHTML }}
|
||||
<footer class="mt-8 mb-8">
|
||||
<div class="container mx-auto">
|
||||
<div class="mt-8 flex justify-between items-center">
|
||||
<p class="mt-0 text-sm">
|
||||
{{ .Site.Copyright }} |
|
||||
<a href="https://gohugo.io" target="_blank" rel="noopener noreferrer">Hugo</a> on
|
||||
<a href="https://github.com/mivinci/hugo-theme-minima" target="_blank" rel="noopener noreferrer">Minima</a>
|
||||
</p>
|
||||
<p class="flex items-center mt-0">
|
||||
{{ range $_, $key := .Site.Params.Social }}
|
||||
<a class="icon ml-1 mr-1" href="{{ $key.url }}" title="{{ $key.name }}">
|
||||
{{ if $key.svg }}
|
||||
{{ $key.svg | safeHTML }}
|
||||
{{ else }}
|
||||
{{ index $.Site.Data.svg $key.name | safeHTML }}
|
||||
{{ end }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</p>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
|
@ -17,7 +17,7 @@
|
|||
<link rel="shortcut icon" href="{{ $favicon | relURL }}" type="image/x-icon" />
|
||||
{{ $hash := now.Unix }}
|
||||
{{ $options := (dict "targetPath" (printf `minima.%d.css` $hash) "outputStyle" "compressed" "enableSourceMap" true) }}
|
||||
{{ $style := resources.Get "sass/main.scss" | resources.ToCSS $options }}
|
||||
{{ $style := resources.Get "css/main.scss" | resources.ToCSS $options }}
|
||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
||||
{{ $options = (dict "targetPath" (printf `minima.%d.js` $hash) "minify" true) }}
|
||||
{{ $js := resources.Get "js/main.js" | js.Build $options | resources.ExecuteAsTemplate (printf `minima.%d.js` $hash) . }}
|
||||
|
@ -36,7 +36,7 @@
|
|||
if (!('theme' in localStorage)) {
|
||||
const default_theme = '{{ .Site.Params.defaultTheme }}';
|
||||
|
||||
// For the first time entering this site, use the theme picked by the author.
|
||||
// For the first time entering this site, use the theme specified in the configuration.
|
||||
if (default_theme === 'dark' || default_theme === 'light') {
|
||||
theme_2b_used = default_theme;
|
||||
}
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
<header class="sm:my-3 my-6">
|
||||
<div class="container">
|
||||
<header class="mt-3 mb-6">
|
||||
<div class="container mx-auto">
|
||||
<nav class="flex justify-between items-center">
|
||||
<div class="flex items-center">
|
||||
{{ if .Site.Params.brand }}
|
||||
<div class="mr-3 text-3xl"><a href="/">{{ .Site.Params.brand }}</a></div>
|
||||
{{ end }}
|
||||
<div id="theme-switcher" class="text-left text-4xl cursor-pointer">{{ index .Site.Params.switch 1 }}</div>
|
||||
<div id="theme-switcher" class="text-2xl cursor-pointer">{{ index .Site.Params.switch 1 }}</div>
|
||||
</div>
|
||||
<ul class="flex items-center font-medium
|
||||
whitespace-nowrap overflow-x-auto overflow-y-hidden">
|
||||
{{ range .Site.Menus.main }}
|
||||
<li class="mx-2"><a href="{{ .URL | absLangURL }}">{{ .Name }}</a></li>
|
||||
<li class="ml-1 mr-1"><a href="{{ .URL | absLangURL }}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
<ul class="flex item-center text-sm font-bold">
|
||||
<ul class="flex item-center text-xs font-bold">
|
||||
{{ range $.Site.Home.AllTranslations }}
|
||||
<li class="ml-3"><a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li>
|
||||
<li class="ml-2"><a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li>
|
||||
{{ end}}
|
||||
</ul>
|
||||
</nav>
|
||||
|
|
17
layouts/partials/item.html
Normal file
17
layouts/partials/item.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
<div>
|
||||
<div class="flex justify-between">
|
||||
{{ if .Page.Params.link }}
|
||||
<a class="font-bold" href="{{ .Page.Params.link }}">{{ .Title }}</a>
|
||||
{{ else }}
|
||||
<a class="font-bold" href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
{{ end }}
|
||||
{{ if .Site.Params.displayDate }}
|
||||
<div class="text-xs font-bold">{{ dateFormat .Site.Params.timeformat .Date }}</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ if .Site.Params.displayDescription }}
|
||||
<p class="text-sm mb-2">
|
||||
{{ .Description | markdownify | safeHTML }}
|
||||
</p>
|
||||
{{ end }}
|
||||
</div>
|
|
@ -1,10 +0,0 @@
|
|||
<div class="flex justify-between sm:flex-col my-3 sm:mb-4 sm:mt-3">
|
||||
{{ if .Page.Params.link }}
|
||||
<a class="" href="{{ .Page.Params.link }}">{{ .Title }}</a>
|
||||
{{ else }}
|
||||
<a class="" href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
{{ end }}
|
||||
{{ if .Site.Params.displayDate }}
|
||||
<div class="sm:mt-1 sm:text-xs">{{ dateFormat .Site.Params.timeformat .Date }}</div>
|
||||
{{ end }}
|
||||
</div>
|
|
@ -1,4 +1,4 @@
|
|||
<div id="ovo_thread" class="my-8">
|
||||
<div id="ovo_thread" class="mt-4 mb-4">
|
||||
<div class="flex flex-col items-center">评论插件加载中 OvO</div>
|
||||
</div>
|
||||
<link rel="stylesheet" href="//unpkg.com/@ovojs/ovo/dist/style.css">
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
{{ if eq .Site.Params.toc "default" }}
|
||||
<details class="toc toc-default">
|
||||
<summary></summary>
|
||||
<div class="pb-1">
|
||||
{{ .TableOfContents }}
|
||||
</div>
|
||||
</details>
|
||||
{{ end }}
|
||||
|
||||
{{ if eq .Site.Params.toc "bar" }}
|
||||
<details class="toc toc-bar">
|
||||
<summary></summary>
|
||||
<div class="pb-1">
|
||||
{{ .TableOfContents }}
|
||||
</div>
|
||||
</details>
|
||||
{{ end }}
|
||||
|
||||
{{ if eq .Site.Params.toc "lines" }}
|
||||
<details class="toc toc-lines">
|
||||
<summary></summary>
|
||||
<div class="pb-1">
|
||||
{{ .TableOfContents }}
|
||||
</div>
|
||||
</details>
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue