diff options
author | Dennis Eriksen <d@ennis.no> | 2019-11-06 14:56:42 +0100 |
---|---|---|
committer | Dennis Eriksen <d@ennis.no> | 2019-11-06 14:56:42 +0100 |
commit | ae72154594a25b5248581b5414ff62fcd5197c3b (patch) | |
tree | 8788bed867e4101914d2ca7c3f8d1b70d1b1cd3c | |
parent | fixing typo in license-link (diff) | |
download | riker-ae72154594a25b5248581b5414ff62fcd5197c3b.tar.gz |
testing out microblogging
-rw-r--r-- | archetypes/micro.md | 3 | ||||
-rw-r--r-- | layouts/index.html | 11 | ||||
-rw-r--r-- | layouts/micro/index.html | 16 | ||||
-rw-r--r-- | layouts/micro/list.html | 23 | ||||
-rw-r--r-- | layouts/micro/single.html | 11 |
5 files changed, 64 insertions, 0 deletions
diff --git a/archetypes/micro.md b/archetypes/micro.md new file mode 100644 index 0000000..0d42a95 --- /dev/null +++ b/archetypes/micro.md @@ -0,0 +1,3 @@ +--- +date: {{ .Date }} +--- diff --git a/layouts/index.html b/layouts/index.html index 4f74872..7516cf1 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -6,6 +6,17 @@ </header> <main> <p>{{ .Site.Params.intro }}</p> +<div class="microblog"> + <h2>Microblog</h2> + {{ range (where .Site.RegularPages "Type" "micro") }} + <article class="list-item"> + {{ .Summary }} + {{ if .Truncated }} + <a href="{{ .RelPermalink }}">Read more</a> + {{ end }} + </article> + {{ end }} +</div> <div class="archive"> <h2>Archive</h2> {{ range (where .Site.RegularPages "Type" "post").GroupByDate "2006" }} diff --git a/layouts/micro/index.html b/layouts/micro/index.html new file mode 100644 index 0000000..e69e3bf --- /dev/null +++ b/layouts/micro/index.html @@ -0,0 +1,16 @@ +{{ partial "head" . }} +<main> + + {{ .Content }} + <ul class="contents"> + {{ range .Paginator.Pages }} + <li>{{.Title}} + <div> + {{ .Summary }} + </div> + </li> + {{ end }} + </ul> + +</main> +{{ partial "footer" . }} diff --git a/layouts/micro/list.html b/layouts/micro/list.html new file mode 100644 index 0000000..030d847 --- /dev/null +++ b/layouts/micro/list.html @@ -0,0 +1,23 @@ +{{ partial "head" . }} + +<header> + <a href="/"><img id="logo" src="{{ .Site.Params.logo }}" /></a> + <h1>{{ .Title }}</h1> +</header> +<main> +<p>{{ .Site.Params.intro }}</p> +<div class="archive"> + <h2>Archive</h2> + {{ range (where .Site.RegularPages "Type" "micro").GroupByDate "2006" }} + <h3 class="archive-title">{{ .Key }}</h3> + {{ range .Pages }} + <article class="list-item"> + <a href="{{ .Permalink }}" class="list-item-link">{{ .Title }}</a> + <span class="list-item-date">{{ .Date.Format "January 2, 2006" }}</span> +{{ .Content }} + </article> + {{ end }} + {{ end }} +</div> +</main> +{{ partial "footer" . }} diff --git a/layouts/micro/single.html b/layouts/micro/single.html new file mode 100644 index 0000000..d091c16 --- /dev/null +++ b/layouts/micro/single.html @@ -0,0 +1,11 @@ +{{ partial "head" . }} +<main> + <article> + <h1>{{ .Title }} LOL</h1> + <span class="single-date">{{ .Date.Format "January 2, 2006" }}</span> +{{ if ne (.Lastmod.Format "January 2, 2006") (.Date.Format "January 2, 2006") }} <br><span class="single-date"><small>Last modified {{ .Lastmod.Format "January 2, 2006" }}</small></span>{{ end }} + +{{ .Content }} + </article> +</main> +{{ partial "footer" . }} |