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-03 17:50:58 +0300
committerHe Yeshuang <yeshuanghe@gmail.com>2020-05-18 15:15:49 +0300
commitcd4a30371c715a4fa2e1e5523a02cf99554b2b1b (patch)
treedff5d1382233daeabe4d81025c44ae13885aa0e7 /layouts
parent2c5fd2ce2d6a51287a35e384c658b643e589ba5c (diff)
modding list
Diffstat (limited to 'layouts')
-rwxr-xr-xlayouts/_default/list.html35
-rwxr-xr-xlayouts/partials/list-header.html6
-rw-r--r--layouts/partials/site-navigation.html33
-rw-r--r--layouts/partials/summary.html4
-rw-r--r--layouts/partials/tags.html10
5 files changed, 59 insertions, 29 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index b6c7f8f..06a293e 100755
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -4,11 +4,40 @@
{{- .Content -}}
</section>
<section>
- {{ range .Paginator.Pages }}
+ {{ range (.Paginator 25).Pages.GroupByDate "2006" }}
+ <!-- <hr class="pt-4" /> -->
+ <section class="flex flex-col md:flex-row items-start justify-between">
+ <div class="pl-4 pb-2 md:sticky top-0 order-1 md:order-2">
+ <h2 class="">{{ .Key }}</h2>
+ </div>
+ <ul class="order-2 md:order-1">
+ {{ range .Pages }}
+ <div>
+ <div>
+ <a href="{{ .Permalink }}">
+ {{ .Title }}
+ </a>
+ </div>
+ {{ with .Description }}
+ <div>{{.}}</div>
+ {{ end }}
+ </div>
+ {{ end }}
+ </ul>
+ </section>
+ {{ end }}
+ <!-- {{ range .Paginator.Pages }}
<div>
- {{- partial "summary.html" . -}}
+ <div>
+ <a href="{{ .Permalink }}">
+ {{ .Title }}
+ </a>
+ </div>
+ {{ with .Description }}
+ <div>{{.}}</div>
+ {{ end }}
</div>
- {{ end }}
+ {{ end }} -->
</section>
</article>
{{ end }}
diff --git a/layouts/partials/list-header.html b/layouts/partials/list-header.html
deleted file mode 100755
index 4190fd9..0000000
--- a/layouts/partials/list-header.html
+++ /dev/null
@@ -1,6 +0,0 @@
- <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/site-navigation.html b/layouts/partials/site-navigation.html
index 0e7601e..033dbc6 100644
--- a/layouts/partials/site-navigation.html
+++ b/layouts/partials/site-navigation.html
@@ -1,16 +1,17 @@
- <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">
- {{ .Name }}
- </a>
- </li>
- {{ end }}
- {{ 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
+<ul class="font-serif flex-grow-0 flex justify-between flex-wrap md:flex-col">
+ {{ if .Site.Menus.main }}
+ {{ range .Site.Menus.main }}
+ <li class="px-1 md:px-0">
+ <a href="{{ .URL }}" title="{{ .Name }} page" {{ if eq ($.Permalink| absURL ) (.URL|absURL) }}
+ class="font-bold text-medium-red-violet-600 hover:text-medium-red-violet-400" {{ end }}>
+ {{ .Name }}
+ </a>
+ </li>
+ {{ end }}
+ {{ 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 55ebacc..641bac3 100644
--- a/layouts/partials/summary.html
+++ b/layouts/partials/summary.html
@@ -4,9 +4,9 @@
<a href="{{ .Permalink }}">
{{ .Title }}
</a>
- </div>
+ </div>
{{ with .Description }}
- <div>{{.}}</div>
+ <div>{{.}}</div>
{{ end }}
</div>
</div> \ No newline at end of file
diff --git a/layouts/partials/tags.html b/layouts/partials/tags.html
index a7088a8..4c0382a 100644
--- a/layouts/partials/tags.html
+++ b/layouts/partials/tags.html
@@ -4,15 +4,21 @@
{{ 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>&nbsp;&#47;
+ href="/categories/{{ . | urlize }}">{{ . }}</a>{{ if lt $k (sub $count 1) }}&nbsp;&#47;{{ end }}
{{end}}
{{end}}
{{end}}
+
+ {{ if and (isset .Params "categories") (isset .Params "tags") }}
+ &nbsp;&nbsp;
+ {{end}}
+
{{ if isset .Params "tags" }}
{{ $count := len .Params.tags }}
{{ if gt $count 0 }}
{{ range $k, $v := .Params.tags }}
- <a class="post-taxonomy-tag text-eucalyptus-500" href="/tags/{{ . | urlize }}">{{ . }}</a>{{ if lt $k (sub $count 1) }}&nbsp;&#47;{{ end }}
+ <a class="post-taxonomy-tag text-eucalyptus-500"
+ href="/tags/{{ . | urlize }}">{{ . }}</a>{{ if lt $k (sub $count 1) }}&nbsp;&#47;{{ end }}
{{ end }}
{{ end }}
{{ end }}