use common *.baseof.html
templates
This commit is contained in:
parent
4e67efab84
commit
af68a0e22d
19 changed files with 486 additions and 408 deletions
45
layouts/cv/cv.html
Normal file
45
layouts/cv/cv.html
Normal file
|
@ -0,0 +1,45 @@
|
|||
{{ 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" }}
|
||||
<header class="site-content__header">
|
||||
<h2 class="page-title">{{- .Title | safeHTML -}}. {{ if not ( or ( eq .Type "cv" ) ( eq .Type "cv/organisations" ) ) -}}
|
||||
{{- range .AlternativeOutputFormats -}}
|
||||
<a href="{{- .RelPermalink -}}" aria-label="{{- $.Title -}} RSS feed">
|
||||
<img class="feed-icon" alt="RSS feed" src="{{- $.Site.Params.feedIcon -}}">
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</h2>
|
||||
|
||||
{{- .Content -}}
|
||||
|
||||
<nav class="page-header__minor-links">
|
||||
<ul>
|
||||
{{- range ( where .Sections "Type" "not in" ( slice "cv/roles" ) ).ByTitle }}
|
||||
<li><a href="{{- .RelPermalink -}}"><h3>{{- .Title -}}</h3></a> <p>({{- len (where ( where .Site.Pages "Section" "cv" ) "Parent.Title" .Title ) -}})</p></li>
|
||||
{{- end -}}
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
{{- partialCached "cv/timeline-legend.html" . -}}
|
||||
</header>
|
||||
{{ end }}
|
||||
|
||||
{{ define "main-body" }}
|
||||
<article class="site-content__body site-content__body--chart">
|
||||
<div id="timeline" aria-label="Roles timeline" role="img" height="70vh">Javascript must be enabled to view this chart.</div>
|
||||
</article>
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue