2023-09-23 23:44:02 +00:00
|
|
|
{{ define "partials/list-limited.html" }} {{/* This is not pretty but I'm not
|
|
|
|
good at templates */}} {{ $params := . | transform.Unmarshal (dict "delimiter"
|
|
|
|
";") }} {{ $fields := index $params 0 }} {{ $pageurl := index $fields 0 }} {{
|
|
|
|
$pagename := index $fields 1 }} {{ $limit := 5 }} {{ $pages := where
|
|
|
|
site.RegularPages "Section" $pageurl }} {{- with $pages }}
|
2022-06-29 09:40:23 +00:00
|
|
|
<section class="post-list">
|
2023-09-23 23:44:02 +00:00
|
|
|
<h2>Latest {{$pagename}}</h2>
|
2022-06-29 09:40:23 +00:00
|
|
|
{{- range ( $pages | first $limit ) }}
|
2023-09-23 23:44:02 +00:00
|
|
|
<article>
|
|
|
|
<time datetime='{{ .Date | time.Format "2006-01-02"}}'
|
|
|
|
>{{ .Date | time.Format "2006-01-02"}}</time
|
|
|
|
>
|
|
|
|
<a class="title" href="{{ .RelPermalink }}">{{ .Title }}</a>
|
|
|
|
</article>
|
|
|
|
{{ end }} {{ if (gt ($pages | len) $limit )}}
|
|
|
|
<a href="/{{ $pageurl }}">See more…</a>
|
2022-06-29 09:40:23 +00:00
|
|
|
{{ end }}
|
|
|
|
</section>
|
2023-09-23 23:44:02 +00:00
|
|
|
{{ end }} {{ end }} {{ define "main" }}
|
2022-06-29 09:40:23 +00:00
|
|
|
<header class="site-header">
|
|
|
|
<h1 class="title">Hello, this is a webpage</h1>
|
|
|
|
</header>
|
|
|
|
<section class="intro">
|
|
|
|
<p>
|
2023-10-06 13:28:12 +00:00
|
|
|
I'm a random internet dude and I figured that if I wrote something on the
|
2023-09-23 23:44:02 +00:00
|
|
|
Internet then someone might read it, also I needed a website cause everyone
|
|
|
|
got one of those!
|
2022-06-29 09:40:23 +00:00
|
|
|
</p>
|
|
|
|
<h2>What's in this desperate corner of the net?</h2>
|
|
|
|
<p>
|
2023-10-06 13:28:12 +00:00
|
|
|
Mostly my blog where I try to discuss and review things and other resources
|
|
|
|
that I've been publishing all over the place and are in dire need of a more
|
|
|
|
permanent home. Check the links at the top or look below for the latest
|
|
|
|
posts!
|
2022-06-29 09:40:23 +00:00
|
|
|
</p>
|
2023-09-23 23:44:02 +00:00
|
|
|
<h3>Miscellaneous link collection of ultimate destiny</h3>
|
|
|
|
<p>
|
|
|
|
Find me at any of these places: {{ range $name, $link :=
|
|
|
|
$.Site.Data.home.links }}
|
|
|
|
<span class="home-link"><a href="{{ $link }}">{{ $name }}</a></span>
|
|
|
|
{{ end }}
|
|
|
|
</p>
|
|
|
|
</section>
|
2022-06-29 10:06:58 +00:00
|
|
|
|
2023-09-23 23:44:02 +00:00
|
|
|
<section class="post-list">
|
|
|
|
<h2>Browse by series</h2>
|
|
|
|
{{ range $link, $name := $.Site.Data.home.series }}
|
|
|
|
<article><a href="{{ $link }}">{{ $name }}</a></article>
|
|
|
|
{{ end }}
|
2022-06-29 09:40:23 +00:00
|
|
|
</section>
|
2023-09-23 23:44:02 +00:00
|
|
|
{{ partial "list-limited.html" "posts;posts" }} {{ partial "list-limited.html"
|
|
|
|
"pages;pages" }} {{ end }}
|