From 941642aee876a97dbb79666d8fabaa2b1feb9ff5 Mon Sep 17 00:00:00 2001 From: Indrajith K L Date: Sun, 20 Mar 2022 00:38:25 +0530 Subject: Theme changes --- themes/terminal/layouts/_default/baseof.html | 27 ++++++++++++ themes/terminal/layouts/_default/index.html | 65 ++++++++++++++++++++++++++++ themes/terminal/layouts/_default/list.html | 55 +++++++++++++++++++++++ themes/terminal/layouts/_default/rss.xml | 40 +++++++++++++++++ themes/terminal/layouts/_default/single.html | 54 +++++++++++++++++++++++ themes/terminal/layouts/_default/terms.html | 17 ++++++++ 6 files changed, 258 insertions(+) create mode 100644 themes/terminal/layouts/_default/baseof.html create mode 100644 themes/terminal/layouts/_default/index.html create mode 100644 themes/terminal/layouts/_default/list.html create mode 100644 themes/terminal/layouts/_default/rss.xml create mode 100644 themes/terminal/layouts/_default/single.html create mode 100644 themes/terminal/layouts/_default/terms.html (limited to 'themes/terminal/layouts/_default') diff --git a/themes/terminal/layouts/_default/baseof.html b/themes/terminal/layouts/_default/baseof.html new file mode 100644 index 0000000..ae3b9cc --- /dev/null +++ b/themes/terminal/layouts/_default/baseof.html @@ -0,0 +1,27 @@ + + + + {{ block "title" . }} + {{ if .IsHome }}{{ $.Site.Title }}{{ else }}{{ .Title }} :: {{ $.Site.Title }}{{ end }} + {{ end }} + {{ partial "head.html" . }} + + +{{ $container := cond ($.Site.Params.FullWidthTheme | default false) "container full" (cond ($.Site.Params.CenterTheme | default false) "container center" "container") }} + +
+ + {{ partial "header.html" . }} + +
+ {{ block "main" . }} + {{ end }} +
+ + {{ block "footer" . }} + {{ partial "footer.html" . }} + {{ end }} +
+ + + diff --git a/themes/terminal/layouts/_default/index.html b/themes/terminal/layouts/_default/index.html new file mode 100644 index 0000000..1cab615 --- /dev/null +++ b/themes/terminal/layouts/_default/index.html @@ -0,0 +1,65 @@ +{{ define "main" }} + {{ if .Content }} +
+ {{ .Content }} +
+ {{ end }} +
+ {{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }} + {{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }} + + {{ $PageContext := . }} + {{ if .IsHome }} + {{ $PageContext = .Site }} + {{ end }} + {{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }} + + {{ range $paginator.Pages }} +
+

+ {{ .Title | markdownify }} +

+ + + {{ if .Params.tags }} + + {{ end }} + + + {{ partial "cover.html" . }} + + +
+ {{ if .Params.showFullContent }} + {{ .Content }} + {{ else if .Description }} + {{ .Description | markdownify }} + {{ else }} + {{ .Summary | markdownify }} + {{ end }} +
+ + {{ if not .Params.showFullContent }} +
+ {{ $.Site.Params.ReadMore }} → +
+ {{ end }} +
+ {{ end }} + {{ partial "pagination.html" . }} +
+{{ end }} diff --git a/themes/terminal/layouts/_default/list.html b/themes/terminal/layouts/_default/list.html new file mode 100644 index 0000000..02f69b4 --- /dev/null +++ b/themes/terminal/layouts/_default/list.html @@ -0,0 +1,55 @@ +{{ define "main" }} + {{ with .Content }} +
+ {{ . }} +
+ {{ end }} +
+ {{ range .Paginator.Pages }} +
+

+ {{ .Title | markdownify }} +

+ + + {{ if .Params.tags }} + + {{ end }} + + {{ partial "cover.html" . }} + + +
+ {{ if .Params.showFullContent }} + {{ .Content }} + {{ else if .Description }} + {{ .Description | markdownify }} + {{ else }} + {{ .Summary | markdownify }} + {{ end }} +
+ + {{ if not .Params.showFullContent }} +
+ {{ $.Site.Params.ReadMore }} → +
+ {{ end }} +
+ {{ end }} + {{ partial "pagination.html" . }} +
+{{ end }} diff --git a/themes/terminal/layouts/_default/rss.xml b/themes/terminal/layouts/_default/rss.xml new file mode 100644 index 0000000..65aa855 --- /dev/null +++ b/themes/terminal/layouts/_default/rss.xml @@ -0,0 +1,40 @@ +{{- $pctx := . -}} +{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} +{{- $pages := slice -}} +{{- if or $.IsHome $.IsSection -}} +{{- $pages = $pctx.RegularPages -}} +{{- else -}} +{{- $pages = $pctx.Pages -}} +{{- end -}} +{{- $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 }} + Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} + 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 }} + {{ .Summary | html }} + {{ .Content | html }} + + {{ end }} + + diff --git a/themes/terminal/layouts/_default/single.html b/themes/terminal/layouts/_default/single.html new file mode 100644 index 0000000..3d375ad --- /dev/null +++ b/themes/terminal/layouts/_default/single.html @@ -0,0 +1,54 @@ +{{ define "main" }} +
+

+ {{ .Title | markdownify }}

+
+ {{ if .Params.Date }} + + {{ end }} + {{ with .Params.Author }} + + {{ end }} + {{ if and (.Param "readingTime") (eq (.Param "readingTime") true) }} + :: {{ .ReadingTime }} min read ({{ .WordCount }} words) + {{ end }} +
+ + {{ if .Params.tags }} + + {{ range .Params.tags }} + #{{ . }}  + {{ end }} + + {{ end }} + {{ partial "cover.html" . }} + + {{ if (.Params.Toc | default .Site.Params.Toc) }} +
+

+ {{ (.Params.TocTitle | default .Site.Params.TocTitle) | default "Table of Contents" }} +

+ {{ .TableOfContents }} +
+ {{ end }} + +
+ {{- with .Content -}} +
+ {{ . | replaceRE "()" `${1} ${3}` | safeHTML }} +
+ {{- end -}} +
+ + {{ if eq .Type $.Site.Params.contentTypeName }} + {{ partial "posts_pagination.html" . }} + {{ end }} + + {{ partial "comments.html" . }} +
+{{ end }} diff --git a/themes/terminal/layouts/_default/terms.html b/themes/terminal/layouts/_default/terms.html new file mode 100644 index 0000000..399d665 --- /dev/null +++ b/themes/terminal/layouts/_default/terms.html @@ -0,0 +1,17 @@ +{{ define "main" }} +
+

{{ .Title }}

+ +
+{{ end }} -- cgit v1.2.3