summaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2023-03-13 16:19:04 +0100
committerPatrick Spek <p.spek@tyil.nl>2023-03-13 16:19:04 +0100
commited54b79220481f921ca90ced4b923e6369a68225 (patch)
treea5f106b1d1a02923e5d71e4e8daa905bc687ebff /layouts
parentdd7ebf0815d33e93a3cec6a046b88bb4997697d9 (diff)
Add projects page
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/baseof.html2
-rw-r--r--layouts/project-release/list.html12
-rw-r--r--layouts/project-release/single.html20
-rw-r--r--layouts/projects/list.html21
4 files changed, 54 insertions, 1 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 98e77f7..74338f3 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -17,7 +17,7 @@
{{- block "body" . }}
<header id="site-header">
<div class="container">
- <nav>
+ <nav class="main">
<a href="/" class="brand-name">{{ .Site.Title }}</a>
{{- range sort .Site.Sections "Title" }}
<a href="{{ .Permalink }}">{{ .Title }}</a>
diff --git a/layouts/project-release/list.html b/layouts/project-release/list.html
new file mode 100644
index 0000000..d288169
--- /dev/null
+++ b/layouts/project-release/list.html
@@ -0,0 +1,12 @@
+{{- define "main" }}
+<h1>{{ .Parent.Title }} Releases</h1>
+{{ .Content }}
+<ul>
+ {{- range .Pages }}
+ <li>
+ <a href="{{ .Permalink }}">{{ .Title }}</a>
+ ({{ .Date | dateFormat "2006-01-02" }})
+ </li>
+ {{- end }}
+</ul>
+{{- end }}
diff --git a/layouts/project-release/single.html b/layouts/project-release/single.html
new file mode 100644
index 0000000..e422699
--- /dev/null
+++ b/layouts/project-release/single.html
@@ -0,0 +1,20 @@
+{{ define "main" }}
+<article>
+ <header>
+ <h1>{{ .Title }}</h1>
+ </header>
+ <main>
+ {{ .Content }}
+ </main>
+ <footer>
+ {{- with .Params.packages }}
+ Pre-built packages:
+ <ul>
+ {{- range $key, $value := . }}
+ <li><a href="{{ $value }}">{{ $key }}</a></li>
+ {{- end }}
+ </ul>
+ {{- end }}
+ </footer>
+</article>
+{{ end }}
diff --git a/layouts/projects/list.html b/layouts/projects/list.html
new file mode 100644
index 0000000..de50a9c
--- /dev/null
+++ b/layouts/projects/list.html
@@ -0,0 +1,21 @@
+{{- define "main" }}
+<h1>{{ .Title }}</h1>
+{{ .Content }}
+{{- range .Sections }}
+ <section class="project">
+ <h2>
+ {{ .Title }}
+ <small>
+ {{- range .Params.languages }}
+ {{ . }}
+ {{- end }}
+ </small>
+ </h2>
+ {{ .Content }}
+ <nav class="project">
+ <a href="{{ .Permalink }}releases">Releases</a>
+ <a href="{{ .Params.repository }}">Sources</a>
+ </nav>
+ </section>
+{{- end }}
+{{- end }}