i know it is a lot

This commit is contained in:
Mivinci 2022-11-08 18:07:48 +08:00
parent 59ee3f114a
commit f1b32bd47e
29 changed files with 415 additions and 570 deletions

View file

@ -2,7 +2,7 @@
<html lang="en">
{{ partial "head.html" . }}
<body class="sm:mx-5 sm:my-0">
<body>
{{ partial "header.html" . }}
{{ block "main" . }} {{ end }}

View file

@ -1,14 +1,14 @@
{{ define "main" }}
<main class="container">
{{ if isset .Data "Term" }}
<h2 class="my-8">{{ .Data.Singular | title }} - "{{ .Data.Term }}"</h2>
{{ else }}
<h2 class="my-8">{{ .Title }}</h2>
{{ end }}
<div class="mt-8">
{{ range .Data.Pages }}
{{ partial "list.html" . }}
{{ end }}
</div>
<main class="container mx-auto">
{{ if isset .Data "Term" }}
<h2 class="text-4xl mt-8 mb-8">{{ .Data.Singular | title }} - "{{ .Data.Term }}"</h2>
{{ else }}
<h2 class="text-4xl mt-8 mb-8">{{ .Title }}</h2>
{{ end }}
<div class="mt-8">
{{ range .Data.Pages }}
{{ partial "item.html" . }}
{{ end }}
</div>
</main>
{{ end }}

View file

@ -1,24 +1,21 @@
{{ define "main" }}
<div class="container">
{{ if .Params.toc }}
{{ partial "toc.html" . }}
{{ end }}
<h1 class="mt-6 mb-6">{{ .Title }}</h1>
<div class="mb-3 text-xs flex justify-between sm:flex-col">
<div class="container mx-auto">
<h1 class="text-4xl font-extrabold mt-6 mb-6">{{ .Title }}</h1>
<div class="mb-3 text-xs flex justify-between ">
<div>
{{ if .Site.Params.displayDate }}
Posted at &mdash; {{ dateFormat .Site.Params.timeformat .Date }}
{{ end }}
{{ if .Draft }}
<span class="ml-3 minima-tag">
<span class="ml-3 tag">
DRAFT
</span>
{{ end }}
</div>
{{ if .Params.tags }}
<div class="sm:mt-4">
<div>
{{ range .Params.tags }}
<a class="not-first:ml-3" href="/tags/{{ . }}">#{{ . }}</a>
<a class="ml-1" href="/tags/{{ . }}">#{{ . }}</a>
{{ end }}
</div>
{{ end }}

View file

@ -1,6 +1,6 @@
{{ define "main" }}
<main class="container">
<h2>{{ .Title }}</h2>
<main class="container mx-auto">
<h2 class="text-3xl font-bold">{{ .Title }}</h2>
<nav class="flex flex-col">
{{ $data := .Data }}
{{ range $key, $value := .Data.Terms.ByCount }}

View file

@ -1,22 +1,22 @@
{{ define "main" }}
<main class="container">
<h2 class="mt-8 mb-1">{{ .Site.Params.iam }} {{ .Site.Author.name }}</h2>
<p class="my-0">{{ .Site.Author.slogon }}</p>
<p class="my-3 home-intro">{{ .Site.Author.description | markdownify | safeHTML }}</p>
<main class="container mx-auto">
<h2 class="mt-8 text-3xl font-bold">{{ .Site.Params.iam }} {{ .Site.Author.name }}</h2>
<p class="mt-0 mb-0">{{ .Site.Author.slogon }}</p>
<p class="mt-3 mb-3 home-intro">{{ .Site.Author.description | markdownify | safeHTML }}</p>
{{ if eq .Paginator.PageNumber 1 }}
<h3 class="mt-6 mb-4">{{ .Site.Params.recent }}</h3>
<h3 class="mt-6 mb-4 text-2xl font-bold">{{ .Site.Params.recent }}</h3>
{{ else }}
<h3 class="mt-6 mb-4">{{ .Site.Params.older }}</h3>
<h3 class="mt-6 mb-4 text-2xl font-bold">{{ .Site.Params.older }}</h3>
{{ end }}
<div>
{{ $paginator := .Paginate (where .Site.RegularPages "Kind" "page") }}
{{ range $paginator.Pages }}
{{ partial "list.html" . }}
{{ partial "item.html" . }}
{{ end }}
{{ partial "paginator.html" . }}
</div>
{{ if .Site.Params.friends.feeds }}
<h3 class="my-6">{{ .Site.Params.friends.title }}</h3>
<h3 class="mt-6 mb-6 text-2xl font-semibold">{{ .Site.Params.friends.title }}</h3>
<div id="friends"></div>
{{ end }}
</main>

View file

@ -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

View file

@ -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>

View file

@ -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;
}

View file

@ -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>

View 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>

View file

@ -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>

View file

@ -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">

View file

@ -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 }}