diff options
author | tdback <tyler@tdback.net> | 2024-12-14 20:41:08 -0500 |
---|---|---|
committer | tdback <tyler@tdback.net> | 2024-12-15 10:55:01 -0500 |
commit | 0bb075d9c8ea99a6f18d440af6d03c84f17fd23b (patch) | |
tree | 719fa87402e536ce3575ea0d9e180381a34ff031 /layouts |
initial commit of site
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/rss.xml | 39 | ||||
-rw-r--r-- | layouts/partials/footer.html | 34 |
2 files changed, 73 insertions, 0 deletions
diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml new file mode 100644 index 0000000..f5116c6 --- /dev/null +++ b/layouts/_default/rss.xml @@ -0,0 +1,39 @@ +<!-- RSS generation layout overrides. --> +{{- $pages := where .Site.RegularPages "Section" "posts" -}} +{{- $limit := .Site.Config.Services.RSS.Limit -}} +{{- if ge $limit 1 -}} +{{- $pages = $pages | first $limit -}} +{{- end -}} +{{- $rssFeedDescription := .Site.Params.rssFeedDescription | default "summary" -}} +{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }} +<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> + <channel> + <title>{{ .Site.Title }} blog</title> + <link>{{ .Permalink }}</link> + <description>Recent content on {{ .Site.Title }}.</description> + <generator>Hugo</generator> + <language>{{ site.Language.LanguageCode }}</language>{{ with .Site.Author.email }} + <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }} + <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }} + <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }} + <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }} + {{- with .OutputFormats.Get "RSS" -}} + {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }} + {{- end -}} + {{ range $pages }} + <item> + <title>{{ .Title }}</title> + <link>{{ .Permalink }}</link> + <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> + {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}} + <guid>{{ .Permalink }}</guid> + {{ if eq $rssFeedDescription "summary"}} + <description>{{ .Summary | html }}</description> + {{ else if (eq $rssFeedDescription "full")}} + <description>{{ .Content | html }}</description> + {{ else }} {{ errorf "Error in RSS feed generation %q" .Path }} + {{ end }} + </item> + {{ end }} + </channel> +</rss> diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..ca79fa6 --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,34 @@ +<!-- Footer class overrides. --> +<footer class="footer"> + <style> + .craftering { + margin: auto; + width: 50%; + text-align: center; + } + </style> + + <span class="footer_item"> </span> + + + <div class="footer_social-icons"> + {{- partial "socialIcons.html" site.Params.socialIcons -}} + </div> + + <div class="craftering"> + <a href="https://craftering.systemcrafters.net/@tdback/previous">←</a> + <a href="https://craftering.systemcrafters.net/">craftering</a> + <a href="https://craftering.systemcrafters.net/@tdback/next">→</a> + </div> + + <small class="footer_copyright"> + © {{ now.Format "2006" }} {{ .Site.Params.author.name }}. + {{ T "footer.disclaimer" | safeHTML }} + </small> +</footer> + +{{- if .Site.Params.goToTop -}} +<a href="#" title="{{ T "footer.go_to_top" }}" id="totop"> + {{ partial "svgs/arrowUp.svg" (dict "height" 48 "width" 48) . }} +</a> +{{- end -}} |