Omphaloskepsis-2/layouts/partials/post-meta.html

92 lines
3.7 KiB
HTML
Raw Permalink Normal View History

2022-11-11 05:48:02 +00:00
<footer class="site-content__footer">
2023-07-01 03:16:59 +00:00
<h2>Meta</h2>
2022-11-11 05:48:02 +00:00
{{- if .GetTerms "categories" -}}
2023-07-01 03:16:59 +00:00
<section id="post-categories" class="article-footer__categories" aria-labelledby="post-categories-title" itemprop="articleSection">
<h3 id="post-categories-title">Categories</h3>
2022-11-11 05:48:02 +00:00
<ul>
{{- range (.GetTerms "categories") -}}
2023-07-01 03:16:59 +00:00
<li class="p-category"><a href="{{ .RelPermalink }}">{{ .LinkTitle | safeHTML }}</a></li>
2022-11-11 05:48:02 +00:00
{{- end -}}
</ul>
</section>
{{- end -}}
2023-01-29 18:50:16 +00:00
{{- if .GetTerms "areas" -}}
2023-07-01 03:16:59 +00:00
<section class="article-footer__links" itemprop="articleSection">
<h3 id="item-areas-title">Areas</h3>
2023-01-29 18:50:16 +00:00
<ul>
{{- range ( .GetTerms "areas" ).ByTitle -}}
2023-07-01 03:16:59 +00:00
<li class="p-category"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
2023-01-29 18:50:16 +00:00
{{- end -}}
</ul>
</section>
{{- end -}}
2023-08-07 22:23:46 +00:00
{{- if .GetTerms "skills" -}}
<section class="article-footer__links" itemprop="articleSection">
<h3 id="item-skills-title">Skills</h3>
<ul>
{{- .Scratch.Set "i" 0 -}}
{{- range ( .GetTerms "skills" ).ByTitle -}}
{{- if hasPrefix .LinkTitle "CIISec/" -}}
2023-12-12 22:40:30 +00:00
<li class="p-category"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a> <span class="level">(level {{ index $.Params.skills_ciisec_levels ( $.Scratch.Get "i" ) }})</span></li>
2023-08-07 22:23:46 +00:00
{{- $.Scratch.Add "i" 1 -}}
{{- else -}}
<li class="p-category"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
{{- end -}}
{{- end -}}
</ul>
</section>
{{- end -}}
2024-02-04 01:40:15 +00:00
2022-11-11 05:48:02 +00:00
{{- if .GetTerms "organisations" -}}
2023-10-03 12:08:35 +00:00
<section id="post-organisations" class="article-footer__organisations" itemprop="articleSection">
<h3>Organisations</h3>
2022-11-11 05:48:02 +00:00
<ul>
{{ $all_organisations := partialCached "get_all_organisations.html" . }}
<!-- TODO: Replace with hierarchy partial -->
{{- range ( .GetTerms "organisations" ) -}}
2024-02-04 01:40:15 +00:00
{{ with ( union ( union ( where $all_organisations "Title" ( .Title | plainify ) ) ( where $all_organisations "Params.abbreviation" ( .Title | plainify ) ) ) ( where $all_organisations "Params.fka" ( .Title | plainify ) ) ) }}
2023-10-03 12:08:35 +00:00
{{ range . }}
2023-12-12 22:40:30 +00:00
{{- if ( and ( .Params.redact ) ( ne $.Site.Params.redact "show" ) ) -}}
{{- if ( eq $.Site.Params.redact "black" ) -}}
<li>{{- partialCached "redact-black.html" . -}}</li>
{{- end -}}
{{- else -}}
<li><a href="{{ .RelPermalink }}">{{ if ( .Params.markup_title ) }}{{ .Params.markup_title | safeHTML }}{{ else }}{{ .Title }}{{ end }}</a></li>
{{- end -}}
2022-11-11 05:48:02 +00:00
{{ end }}
2023-10-03 12:08:35 +00:00
{{ else }}
{{ erroridf "missing-organisation" "Could not find organisation %q (%q)" .Title $.File.Path }}
<li>{{ if ( .Params.markup_title ) }}{{ .Params.markup_title | safeHTML }}{{ else }}{{ .Title }}{{ end }}</li>
{{ end }}
2022-11-11 05:48:02 +00:00
{{- end -}}
</ul>
</section>
{{- end -}}
2024-02-04 01:40:15 +00:00
2022-11-11 05:48:02 +00:00
{{- if .GetTerms "locations" -}}
2023-10-03 12:08:35 +00:00
<section id="post-locations" class="article-footer__locations">
<h3>Locations</h3>
2023-07-01 03:16:59 +00:00
<div id="map" style="width: 100%; height: 500px; margin: 0; display: block;"></div>
<ul style="display: none">
{{- range ( .GetTerms "locations" ).ByTitle -}}
<li class="p-location"><a href="{{ .RelPermalink }}">{{ .LinkTitle | safeHTML }}</a></li>
{{- end -}}
</ul>
2022-11-11 05:48:02 +00:00
</section>
{{- end -}}
2024-02-04 01:40:15 +00:00
2022-11-11 05:48:02 +00:00
{{- if .GetTerms "tags" -}}
2023-10-03 12:08:35 +00:00
<section id="post-tags" class="article-footer__tags">
<h3>Tags</h3>
2022-11-11 05:48:02 +00:00
<ul>
{{- range ( .GetTerms "tags" ).ByTitle -}}
2023-07-01 03:16:59 +00:00
<li class="p-category"><a href="{{ .RelPermalink }}">{{ .LinkTitle | safeHTML }}</a></li>
2022-11-11 05:48:02 +00:00
{{- end -}}
</ul>
</section>
{{- end -}}
</footer>