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-10 14:18:55 +0300
committerHe Yeshuang <yeshuanghe@gmail.com>2020-05-18 15:15:49 +0300
commite0d03c04128641de6811c46ea20d481b20911bc3 (patch)
tree7e7afd28705833ac545ba326052fc5719db3bc0f /layouts
parentf9ebd5575dad9d44dfe9efe5aef262a73f6a1e32 (diff)
pre release
Diffstat (limited to 'layouts')
-rwxr-xr-xlayouts/404.html6
-rwxr-xr-xlayouts/_default/list.html8
-rw-r--r--layouts/_default/taxonomy.html15
-rw-r--r--layouts/_default/terms.html4
-rwxr-xr-xlayouts/index.html57
-rw-r--r--layouts/partials/list-footer.html6
-rw-r--r--layouts/partials/site-navigation.html2
-rw-r--r--layouts/partials/summary.html31
8 files changed, 57 insertions, 72 deletions
diff --git a/layouts/404.html b/layouts/404.html
index 7e30c1c..789c042 100755
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -1,8 +1,10 @@
-{{ define "header" }}{{ partial "page-header.html" . }}{{ end }}
+{{ define "header" }}{{ partial "site-header.html" . }}{{ end }}
{{ define "main" }}
<article>
<h1>
- This is not the page you were looking for
+ Ain't nobody here but us chickens.
</h1>
+ <div class="pt-4">404 not found.</div>
+
</article>
{{ end }} \ No newline at end of file
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index b292aaf..7f0e545 100755
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -5,15 +5,15 @@
</section>
<section>
{{ range (.Paginator 25).Pages.GroupByDate "2006" }}
- <hr class="p-0 m-0" />
+ <hr class="p-0 pt-4 m-0" />
<section class="flex flex-col md:flex-row items-start items-baseline">
- <div class="pl-4 pb-2 md:sticky top-0 order-1 pr-6">
+ <div class="md:pl-4 pb-2 md:sticky top-0 order-1 pr-6">
<h2 class=" text-eucalyptus-600">{{ .Key }}</h2>
</div>
<ul class="order-2 flex-grow">
{{ range .Pages }}
- <div class="py-1 flex">
- <span class="font-serif pr-4">{{.Date.Format "01-02"}}</span>
+ <div class="py-2 flex">
+ <span class="font-serif pr-4 flex-shrink-0">{{.Date.Format "01-02"}}</span>
<div class="font-serif font-medium">
<a href="{{ .Permalink }}">
{{ .Title }}
diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html
index 682cf7b..171a44c 100644
--- a/layouts/_default/taxonomy.html
+++ b/layouts/_default/taxonomy.html
@@ -1,16 +1,17 @@
{{ define "main" }}
-<article>
- <div>
- <p>Below you will find pages that utilize the taxonomy term “{{ .Title }}”</p>
- </div>
-</article>
+<h1 class="pb-4">
+ {{ .Title }}
+</h1>
<div>
<section>
- {{ range .Pages }}
+ {{ range (.Paginator 10).Pages }}
<div>
{{ partial "summary.html" . }}
</div>
{{ end }}
</section>
</div>
-{{ end }} \ No newline at end of file
+{{ end }}
+{{define "footer"}}
+{{ partial "list-footer.html" . }}
+{{end}} \ No newline at end of file
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
index aec2d51..c3511de 100644
--- a/layouts/_default/terms.html
+++ b/layouts/_default/terms.html
@@ -26,7 +26,9 @@
<span class="text-gray-600">{{ if lt $k (sub $count 1) }}&nbsp;&#47;&nbsp;{{ end }}</span>
{{ end }}
{{ if gt (len $value.Pages) $pageCount }}
- <span class="text-gray-600">&nbsp;&#47;&nbsp;&hellip;</span>
+ <span class="text-gray-600">&nbsp;&#47;&nbsp;
+ <a class="leading-relaxed text-gray-600 hover:text-gray-700 focus:text-gray-700 font-light" href="{{ "/" | relLangURL }}{{ $.Data.Plural | urlize }}/{{ $key | urlize }}">
+ &hellip;&hellip;</a></span>
{{ end }}
</div>
</section>
diff --git a/layouts/index.html b/layouts/index.html
index cf2afc9..b447813 100755
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,57 +1,22 @@
{{ define "main" }}
-<article>
- {{ .Content }}
-</article>
-{{/* Define a section to pull recent posts from. For Hugo 0.20 this will default to the section with the most number of
-pages. */}}
-{{ $mainSections := .Site.Params.mainSections | default (slice "post") }}
-{{/* Create a variable with that section to use in multiple places. */}}
-{{ $section := where .Site.RegularPages "Section" "in" $mainSections }}
-{{/* Check to see if the section is defined for ranging through it */}}
-{{ $section_count := len $section }}
-{{ if ge $section_count 1 }}
-{{/* Derive the section name */}}
-{{ $section_name := index (.Site.Params.mainSections) 0 }}
+{{ if isset .Site.Params "description" }}
+<div class="font-serif text-medium-red-violet-400 pt-3">
+ {{ .Site.Params.Description | markdownify }}
+</div>
+<hr class="pt-2"/>
+{{end}}
<div>
- {{/* Use $section_name to get the section title. Use "with" to only show it if it exists */}}
- {{ with .Site.GetPage "section" $section_name }}
- <h1>
- Recent {{ .Title }}
- </h1>
- {{ end }}
-
- {{ $n_posts := $.Param "recent_posts_number" | default 3 }}
-
<section>
- {{/* Range through the first $n_posts items of the section */}}
- {{ range (first $n_posts $section) }}
- <div>
+ {{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
+ {{ range (.Paginate $pages 6).Pages }}<div>
{{ partial "summary.html" . }}
</div>
{{ end }}
</section>
-
- {{ if ge $section_count (add $n_posts 1) }}
- <section>
- <h1>More</h1>
- {{/* Now, range through the next four after the initial $n_posts items. Nest the requirements, "after" then "first"
- on the outside */}}
- {{ range (first 4 (after $n_posts $section)) }}
- <h2>
- <a href="{{ .Permalink }}">
- {{ .Title }}
- </a>
- </h2>
- {{ end }}
-
- {{/* As above, Use $section_name to get the section title, and URL. Use "with" to only show it if it exists */}}
- {{ with .Site.GetPage "section" $section_name }}
- <a href="{{ .Permalink }}">All {{.Title }}</a>
- {{ end }}
- </section>
- {{ end }}
-
</div>
{{ end }}
+
+{{ define "footer" }}
+{{ partial "list-footer.html" . }}
{{ end }} \ No newline at end of file
diff --git a/layouts/partials/list-footer.html b/layouts/partials/list-footer.html
index d6f0137..103dd08 100644
--- a/layouts/partials/list-footer.html
+++ b/layouts/partials/list-footer.html
@@ -1,2 +1,6 @@
-<hr class="double-line"/>
+
+{{ $pag := $.Paginator }}
+{{ if gt $pag.TotalPages 1 }}
+<hr />
+{{end}}
{{- partial "pagination.html" . -}} \ No newline at end of file
diff --git a/layouts/partials/site-navigation.html b/layouts/partials/site-navigation.html
index 033dbc6..1cda4bc 100644
--- a/layouts/partials/site-navigation.html
+++ b/layouts/partials/site-navigation.html
@@ -2,7 +2,7 @@
{{ 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) }}
+ <a href="{{ .URL }}" title="{{ .Name }} page" {{ if in ($.Permalink| absURL ) (.URL|absURL) }}
class="font-bold text-medium-red-violet-600 hover:text-medium-red-violet-400" {{ end }}>
{{ .Name }}
</a>
diff --git a/layouts/partials/summary.html b/layouts/partials/summary.html
index 641bac3..8eb8363 100644
--- a/layouts/partials/summary.html
+++ b/layouts/partials/summary.html
@@ -1,12 +1,23 @@
-<div>
- <div>
- <div>
- <a href="{{ .Permalink }}">
- {{ .Title }}
- </a>
- </div>
- {{ with .Description }}
- <div>{{.}}</div>
- {{ end }}
+<div class="pb-8">
+ <div class="font-serif font-medium text-xl">
+ <a href="{{ .Permalink }}">
+ {{ .Title }}
+ </a>
+ </div>
+ {{/*I just don't like .Summary */}}
+ {{/* <div class="pl-4 text-gray-600 font-light italic"> */}}
+ {{/* {{ if .Description}}{{ .Description }}{{else}}{{ .Summary }}{{end}}
+</div> */}}
+ {{ with .Description }}
+ <div class="font-serif text-gray-600 font-light italic pt-1">
+ {{ .}}</div>
+
+ {{ end }}
+ <div class="flex flex-wrap justify-between pt-1">
+ {{- partial "tags.html" . -}}
+ <time class="text-eucalyptus-500 md:text-right md:flex-grow font-light"
+ datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
+ {{- .Date.Format "2006-1-2 15:04" -}}
+ </time>
</div>
</div> \ No newline at end of file