From 40f57ed72a601d8489a180f3bd9acd5e6c20d323 Mon Sep 17 00:00:00 2001 From: Ngô Ngọc Đức Huy Date: Tue, 23 Apr 2024 01:19:27 +0700 Subject: Update theme --- layouts/_default/_markup/render-heading.html | 7 +++ layouts/_default/baseof.html | 24 ++++++++++ layouts/_default/books.html | 7 --- layouts/_default/comic.html | 45 ------------------ layouts/_default/list.html | 22 +++++++++ layouts/_default/list.old.html | 20 -------- layouts/_default/project.html | 68 ---------------------------- layouts/_default/rss.xml | 34 ++++++++++++++ layouts/_default/single.html | 22 +++++++++ layouts/_default/taxonomy.html | 12 +++++ layouts/_default/terms.html | 19 ++++++++ layouts/_default/wiki.html | 32 ------------- 12 files changed, 140 insertions(+), 172 deletions(-) create mode 100644 layouts/_default/_markup/render-heading.html create mode 100644 layouts/_default/baseof.html delete mode 100644 layouts/_default/comic.html create mode 100644 layouts/_default/list.html delete mode 100644 layouts/_default/list.old.html delete mode 100644 layouts/_default/project.html create mode 100644 layouts/_default/rss.xml create mode 100644 layouts/_default/single.html create mode 100644 layouts/_default/taxonomy.html create mode 100644 layouts/_default/terms.html delete mode 100644 layouts/_default/wiki.html (limited to 'layouts/_default') diff --git a/layouts/_default/_markup/render-heading.html b/layouts/_default/_markup/render-heading.html new file mode 100644 index 0000000..73f5c26 --- /dev/null +++ b/layouts/_default/_markup/render-heading.html @@ -0,0 +1,7 @@ +{{ $id := .Anchor | safeURL }} + + + + {{ .Text | safeHTML }} + + diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..f13b730 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,24 @@ + + + + {{ partial "head.html" . }} + + + {{ i18n "skipToContent" | humanize }} +
+ {{ partial "header.html" . }} +
+
+ +
+ {{ block "main" . }}{{ end }} +
+ +
+ {{ partial "footer.html" . }} + + diff --git a/layouts/_default/books.html b/layouts/_default/books.html index c0a74d0..449b5e0 100644 --- a/layouts/_default/books.html +++ b/layouts/_default/books.html @@ -1,11 +1,4 @@ {{ define "main" }} -{{ if .Menus }} - -{{ end }}
diff --git a/layouts/_default/comic.html b/layouts/_default/comic.html deleted file mode 100644 index 508df3c..0000000 --- a/layouts/_default/comic.html +++ /dev/null @@ -1,45 +0,0 @@ -{{ define "main" }} -{{ if .Menus }} - -{{ end }} - -
-
-
-

{{ trim .Title " " }}

- {{ if in .Params.categories "comics" }} -
- {{ end}} -
-
-
- {{ partial "comicNav.html" . }} - Comic panels. See transcription below. - {{ partial "comicNav.html" . }} -
-
- - Transcription and extras - - {{ .Content }} -
-
- {{ partial "post-info.html" . }} -
- -{{ if and (.Site.Params.paginationSinglePost) (ne .Type "page") }} - {{ partial "paginationPost.html" . }} -{{ end }} - - -{{ partial "custom-webring.html" }} - -{{ end }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..3079687 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,22 @@ +{{ define "main" }} +
+ {{ .Content }} +
+ + {{ if .Params.reversed }} +
    + {{ else }} +
      + {{ end }} + {{ range .Pages }} +
    • + {{ partial "post-summary.html" . }} +
    • + {{ end }} + {{ if .Params.reversed }} +
+ {{ else }} + + {{ end }} + +{{ end }} diff --git a/layouts/_default/list.old.html b/layouts/_default/list.old.html deleted file mode 100644 index 33bd8b5..0000000 --- a/layouts/_default/list.old.html +++ /dev/null @@ -1,20 +0,0 @@ -{{ define "main" }} -
- {{ .Content }} -
- -
-

{{ i18n .Title }}

- {{ if not .Params.no_feed }} - {{ range .Page.CurrentSection.Pages }} -
-
-

{{ trim .Title " " }}

-
- {{ partial "post-info.html" . }} -
- {{ end }} - {{ end}} -
- -{{ end }} diff --git a/layouts/_default/project.html b/layouts/_default/project.html deleted file mode 100644 index 5bd36e0..0000000 --- a/layouts/_default/project.html +++ /dev/null @@ -1,68 +0,0 @@ -{{ define "main" }} -{{ if .Menus }} - -{{ end }} - -
-
-

{{ trim .Title " " }}

-
-
-

Project info

-
-
Project site
-
- - {{ .Params.name }} - -
- {{ if isSet .Params "author" }} -
Creator
- {{ if isSet .Params "authorurl" }} -
{{ .Params.author }}
- {{ else }} -
{{ .Params.author }}
- {{ end }} - {{ end }} - {{ if isSet .Params "maintainers" }} -
Maintainers
- {{ range $maintainer := .Params.maintainers }} - {{ if isSet $maintainer "URL" }} -
{{ $maintainer.name }}
- {{ else }} -
{{ $maintainer.name }}
- {{ end }} - {{ end }} - {{ end }} -
Status
-
{{ .Params.projectStatus }}
-
- {{ .Content }} -
- {{ if eq .Params.projectStatus "dead" }} -

- The project is currently dead. You can fork it if you find it helpful. -

- {{ else }} -

- The development of project is {{.Params.projectStatus}}. - You can help this project by contributing code, finding new issues, - suggesting new features, or donation. -

- {{ end }} -
- {{ partial "post-info.html" . }} -
- -{{ if and (.Site.Params.paginationSinglePost) (ne .Type "page") }} - {{ partial "paginationPost.html" . }} -{{ end }} - - -{{ partial "custom-webring.html" }} - -{{ end }} diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml new file mode 100644 index 0000000..cb728d9 --- /dev/null +++ b/layouts/_default/rss.xml @@ -0,0 +1,34 @@ +{{- $pctx := . -}} +{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} +{{- $pages := where $pctx.RegularPages ".Params.disable_feed" "!=" true -}} +{{- $limit := .Site.Config.Services.RSS.Limit -}} +{{- if ge $limit 1 -}} +{{- $pages = $pages | first $limit -}} +{{- end -}} +{{- printf "" | safeHTML }} + + + {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} + {{ .Permalink }} + {{ .Site.Title }}{{ if ne .Title .Site.Title }}{{ with .Title }} ({{.}}){{ end }}{{ end }} + Hugo -- gohugo.io{{ with .Site.LanguageCode }} + {{.}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} + {{.}}{{end}}{{ if not .Date.IsZero }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} + {{ with .OutputFormats.Get "RSS" }} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{ end }} + {{ range $pages }} + + {{ .Title }} + {{ .Permalink }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} + {{ .Permalink }} + {{ .Content | html }} + + {{ end }} + + diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..c94d359 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,22 @@ +{{ define "main" }} +
+ {{ .Content }} + {{ partial "post-info.html" . }} +
+
+ +
+ Would you like to discuss this post? + Email me! +{{ end }} diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html new file mode 100644 index 0000000..7b3adb9 --- /dev/null +++ b/layouts/_default/taxonomy.html @@ -0,0 +1,12 @@ +{{ define "main" }} +

{{ i18n .Data.Singular | humanize }}: {{ .Title }}

+ +
    + {{ range .Paginator.Pages }} +
  1. {{ partial "post-summary.html" . }}
  2. + {{ end }} +
+ +{{ end }} diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html new file mode 100644 index 0000000..d4e745e --- /dev/null +++ b/layouts/_default/terms.html @@ -0,0 +1,19 @@ +{{ define "main" }} +
+ {{ .Content }} +
+ +

{{ i18n .Title }}

+ +
    + {{ range $key, $value := .Data.Terms }} +
  • + + {{ $key }} + + ({{ len $value }}) +
  • + {{ end }} +
+ +{{ end }} \ No newline at end of file diff --git a/layouts/_default/wiki.html b/layouts/_default/wiki.html deleted file mode 100644 index 0e933b5..0000000 --- a/layouts/_default/wiki.html +++ /dev/null @@ -1,32 +0,0 @@ -{{ define "main" }} -{{ if .Menus }} - -{{ end }} - - - -{{ if and (.Site.Params.paginationSinglePost) (ne .Type "page") }} - {{ partial "paginationPost.html" . }} -{{ end }} - - -{{ partial "custom-webring.html" }} - -{{ end }} -- cgit 1.4.1