diff options
author | xengineering <me@xengineering.eu> | 2022-07-17 14:18:07 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2022-07-17 14:18:07 +0200 |
commit | 6f633970a4bdb5fbf44168047adfa3e89aba350b (patch) | |
tree | ca8633f38e79cf3f4ba73630251d8839ccee33ff /themes | |
parent | 6917e0f811a1c04abe77cbf625dfe6206a03ef30 (diff) | |
download | website-6f633970a4bdb5fbf44168047adfa3e89aba350b.tar website-6f633970a4bdb5fbf44168047adfa3e89aba350b.tar.zst website-6f633970a4bdb5fbf44168047adfa3e89aba350b.zip |
Add state parameter to Git repositories
Three states are supported:
- experimental
- active
- archived
Diffstat (limited to 'themes')
-rw-r--r-- | themes/bare/layouts/git/list.html | 66 | ||||
-rw-r--r-- | themes/bare/layouts/git/single.html (renamed from themes/bare/layouts/_default/single.html) | 1 | ||||
-rw-r--r-- | themes/bare/layouts/index.html | 12 |
3 files changed, 76 insertions, 3 deletions
diff --git a/themes/bare/layouts/git/list.html b/themes/bare/layouts/git/list.html new file mode 100644 index 0000000..be97eb3 --- /dev/null +++ b/themes/bare/layouts/git/list.html @@ -0,0 +1,66 @@ +<!DOCTYPE html> + +<!-- + vim: shiftwidth=4 tabstop=4 noexpandtab +--> + +<html> + + <head> + + <title>xengineering</title> + + <meta charset="utf-8"/> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <link rel="stylesheet" href="{{ "libweb.css" | absURL }}" type="text/css"> + + </head> + + <body> + + <main> + + <h2>Git repositories</h2> + <p>This page shows all of my Git repositories. They are ordered by + their state attribute, which is defined in each section.</p> + + <h4>Active repositories</h4> + <p>The content of active repositories can be used right now.</p> + <ul> + {{- range.Pages }} + {{ if eq .Params.state "active" }} + <li><a href="{{ .RelPermalink }}">{{ .Params.name }}</a> - {{.Description}}</li> + {{ end }} + {{ end -}} + </ul> + + <h4>Experimental repositories</h4> + <p>Experimental repositories are not ready to be used but maybe interesting enough to have a look at it.</p> + <ul> + {{- range.Pages }} + {{ if eq .Params.state "experimental" }} + <li><a href="{{ .RelPermalink }}">{{ .Params.name }}</a> - {{.Description}}</li> + {{ end }} + {{ end -}} + </ul> + + <h4>Archived repositories</h4> + <p>Archived repositories will not be improved in the future unless the state will change.</p> + <ul> + {{- range.Pages }} + {{ if eq .Params.state "archived" }} + <li><a href="{{ .RelPermalink }}">{{ .Params.name }}</a> - {{.Description}}</li> + {{ end }} + {{ end -}} + </ul> + + <br> + <hr> + <footer>License: <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA</a></footer> + + </main> + + </body> + +</html> + diff --git a/themes/bare/layouts/_default/single.html b/themes/bare/layouts/git/single.html index b37b232..82aa0d2 100644 --- a/themes/bare/layouts/_default/single.html +++ b/themes/bare/layouts/git/single.html @@ -24,6 +24,7 @@ <div class="card"> <p class="card-first-item">{{ .Params.description }}</p> + <p>State: {{ .Params.state }}</p> <p>Browse source code: <a href="https://cgit.xengineering.eu/{{ .Params.name }}/tree">cgit tree</a></p> <p>Get updates: <a href="https://cgit.xengineering.eu/{{ .Params.name }}/atom">Atom feed</a></p> <p style="" class="card-last-item">Clone repository: git clone https://cgit.xengineering.eu/{{ .Params.name }}</p> diff --git a/themes/bare/layouts/index.html b/themes/bare/layouts/index.html index 2435d91..ecf8ad9 100644 --- a/themes/bare/layouts/index.html +++ b/themes/bare/layouts/index.html @@ -31,14 +31,20 @@ {{.Content}} - <h2>Projects</h2> + <h2>Active Git repositories</h2> <ul> - {{range.Site.RegularPages}} + {{ range.Site.RegularPages }} + {{ if eq .Section "git" }} + {{ if eq .Params.state "active" }} <li><a href="{{.Permalink}}">{{.Params.name}}</a> - {{.Description}}</li> - {{end}} + {{ end }} + {{ end }} + {{ end }} </ul> + <p>To also see the archived and experimental repositories have a look at the <a href="/git">list of all Git repositories</a>.</p> + <br> <hr> <footer>License: <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA</a></footer> |