adds utility to put partials under page content
This commit is contained in:
parent
a145ee2e65
commit
0138e19dbf
@ -1,3 +1,8 @@
|
||||
---
|
||||
title: "About"
|
||||
include_partials: ["facilitator-list.html"]
|
||||
---
|
||||
|
||||
The Protocol Oral History Project is an effort to honor and share the stories of protocol artists—the skilled builders and stewards of the rules, standards, and norms that shape our lives in often invisible ways, ranging from technical standards and diplomatic practices to Indigenous traditions and radical subcultures.
|
||||
|
||||
The color scheme is inspired by _[Constitutional Wampum](http://n2t.net/ark:/65665/ws63912f5dd-e703-4759-8c31-33ac98b3c190)_ by Robert Houle.
|
||||
|
@ -1,12 +1,17 @@
|
||||
{{ define "main" }}
|
||||
|
||||
<article class="single-default">
|
||||
|
||||
<header class="mb-4">{{ partial "article-wompum.html" . }}</header>
|
||||
|
||||
<div class="prose lg:prose-xl p-4 mx-auto">
|
||||
<p class="font-bold text-4xl">{{ .Title }}</p>
|
||||
{{ .Content }}
|
||||
|
||||
{{/* Check for additional partials to include */}}
|
||||
{{ with .Params.include_partials }}
|
||||
{{ range . }}
|
||||
{{ partial . $ }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
20
layouts/partials/facilitator-list.html
Normal file
20
layouts/partials/facilitator-list.html
Normal file
@ -0,0 +1,20 @@
|
||||
<section>
|
||||
<h2 class="text-4xl mb-4 font-iosevka">Facilitators</h2>
|
||||
<div class="tag-cloud font-iosevka text-gray-600">
|
||||
{{ $facilitators := slice }}
|
||||
{{ range .Site.RegularPages }}
|
||||
{{ with .Params.facilitator }}
|
||||
{{ $facilitators = $facilitators | append . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ $facilitators = $facilitators | uniq | sort }}
|
||||
{{ range $facilitator := $facilitators }}
|
||||
<a href="{{ " facilitators/" | relLangURL }}{{ $facilitator | urlize }}"
|
||||
class="tag inline-block p-2 my-1 border border-gray-100 rounded-lg hover:bg-yellow-100 whitespace-nowrap"
|
||||
style="font-size: 1rem;">
|
||||
{{ $facilitator }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</section>
|
||||
|
Loading…
x
Reference in New Issue
Block a user