Update with custom theme files
This commit is contained in:
parent
3b303aee07
commit
0c277c2458
45 changed files with 4324 additions and 11 deletions
8
layouts/partials/cv/organisations/foo.html
Normal file
8
layouts/partials/cv/organisations/foo.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
<!--. 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 }}
|
26
layouts/partials/cv/organisations/organisation-items.html
Normal file
26
layouts/partials/cv/organisations/organisation-items.html
Normal file
|
@ -0,0 +1,26 @@
|
|||
{{ if gt ( len .content ) 4 }}
|
||||
<details id="posts" class="org-items row">
|
||||
<summary>
|
||||
<h2 class="subheading">{{ .section_title }} ({{ len .content }})</h2>
|
||||
<div class="index">
|
||||
{{ range first 4 .content }}
|
||||
{{ partial "item-tile.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</summary>
|
||||
<div class="index">
|
||||
{{ range after 4 .content }}
|
||||
{{ partial "item-tile.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</details>
|
||||
{{ else }}
|
||||
<div id="posts" class="org-items row">
|
||||
<h2 class="subheading">{{ .section_title }} ({{ len .content }})</h2>
|
||||
<div class="index">
|
||||
{{ range first 4 .content }}
|
||||
{{ partial "item-tile.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
|
@ -0,0 +1,11 @@
|
|||
{{ $titles := ( slice )}}
|
||||
|
||||
{{ range . }}
|
||||
{{ $titles = $titles | append (slice (.Title | plainify) )}}
|
||||
{{ with .Sections }}
|
||||
{{ $titles = $titles | append ( partial "cv/organisations/recursive-children-titles.html" . ) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ return $titles }}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<li class="hierarchy-item hierarchy-item--child"><a href="{{ .RelPermalink }}">{{ .Title | safeHTML }}</a>
|
||||
{{ range .Sections }}<ul>
|
||||
{{ partial "cv/organisations/recursive-children.html" . }}
|
||||
</ul>{{ end }}
|
||||
</li>
|
12
layouts/partials/cv/organisations/recursive-parents.html
Normal file
12
layouts/partials/cv/organisations/recursive-parents.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
<!--. is .c-->
|
||||
<!--$ is .g-->
|
||||
|
||||
{{ $scratch := .g.Scratch }}
|
||||
{{ if .c.Parent }}
|
||||
{{ if ne .c.Parent.Type "cv/organisations" }}
|
||||
{{ with .c.Parent }}
|
||||
{{ $scratch.Add "parents" ( slice . ) }}
|
||||
{{ partial "cv/organisations/recursive-parents.html" (dict "c" . "g" $.g ) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue