fix: template layouts resulting in missing singles
This commit is contained in:
parent
628acae725
commit
a2a1dd2a7c
7 changed files with 44 additions and 26 deletions
|
@ -1,7 +1,6 @@
|
|||
---
|
||||
title: CV
|
||||
layout: cv
|
||||
type: cv
|
||||
layout: cv-root
|
||||
---
|
||||
|
||||
This section is for things you have done in your life, e.g. jobs, roles,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: Portfolio
|
||||
type: portfolio
|
||||
layout: portfolio-root
|
||||
---
|
||||
|
||||
This section is for things you have produced, whatever their formats and media.
|
||||
|
|
|
@ -21,17 +21,17 @@
|
|||
<!-- Rendering -->
|
||||
|
||||
<section
|
||||
class="article-body__corrigendum"
|
||||
class="article-body__corrigenda"
|
||||
itemprop="correction"
|
||||
itemscope
|
||||
itemtype="https://schema.org/CorrectionComment"
|
||||
>
|
||||
<h2
|
||||
class="subheading subheading--corrigendum"
|
||||
id="corrigendum"
|
||||
class="subheading subheading--corrigenda"
|
||||
id="corrigenda"
|
||||
>
|
||||
Corrigendum
|
||||
Corrigenda
|
||||
</h2>
|
||||
{{ $file := path.Join $.sc.Page.File.Dir "corrigendum.md" | readFile }}
|
||||
{{ $file := path.Join $.sc.Page.File.Dir "corrigenda.md" | readFile }}
|
||||
{{ $file | .pc.RenderString }}
|
||||
</section>
|
|
@ -1,16 +1,12 @@
|
|||
{{ define "main-class" }}--section layouts-cv-cv{{ end }}
|
||||
|
||||
{{ define "header-scripts" }}
|
||||
{{ if ( or ( eq .Type "cv" ) ( .IsDescendant ( .GetPage "/cv/organisations" ) ) ) }}
|
||||
<script id="Google-Charts-script" src="/js/google-charts/google-charts.js"></script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "footer-scripts" }}
|
||||
{{ if ( not ( .IsDescendant ( .GetPage "/cv/organisations" ) ) ) }}
|
||||
{{ $js := resources.Get "js/roles-chart.js" | resources.ExecuteAsTemplate "/js/render-roles-timeline.js" ( .GetPage "cv/roles" ) | resources.Fingerprint }}
|
||||
<script src="{{ $js.RelPermalink }}" integrity="{{ $js.Data.Integrity }}"></script>
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
|
||||
{{ define "main-header" }}
|
|
@ -10,17 +10,10 @@
|
|||
{{ end }}
|
||||
</h2>
|
||||
{{ .Content }}
|
||||
|
||||
{{ if ne .Type "portfolio" }}
|
||||
<nav class="page-header__minor-links">
|
||||
{{ partial "years-list.html" . }}
|
||||
</nav>
|
||||
{{ end }}
|
||||
</header>
|
||||
{{ end }}
|
||||
|
||||
{{ define "main-body" }}
|
||||
{{ if eq .Type "portfolio" }}
|
||||
<article class="site-content__body site-content__body--list">
|
||||
<ul class="site-content__sections-list">
|
||||
{{ range .Sections.ByWeight }}
|
||||
|
@ -29,7 +22,4 @@
|
|||
{{ end }}
|
||||
</ul>
|
||||
</article>
|
||||
{{ else }}
|
||||
{{ partial "items-grid.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
22
layouts/section.html
Normal file
22
layouts/section.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
{{ define "main-class" }}--section layouts-default-section{{ end }}
|
||||
|
||||
{{ define "main-header" }}
|
||||
<header class="site-content__header">
|
||||
<h2 class="page-title">{{ .Title | safeHTML }}.
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
<a href="{{ .RelPermalink }}">
|
||||
<img class="feed-icon" src="{{ $.Site.Params.feedIcon }}">
|
||||
</a>
|
||||
{{ end }}
|
||||
</h2>
|
||||
{{ .Content }}
|
||||
|
||||
<nav class="page-header__minor-links">
|
||||
{{ partial "years-list.html" . }}
|
||||
</nav>
|
||||
</header>
|
||||
{{ end }}
|
||||
|
||||
{{ define "main-body" }}
|
||||
{{ partial "items-grid.html" . }}
|
||||
{{ end }}
|
11
layouts/single.html
Normal file
11
layouts/single.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
{{ define "main-class" }}--single layouts-default-single{{ end }}
|
||||
|
||||
{{ define "main-body-additional" }}
|
||||
{{ if fileExists ( path.Join $.Page.File.Dir "appendices.md" ) }}
|
||||
{{- partial "single/main-body/appendices.html" ( dict "pc" . "sc" $ ) -}}
|
||||
{{ end }}
|
||||
|
||||
{{ if fileExists ( path.Join $.Page.File.Dir "corrigenda.md" ) }}
|
||||
{{- partial "single/main-body/corrigenda.html" ( dict "pc" . "sc" $ ) -}}
|
||||
{{ end }}
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue