update theme
This commit is contained in:
parent
ee87009471
commit
920db1a5ce
43 changed files with 848 additions and 6444 deletions
|
@ -1,8 +0,0 @@
|
|||
<!--. is .c-->
|
||||
<!--$ is .g-->
|
||||
|
||||
{{ $scratch := .g.Scratch }}
|
||||
{{ with ( where ( where .g.Site.Pages "Type" "organisations" ) "Params.parent" .g.File.ContentBaseName ) }}
|
||||
{{ $scratch.Add "children" ( slice . ) }}
|
||||
{{ partial "cv/organisations/recursive-children.html" (dict "c" . "g" $.g ) }}
|
||||
{{ end }}
|
32
layouts/partials/cv/organisations/items-table.html
Normal file
32
layouts/partials/cv/organisations/items-table.html
Normal file
|
@ -0,0 +1,32 @@
|
|||
<section class="site-content__body">
|
||||
<table class="organisations-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Logo</th>
|
||||
<th>Title</th>
|
||||
<th>Children</th>
|
||||
<th>Items</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ range .Pages }}
|
||||
<tr>
|
||||
<td>
|
||||
{{- if .Params.featured_image -}}
|
||||
<img width="150" height="auto" loading="lazy" src="
|
||||
{{- if .Resources.GetMatch .Params.featured_image -}}
|
||||
{{- ( .Resources.GetMatch .Params.featured_image ).RelPermalink -}}
|
||||
{{- else -}}
|
||||
{{- .Params.featured_image -}}
|
||||
{{- end -}}
|
||||
">
|
||||
{{- end -}}
|
||||
</td>
|
||||
<td><a href="{{ .RelPermalink }}">{{ .Title | safeHTML }}</a></td>
|
||||
<td>{{- if gt (len .Sections) 0 -}}✔{{- end -}}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
9
layouts/partials/cv/organisations/reverse-slice.html
Normal file
9
layouts/partials/cv/organisations/reverse-slice.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
<!-- Source: https://discourse.gohugo.io/t/reverse-array/28753/2 -->
|
||||
|
||||
{{- $sliceOriginal := . -}}
|
||||
{{- $len := len $sliceOriginal -}}
|
||||
{{- $sliceReversed := slice -}}
|
||||
{{- range seq $len -}}
|
||||
{{- $sliceReversed = $sliceReversed | append (index $sliceOriginal (sub $len .)) }}
|
||||
{{- end -}}
|
||||
{{- return $sliceReversed -}}
|
Loading…
Add table
Add a link
Reference in a new issue