aboutsummaryrefslogtreecommitdiff
path: root/layouts/_default
diff options
context:
space:
mode:
authorTimmy Keller <tjk@tjkeller.xyz>2024-08-10 21:03:16 -0500
committerTimmy Keller <tjk@tjkeller.xyz>2024-08-10 21:03:16 -0500
commitf49d28caa3005c608eec9f8f82b1d9625ae37c01 (patch)
tree3538601cd4ac385e70517f6732290b09c806f936 /layouts/_default
downloadhugo-theme-tjkbasic-f49d28caa3005c608eec9f8f82b1d9625ae37c01.tar.xz
hugo-theme-tjkbasic-f49d28caa3005c608eec9f8f82b1d9625ae37c01.zip
initial commit
Diffstat (limited to 'layouts/_default')
-rw-r--r--layouts/_default/_markup/render-link.html1
-rw-r--r--layouts/_default/baseof.html32
-rw-r--r--layouts/_default/list.html11
-rw-r--r--layouts/_default/single.html20
4 files changed, 64 insertions, 0 deletions
diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html
new file mode 100644
index 0000000..f04b2e3
--- /dev/null
+++ b/layouts/_default/_markup/render-link.html
@@ -0,0 +1 @@
+<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener"{{ end }}>{{ .Text | safeHTML }}</a>
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
new file mode 100644
index 0000000..e5b0ed0
--- /dev/null
+++ b/layouts/_default/baseof.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ {{ $title := print .Title " - " .Site.Title }}
+ {{ if .IsHome }}{{ $title = .Site.Title }}{{ end }}
+ <title>{{ $title | title }}</title>
+ <link rel="stylesheet" type="text/css" href="/stylesheets/highlight.css">
+ <link rel="stylesheet" type="text/css" href="/stylesheets/style.css">
+ {{- block "head" . }}{{- end }}
+ </head>
+ <body>
+ <header>
+ <a id="homelink" href="/">{{ .Site.Title }}</a>
+ <span id="title">{{ .Title }}</span>
+ <div id="menu">
+ {{- range site.Menus.main }}
+ <a href="{{ .URL }}">{{ .Name }}</a>
+ {{- end }}
+ </div>
+ </header>
+ <main>
+ {{- block "main" . }}{{- end }}
+ </main>
+ <footer>
+ <hr>
+ <div id="sharing">
+ <a><img src="/icons/rss_feed_24dp_78A75A_FILL0_wght400_GRAD0_opsz24.svg" /></a>
+ </div>
+ <span id="copyright">&copy; Tim Keller 2024</span>
+ </footer>
+ </body>
+</html>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
new file mode 100644
index 0000000..06b99a2
--- /dev/null
+++ b/layouts/_default/list.html
@@ -0,0 +1,11 @@
+{{ define "main" }}
+
+{{ .Content }}
+
+<ul>
+ {{ range .Pages.ByPublishDate.Reverse }}
+ <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
+ {{ end }}
+</ul>
+
+{{ end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
new file mode 100644
index 0000000..099d3fc
--- /dev/null
+++ b/layouts/_default/single.html
@@ -0,0 +1,20 @@
+{{ define "main" }}
+
+<div id="publishing">
+ <span>{{ .PublishDate | time.Format ":date_long" }}</span>
+ {{ if and (isset .Params "lastmod") (ne .Lastmod .PublishDate) }}
+ <br>
+ <span>Revised: {{ .Lastmod | time.Format ":date_long" }}</span>
+ {{ end }}
+ {{ if isset .Params "tags" }}
+ <br>
+ <span>Tags:</span>
+ {{- range sort .Params.tags }}
+ <a href="/tags/{{ . }}">{{ . | humanize | title }}</a>
+ {{- end }}
+ {{ end }}
+</div>
+
+{{ .Content }}
+
+{{ end }}