Gemini: Homepage

This commit is contained in:
JP Hastings-Spital 2024-04-29 23:25:55 +01:00
parent 3364fac15c
commit 76cf7da9ad
10 changed files with 100 additions and 52 deletions

View file

@ -1,6 +1,7 @@
---
title: Open Source Quality Institutes
date: "2024-04-03T07:43:01Z"
emoji: 📐
publishDate: "2024-04-01T00:00:00Z"
bookmarkOf: https://www.tbray.org/ongoing/When/202x/2024/04/01/OSQI
references:

View file

@ -1,6 +1,7 @@
---
date: 2024-03-01T08:41:57.157Z
publishDate: 2024-03-01T08:41:57.157Z
emoji: 🎮
title: Playable Quotes
category:
- games

View file

@ -1,6 +1,7 @@
---
date: 2024-02-23T14:55:13.977Z
publishDate: 2024-02-23T14:55:13.977Z
emoji: 📅
title: Volunteer Amnesty Day
bookmarkOf: https://www.volunteeramnestyday.net/
references:

View file

@ -14,4 +14,6 @@ location:
summary: Short talks about interesting things.
---
I'm actually really excited for this; I've been to similar conferences in the past and loved them. (I even ran a mini lecture series event in my lat twenties). I'm hoping to meet a whole bunch of interesting people, and be inspired by their passions!
> Short talks about interesting things. Same old same old.

View file

@ -0,0 +1,36 @@
{{ block "main" . }}{{ end }}
# Postscript
{{- $type := .Type -}}
{{- $paginateType := (partial "article-type.txt" (default "page" $type)) | pluralize -}}
{{- with .NextInSection }}
=> {{ .RelPermalink }} Next post: {{ partial "page-title.txt" . }}{{ end }}
{{- with .PrevInSection }}
=> {{ .RelPermalink }} Previous post: {{ partial "page-title.txt" . }}{{ end }}
{{ if eq .Kind "section" }}{{ with .Paginator.Next }}
=> {{ .URL }} Next page of {{ $paginateType }}{{ end }}
{{- with .Paginator.Prev }}
=> {{ .URL }} Previous page of {{ $paginateType }}{{ end }}{{ end }}
=> https://www.byjp.me{{ replace .RelPermalink "index.gmi" "" }} View this page on the WWW
{{ $dateType := "published" -}}
{{- $date := .Date -}}
{{- if not .Date -}}
{{- $date = .Lastmod -}}
{{- $dateType := "last updated" -}}
{{- end -}}
{{- if .IsNode }}{{ $type = "page" }}{{ end -}}
This {{ partial "article-type.txt" (default "page" $type) }} was {{ $dateType }} by {{ .Params.author | default "JP" }} on **{{ $date.Format (.Site.Params.dateFormat | default "2 January 2006") }}**
{{- if not .Params.geminiAware }}, originally in markdown and _without_ Gemini in mind, so things might look a little odd!{{else}}.{{ end }}
{{- with .Params.tags }}
I've not quite figured out if hashtags are useful in a Gemini context, but this post was tagged with{{ range (. | sort) }} #{{ . }}{{ end -}}.
{{- end }}
You may also want to visit:
=> / 🏡 Home
{{ range .Site.Menus.main -}}
=> {{ .URL | relURL }} {{ .Name }}
{{ end -}}

View file

@ -1,3 +1,4 @@
{{- define "main" -}}
# {{ with .Params.emoji }}{{.}} {{end}}{{ title (replace .Title "-" " ") }}
{{- with .Page.RenderShortcodes }}
@ -10,17 +11,5 @@
{{ range .Pages -}}
=> {{ .RelPermalink }} {{ with .Params.emoji }}{{ . }} {{ end }}{{ partial "page-title.txt" . }}
{{ end -}}
{{- end }}
# Postscript
{{ with .Paginator.Next }}
=> {{ .URL }} Next page{{ end }}
{{- with .Paginator.Prev }}
=> {{ .URL }} Previous page{{ end }}
You may also want to visit:
=> / 🏡 Home
{{ range .Site.Menus.main -}}
=> {{ .URL | relURL }} {{ .Name }}
{{ end -}}
{{- end -}}
{{- end -}}

View file

@ -1,39 +1,11 @@
# {{ .Title | default (partial "page-title.txt" .) }}
{{- define "main" -}}
# {{ with .Params.emoji }}{{.}} {{end}}{{ .Title | default (partial "page-title.txt" .) }}
{{ partial "reference-to.gmi" . -}}
{{- with .Params.media }}{{ range . -}}
{{ partial "reference-to.gmi" . }}
{{ with .Params.media }}{{ range . -}}
{{- partial "image.gmi" (dict "src" .url) -}}
{{- end }}
{{ end -}}
{{- partial "markdown.gmi" .Page.RenderShortcodes -}}
# Postscript
=> https://www.byjp.me{{ replace .RelPermalink "index.gmi" "" }} View this page on the WWW
{{- with .NextInSection }}
=> {{ .RelPermalink }} Next post: {{ partial "page-title.txt" . }}{{ end }}
{{- with .PrevInSection }}
=> {{ .RelPermalink }} Previous post: {{ partial "page-title.txt" . }}{{ end }}
{{ $dateType := "published" -}}
{{- $date := .Date -}}
{{- if not .Date -}}
{{- $date = .Lastmod -}}
{{- $dateType := "last updated" -}}
{{- end -}}
This post was {{ $dateType }} by {{ .Params.author | default "JP" }} on **{{ $date.Format (.Site.Params.dateFormat | default "2 January 2006") }}**
{{- if not .Params.geminiAware }}, originally in markdown and _without_ Gemini in mind, so things might look a little odd!{{else}}.{{ end }}
{{- with .Params.tags }}
I've not quite figured out if hashtags are useful in a Gemini context, but this post was tagged with{{ range (. | sort) }} #{{ . }}{{ end -}}.
{{- end }}
You may also want to visit:
=> / 🏡 Home
{{ range .Site.Menus.main -}}
=> {{ .URL | relURL }} {{ .Name }}
{{ end -}}

View file

@ -1,5 +1,50 @@
## List of posts
{{- define "main" -}}
# byJP
{{ range .RegularPages }}
=> {{ .RelPermalink }} {{ .Title }}
{{ (partial "about-me.html" .) | plainify }}
{{ (partial "intro.html" .) | plainify }}
## Recent posts
Some of my recent (and more substantial) writing.
{{ $posts := where .Site.RegularPages "Section" "in" (slice "posts" "bookmarks" "poetry") -}}
{{- range ($posts.ByPublishDate.Reverse | first 6) }}
=> {{.RelPermalink}} {{ with .Params.emoji }}{{.}} {{end}}{{- with .Title -}}{{ . }}{{ else }}{{ .Type | singularize | title }}{{ end -}}
{{- end }}
=> /posts/ 📔 More posts (my longer articles)
=> /bookmarks/ 🔖 More bookmarks (my thoughts on others' interesting writing)
## Upcoming events
{{ $allEvents := where .Site.RegularPages "Section" "calendar" -}}
{{- $upcomingEvents := slice -}}
{{- range $eventPage := $allEvents -}}
{{- range $eventPage.Params.timings -}}
{{- $event := dict "Title" $eventPage.Title "Page" $eventPage.Page "Date" (time.AsTime .starts) "Duration" (partial "iso8601.duration" .duration) -}}
{{- if $event.Date.Before time.Now }}{{ continue }}{{ end -}}
{{- $upcomingEvents = sort ($upcomingEvents | append $event) "Date" "asc" -}}
{{- break -}}{{/* Only show the first on the list */}}
{{- end -}}
{{- end -}}
{{- if ge (len $upcomingEvents) 2 -}}
Maybe you'll see me at **{{ (index $upcomingEvents 0).Title }}** on {{ (partial "year-relative-date.html" (index $upcomingEvents 0).Date) | plainify }}, or **{{ (index $upcomingEvents 1).Title }}** on {{ (partial "year-relative-date.html" (index $upcomingEvents 1).Date) | plainify }}.
Get in touch if you'd like to go to these, or any other events⁺, together!
=> {{ (index $upcomingEvents 0).Page.RelPermalink }} {{ (index $upcomingEvents 0).Title }}
=> {{ (index $upcomingEvents 1).Page.RelPermalink }} {{ (index $upcomingEvents 1).Title }}
=> /calendar/ 🗓️ My events calendar
{{ end }}
## A recent note
{{ $notePage := index (where .Site.RegularPages "Section" "eq" "notes") 0 -}}
{{ with $notePage }}{{ partial "markdown.gmi" .Page.RenderShortcodes }}{{ end }}
## Me, elsewhere
You can find me across the world wide web; here are a handful of ways to get in touch.
{{ range .Site.Params.social }}
=> {{ .url }} {{ .name | humanize }}
{{- end -}}
{{- end }}

View file

@ -0,0 +1,3 @@
<p class="intro">
This space is a much loved wild garden; things aren't perfectly organised, there are lots of nooks and crannies to explore. Follow your nose and see where you end up.
</p>

View file

@ -1,7 +1,5 @@
<div class="previews">
<p class="intro">
This site is a much loved wild garden; things aren't perfectly orgnaised, there are lots of nooks and crannies to explore. Follow your nose and see where you end up.
</p>
{{ partial "intro.html" }}
<ol class="small-post-list">
{{- $posts := where .Site.RegularPages "Section" "in" (slice "posts" "bookmarks" "poetry") -}}