Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/heyeshuang/hugo-theme-tokiwa.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHe Yeshuang <yeshuanghe@gmail.com>2020-05-01 18:00:07 +0300
committerHe Yeshuang <yeshuanghe@gmail.com>2020-05-18 15:15:49 +0300
commit2c5fd2ce2d6a51287a35e384c658b643e589ba5c (patch)
treeb6c142b21718645f5acd759b478232f66f8fe9c0 /layouts/partials
parent73a2bd7d643e437d537ce083b508c374c876e86f (diff)
feels tired
Diffstat (limited to 'layouts/partials')
-rw-r--r--layouts/partials/list-footer.html2
-rwxr-xr-xlayouts/partials/list-header.html6
-rw-r--r--layouts/partials/menu-contextual.html29
-rwxr-xr-xlayouts/partials/page-aside.html1
-rw-r--r--layouts/partials/page-footer.html20
-rw-r--r--layouts/partials/page-header.html4
-rw-r--r--layouts/partials/pagination.html72
-rwxr-xr-xlayouts/partials/site-aside.html10
-rwxr-xr-xlayouts/partials/site-header.html2
-rw-r--r--layouts/partials/site-navigation.html16
-rw-r--r--layouts/partials/summary.html11
-rw-r--r--layouts/partials/tags.html4
12 files changed, 124 insertions, 53 deletions
diff --git a/layouts/partials/list-footer.html b/layouts/partials/list-footer.html
new file mode 100644
index 0000000..d6f0137
--- /dev/null
+++ b/layouts/partials/list-footer.html
@@ -0,0 +1,2 @@
+<hr class="double-line"/>
+{{- partial "pagination.html" . -}} \ No newline at end of file
diff --git a/layouts/partials/list-header.html b/layouts/partials/list-header.html
new file mode 100755
index 0000000..4190fd9
--- /dev/null
+++ b/layouts/partials/list-header.html
@@ -0,0 +1,6 @@
+ <div class="pb-4">
+ <h1>
+ <a href="{{ .Site.BaseURL }}" title="{{ .Site.Title }}" class="heading">{{ .Site.Title }}</a>
+ </h1>
+ </div>
+ {{ partial "site-navigation.html" . }} \ No newline at end of file
diff --git a/layouts/partials/menu-contextual.html b/layouts/partials/menu-contextual.html
deleted file mode 100644
index e0d79dd..0000000
--- a/layouts/partials/menu-contextual.html
+++ /dev/null
@@ -1,29 +0,0 @@
-{{/*
-Use Hugo's native Table of contents feature. You must set `toc: true` in your parameters for this to show.
-https://gohugo.io/content-management/toc/
-*/}}
-
-<!-- {{- if .Params.toc -}}
-<div>
- <p>What's in this {{ humanize .Type }}</p>
- {{ .TableOfContents }}
-</div>
-{{- end -}} -->
-
-{{/*
-Use Hugo's native related content feature to pull in content that may have similar parameters, like tags. etc.
-https://gohugo.io/content-management/related/
-*/}}
-
-{{ $related := .Site.RegularPages.Related . | first 15 }}
-{{ $count := len $related }}
-{{ with $related }}
-<div class="font-serif">
- <span class="heading pr-4">Related</span>
- {{ range $k, $v := . }}
- <a href="{{ $v.RelPermalink }}">
- {{- $v.Title -}}
- </a>{{ if lt $k (sub $count 1) }}&nbsp;&#47;{{end}}
- {{ end }}
-</div>
-{{ end }} \ No newline at end of file
diff --git a/layouts/partials/page-aside.html b/layouts/partials/page-aside.html
index 041fa45..5dcf5d4 100755
--- a/layouts/partials/page-aside.html
+++ b/layouts/partials/page-aside.html
@@ -1,5 +1,6 @@
<div class="md:max-w-xs flex flex-col md:items-end">
{{ partial "site-navigation.html" . }}
+ {{ partial "social-follow.html" . }}
<div class="text-sm text-gray-500 leading-tight">
Built with Hugo and theme Tokiwa.<br/>
{{.Site.Copyright|safeHTML}}
diff --git a/layouts/partials/page-footer.html b/layouts/partials/page-footer.html
index 5d7b0f9..4a56555 100644
--- a/layouts/partials/page-footer.html
+++ b/layouts/partials/page-footer.html
@@ -1,5 +1,5 @@
<hr class="double-line" />
-<div class="flex flex-wrap justify-between pb-2 font-serif">
+<div class="flex flex-wrap justify-between pb-2 leading-loose font-serif">
{{with .Site.RegularPages.Prev . }}
<a class="flex-grow-0" href="{{.RelPermalink}}">
<svg class="fill-current inline-block h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24"
@@ -19,9 +19,23 @@
{{end}}
</div>
<div >
- {{- partial "menu-contextual.html" . -}}
+{{ $related := .Site.RegularPages.Related . | first 15 }}
+{{ $count := len $related }}
+{{ with $related }}
+<div class="font-serif pb-2 flex align-start leading-loose">
+ <span class="heading pr-6 leading-loose">Related</span>
+ <span >
+ {{ range $k, $v := . }}
+ <a href="{{ $v.RelPermalink }}">
+ {{- $v.Title -}}
+ </a>{{ if lt $k (sub $count 1) }}&nbsp;&nbsp;&#47;&nbsp;{{end}}
+ {{ end }}
+</span>
+</div>
+{{ end }}
</div>
<hr />
<div class="pb-2">
{{ template "_internal/disqus.html" . }}
-</div> \ No newline at end of file
+</div>
+<hr /> \ No newline at end of file
diff --git a/layouts/partials/page-header.html b/layouts/partials/page-header.html
index 7cfe63d..8228ce3 100644
--- a/layouts/partials/page-header.html
+++ b/layouts/partials/page-header.html
@@ -11,9 +11,9 @@
{{end}}
<div class="flex flex-wrap justify-end pt-2 ">
{{- partial "tags.html" . -}}
- <time class="text-eucalyptus-500 md:text-right md:flex-grow font-light"
+ <time class="text-eucalyptus-500 md:text-right md:flex-grow font-light pl-4"
datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
- &nbsp;{{- .Date.Format "2006年1月2日" -}}
+ {{- .Date.Format "2006-1-2 15:04" -}}
</time>
</div>
<hr /> \ No newline at end of file
diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html
new file mode 100644
index 0000000..b5e06d6
--- /dev/null
+++ b/layouts/partials/pagination.html
@@ -0,0 +1,72 @@
+{{ $pag := $.Paginator }}
+{{ if gt $pag.TotalPages 1 }}
+<ul class="flex justify-between">
+ {{ with $pag.First }}
+ <li class="page-item">
+ <a href="{{ .URL }}" class="page-link" aria-label="First"><span aria-hidden="true">
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
+ stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
+ class="feather feather-chevrons-left h-4 w-4 relative -bottom-1">
+ <polyline points="11 17 6 12 11 7"></polyline>
+ <polyline points="18 17 13 12 18 7"></polyline>
+ </svg>
+ </span></a>
+ </li>
+ {{ end }}
+ <li class="page-item{{ if not $pag.HasPrev }} disabled{{ end }}">
+ <a {{ if $pag.HasPrev }}href="{{ $pag.Prev.URL }}" {{ end }} class="page-link" aria-label="Previous"><span
+ aria-hidden="true">
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
+ stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
+ class="feather feather-chevron-left h-4 w-4 relative -bottom-1">
+ <polyline points="15 18 9 12 15 6"></polyline>
+ </svg>
+ </span></a>
+ </li>
+ <div class="flex-grow-3"></div>
+ {{ $ellipsed := false }}
+ {{ $shouldEllipse := false }}
+ {{ range $pag.Pagers }}
+ {{ $right := sub .TotalPages .PageNumber }}
+ {{ $showNumber := or (le .PageNumber 3) (eq $right 0) }}
+ {{ $showNumber := or $showNumber (and (gt .PageNumber (sub $pag.PageNumber 2)) (lt .PageNumber (add $pag.PageNumber 2))) }}
+ {{ if $showNumber }}
+ {{ $ellipsed = false }}
+ {{ $shouldEllipse = false }}
+ {{ else }}
+ {{ $shouldEllipse = not $ellipsed }}
+ {{ $ellipsed = true }}
+ {{ end }}
+ {{ if $showNumber }}
+ <li class="page-item{{ if eq . $pag }} active{{ end }}"><a class="page-link" href="{{ .URL }}">{{ .PageNumber }}</a>
+ </li>
+ {{ else if $shouldEllipse }}
+ <li class="page-item disabled"><span aria-hidden="true">&nbsp;&hellip;&nbsp;</span></li>
+ {{ end }}
+ {{ end }}
+ <div class="flex-grow-3"></div>
+ <li class="page-item{{ if not $pag.HasNext }} disabled{{ end }}">
+ <a {{ if $pag.HasNext }}href="{{ $pag.Next.URL }}" {{ end }} class="page-link" aria-label="Next"><span
+ aria-hidden="true">
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
+ stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
+ class="feather feather-chevron-right h-4 w-4 relative -bottom-1">
+ <polyline points="9 18 15 12 9 6"></polyline>
+ </svg>
+ </span></a>
+ </li>
+ {{ with $pag.Last }}
+ <li class="page-item">
+ <a href="{{ .URL }}" class="page-link" aria-label="Last"><span aria-hidden="true">
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
+ stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
+ class="feather feather-chevrons-right h-4 w-4 relative -bottom-1">
+ <polyline points="13 17 18 12 13 7"></polyline>
+ <polyline points="6 17 11 12 6 7"></polyline>
+ </svg>
+ </span></a>
+ </li>
+ {{ end }}
+</ul>
+{{ end }}
+
diff --git a/layouts/partials/site-aside.html b/layouts/partials/site-aside.html
index a35c438..f95d08b 100755
--- a/layouts/partials/site-aside.html
+++ b/layouts/partials/site-aside.html
@@ -1,3 +1,7 @@
-<a href="{{ .Site.BaseURL }}">
- &copy; {{ now.Format "2006" }} {{ .Site.Title }}
-</a> \ No newline at end of file
+<div class="md:max-w-xs flex flex-col md:items-end">
+ {{ partial "social-follow.html" . }}
+ <div class="text-sm text-gray-500 leading-tight">
+ Built with Hugo and theme Tokiwa.<br/>
+ {{.Site.Copyright|safeHTML}}
+ </div>
+</div> \ No newline at end of file
diff --git a/layouts/partials/site-header.html b/layouts/partials/site-header.html
index e22c832..4190fd9 100755
--- a/layouts/partials/site-header.html
+++ b/layouts/partials/site-header.html
@@ -1,6 +1,6 @@
<div class="pb-4">
<h1>
- {{ .Site.Title }}
+ <a href="{{ .Site.BaseURL }}" title="{{ .Site.Title }}" class="heading">{{ .Site.Title }}</a>
</h1>
</div>
{{ partial "site-navigation.html" . }} \ No newline at end of file
diff --git a/layouts/partials/site-navigation.html b/layouts/partials/site-navigation.html
index 5e756d0..0e7601e 100644
--- a/layouts/partials/site-navigation.html
+++ b/layouts/partials/site-navigation.html
@@ -1,6 +1,5 @@
-<div class="font-serif">
- {{ if .Site.Menus.main }}
- <ul >
+ <ul class="font-serif flex-grow-0 flex justify-between flex-wrap md:flex-col">
+ {{ if .Site.Menus.main }}
{{ range .Site.Menus.main }}
<li>
<a href="{{ .URL }}" title="{{ .Name }} page">
@@ -8,7 +7,10 @@
</a>
</li>
{{ end }}
- </ul>
- {{ end }}
-</div>
-{{ partial "social-follow.html" . }} \ No newline at end of file
+ {{ if .OutputFormats.Get "RSS" }}
+ <li>
+ <a href='{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}'>RSS</a>
+ </li>
+ {{ end }}
+ {{ end }}
+ </ul> \ No newline at end of file
diff --git a/layouts/partials/summary.html b/layouts/partials/summary.html
index 9f30c0f..55ebacc 100644
--- a/layouts/partials/summary.html
+++ b/layouts/partials/summary.html
@@ -1,13 +1,12 @@
<div>
<div>
- <span>{{ humanize .Section }}</span>
- <h1>
+ <div>
<a href="{{ .Permalink }}">
{{ .Title }}
</a>
- </h1>
- <div>
- {{ .Summary }}
- </div>
+ </div>
+ {{ with .Description }}
+ <div>{{.}}</div>
+ {{ end }}
</div>
</div> \ No newline at end of file
diff --git a/layouts/partials/tags.html b/layouts/partials/tags.html
index 2111cc6..a7088a8 100644
--- a/layouts/partials/tags.html
+++ b/layouts/partials/tags.html
@@ -4,8 +4,8 @@
{{ if gt $count 0 }}
{{ range $k, $v := .Params.categories}}
<a class="post-taxonomy-category text-medium-red-violet-600 hover:text-medium-red-violet-400"
- href="/categories/{{ . | urlize }}">{{ . }}</a>{{ if lt $k (sub $count 1) }}&nbsp;&#47;{{ end }}
- {{end}}&nbsp;
+ href="/categories/{{ . | urlize }}">{{ . }}</a>&nbsp;&#47;
+ {{end}}
{{end}}
{{end}}
{{ if isset .Params "tags" }}