summaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'layouts')
-rw-r--r--layouts/index.html21
-rw-r--r--layouts/partials/custom_head.html8
-rw-r--r--layouts/projects/list.html40
3 files changed, 69 insertions, 0 deletions
diff --git a/layouts/index.html b/layouts/index.html
new file mode 100644
index 0000000..6fda406
--- /dev/null
+++ b/layouts/index.html
@@ -0,0 +1,21 @@
+{{ define "main" }}
+
+{{ .Content }}
+
+<section>
+ <h2>Recent posts</h2>
+
+ {{ range first 5 (where site.RegularPages "Section" "blog").ByDate.Reverse }}
+ <article>
+ <time datetime="{{ .Date.Format " 2006-01-02" }}">
+ {{ .Date.Format "02 Jan, 2006" }}
+ </time>
+ <a href="{{ .RelPermalink }}">{{ .Title }}</a>
+ </article>
+ {{ end }}
+ <br>
+
+ <a href="/blog/">View all posts →</a>
+</section>
+
+{{ end }}
diff --git a/layouts/partials/custom_head.html b/layouts/partials/custom_head.html
new file mode 100644
index 0000000..3fabb03
--- /dev/null
+++ b/layouts/partials/custom_head.html
@@ -0,0 +1,8 @@
+{{ $css := resources.Get "css/custom.css" }}
+<link rel="stylesheet" href="{{ $css.RelPermalink }}">
+
+<link rel="preconnect" href="https://fonts.googleapis.com">
+<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+<link
+ href="https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:ital,wght@0,400;0,700;1,400;1,700&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap"
+ rel="stylesheet">
diff --git a/layouts/projects/list.html b/layouts/projects/list.html
new file mode 100644
index 0000000..a7f5392
--- /dev/null
+++ b/layouts/projects/list.html
@@ -0,0 +1,40 @@
+{{ define "main" }}
+
+<h1>{{ .Title }}</h1>
+
+{{ with .Content }}
+{{ . }}
+{{ end }}
+
+<div class="projects">
+ {{ range .Pages.ByDate.Reverse }}
+
+ <article class="project">
+ <h2>
+ <a href="{{ .RelPermalink }}">
+ {{ .Title }}
+ </a>
+ </h2>
+
+ {{ with .Params.description }}
+ <p>{{ . }}</p>
+ {{ end }}
+
+ {{ with .Params.tags }}
+ <div class="tags">
+ {{ range . }}
+ <span>{{ . }}</span>
+ {{ end }}
+ </div>
+ {{ end }}
+
+ <a href="{{ .RelPermalink }}">
+ Read more →
+ </a>
+ </article>
+ <hr />
+
+ {{ end }}
+</div>
+
+{{ end }}