refactor templates layout
@see https://gohugo.io/templates/new-templatesystem-overview/
This commit is contained in:
parent
a83f339dc8
commit
230c46411b
102 changed files with 2 additions and 2 deletions
|
@ -1,21 +0,0 @@
|
|||
{{- /*
|
||||
Displays the categories for an item.
|
||||
|
||||
@params categories The item's categories.
|
||||
*/
|
||||
-}}
|
||||
|
||||
|
||||
<section
|
||||
id="post-categories"
|
||||
class="article-footer__categories"
|
||||
aria-labelledby="post-categories-title"
|
||||
itemprop="articleSection"
|
||||
>
|
||||
<h3 id="post-categories-title">Categories</h3>
|
||||
<ul>
|
||||
{{- range .categories -}}
|
||||
<li class="p-category"><a href="{{ .RelPermalink }}">{{ .LinkTitle | safeHTML }}</a></li>
|
||||
{{- end -}}
|
||||
</ul>
|
||||
</section>
|
|
@ -1,19 +0,0 @@
|
|||
{{- /*
|
||||
Displays the life areas for an item.
|
||||
|
||||
@params areas The item's life areas.
|
||||
*/
|
||||
-}}
|
||||
|
||||
|
||||
<section
|
||||
class="article-footer__links"
|
||||
itemprop="articleSection"
|
||||
>
|
||||
<h3 id="item-areas-title">Areas</h3>
|
||||
<ul>
|
||||
{{- range .areas.ByTitle -}}
|
||||
<li class="p-category"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
|
||||
{{- end -}}
|
||||
</ul>
|
||||
</section>
|
|
@ -1,23 +0,0 @@
|
|||
{{- /*
|
||||
Displays the locations for an item.
|
||||
|
||||
@params locations The locations or the item.
|
||||
*/
|
||||
-}}
|
||||
|
||||
|
||||
<section
|
||||
id="post-locations"
|
||||
class="article-footer__locations"
|
||||
>
|
||||
<h3>Locations</h3>
|
||||
<div
|
||||
id="map"
|
||||
style="width: 100%; height: 500px; margin: 0; display: block;"
|
||||
></div>
|
||||
<ul style="display: none">
|
||||
{{- range .locations.ByTitle -}}
|
||||
<li class="p-location"><a href="{{ .RelPermalink }}">{{ .LinkTitle | safeHTML }}</a></li>
|
||||
{{- end -}}
|
||||
</ul>
|
||||
</section>
|
|
@ -1,31 +0,0 @@
|
|||
{{- /*
|
||||
Displays the organisations for an item.
|
||||
|
||||
@params pc The page context.
|
||||
@params sc The site context.
|
||||
*/
|
||||
-}}
|
||||
|
||||
|
||||
<section
|
||||
id="post-organisations"
|
||||
class="article-footer__organisations"
|
||||
itemprop="articleSection"
|
||||
>
|
||||
<h3>Organisations</h3>
|
||||
<ul>
|
||||
{{ $all_organisations := partialCached "get_all_organisations.html" .pc }}
|
||||
<!-- TODO: Replace with hierarchy partial -->
|
||||
{{- range ( .pc.GetTerms "organisations" ) -}}
|
||||
{{ $matched_organisations := ( union ( union ( where $all_organisations "Title" ( .Title | plainify ) ) ( where $all_organisations "Params.abbreviation" ( .Title | plainify ) ) ) ( where $all_organisations "Params.fka" ( .Title | plainify ) ) ) }}
|
||||
{{ with $matched_organisations }}
|
||||
{{ range . }}
|
||||
{{ partial "cv/organisation/get-title.html" ( dict "organisation" . "site_redact" $.sc.Site.Params.redact ) .File.Dir }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ erroridf "missing-organisation" "Could not find organisation %q (%q)" .Title $.sc.File.Path }}
|
||||
<li>{{ default .Title .Params.markup_title | .Page.RenderString }}</li>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
</ul>
|
||||
</section>
|
|
@ -1,30 +0,0 @@
|
|||
{{- /*
|
||||
Displays the skills for an item.
|
||||
|
||||
@params pc The page context.
|
||||
@params skills The item's skills
|
||||
@params skills_ciisec_levels The matched CIISec levels for the skills. Optional.
|
||||
*/
|
||||
-}}
|
||||
|
||||
|
||||
<section
|
||||
class="article-footer__links"
|
||||
itemprop="articleSection"
|
||||
>
|
||||
<h3 id="item-skills-title">Skills</h3>
|
||||
<ul>
|
||||
{{- .pc.Scratch.Set "i" 0 -}}
|
||||
{{- range .skills.ByTitle -}}
|
||||
{{- if hasPrefix .LinkTitle "CIISec/" -}}
|
||||
<li class="p-category">
|
||||
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
|
||||
<span class="level">(level {{ index $.skills_ciisec_levels ( $.pc.Scratch.Get "i" ) }})</span>
|
||||
</li>
|
||||
{{- $.pc.Scratch.Add "i" 1 -}}
|
||||
{{- else -}}
|
||||
<li class="p-category"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</ul>
|
||||
</section>
|
|
@ -1,19 +0,0 @@
|
|||
{{- /*
|
||||
Displays the tags for an item.
|
||||
|
||||
@params tags The tags or the item.
|
||||
*/
|
||||
-}}
|
||||
|
||||
|
||||
<section
|
||||
id="post-tags"
|
||||
class="article-footer__tags"
|
||||
>
|
||||
<h3>Tags</h3>
|
||||
<ul>
|
||||
{{- range .tags.ByTitle -}}
|
||||
<li class="p-category"><a href="{{ .RelPermalink }}">{{ .LinkTitle | safeHTML }}</a></li>
|
||||
{{- end -}}
|
||||
</ul>
|
||||
</section>
|
Loading…
Add table
Add a link
Reference in a new issue