Compare commits

..

4 commits

12 changed files with 55 additions and 32 deletions

View file

@ -1,13 +1,17 @@
.site-footer { .site-footer {
grid-area: footer; grid-area: footer;
display: block; display: block;
inline-size: 100%;; /* Overflows right of viewport otherwise */ inline-size: 100%; /* Overflows right of viewport otherwise */
position: fixed;
inset-block-end: 0; @include mq("medium") {
position: fixed;
inset-block-end: 0;
}
& p { & p {
text-align: center; text-align: center;
background: $light; background: $light;
margin-block-start: 0;
padding: 0.4em; padding: 0.4em;
margin-block-end: unset; margin-block-end: unset;
border-block-end: none; border-block-end: none;

View file

@ -24,7 +24,7 @@
". page-container ." ". page-container ."
"footer footer footer"; "footer footer footer";
border: 2px solid black; border: 2px solid black;
margin-inline: 2em; margin: 2em;
} }
&--homepage { &--homepage {

View file

@ -66,3 +66,4 @@ markup:
ignoreErrors: ignoreErrors:
- "missing-cite" - "missing-cite"
- "size-set-on-non-resizable"

View file

@ -1,7 +1,6 @@
--- ---
title: CV title: CV
layout: cv layout: cv-root
type: cv
--- ---
This section is for things you have done in your life, e.g. jobs, roles, This section is for things you have done in your life, e.g. jobs, roles,

View file

@ -1,6 +1,6 @@
--- ---
title: Portfolio title: Portfolio
type: portfolio layout: portfolio-root
--- ---
This section is for things you have produced, whatever their formats and media. This section is for things you have produced, whatever their formats and media.

View file

@ -33,7 +33,7 @@
{{- warnf "Requested size %s is more than image width %d (%q)" $width $img.Width $img.File.Path -}} {{- warnf "Requested size %s is more than image width %d (%q)" $width $img.Width $img.File.Path -}}
{{- end -}} {{- end -}}
{{- else -}} {{- else -}}
{{- warnf "Size set on non-resizable image of type %s; ignoring" $img.MediaType.SubType -}} {{- warnidf "size-set-on-non-resizable" "Size set on non-resizable image of type %s; ignoring" $img.MediaType.SubType -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}

View file

@ -21,17 +21,17 @@
<!-- Rendering --> <!-- Rendering -->
<section <section
class="article-body__corrigendum" class="article-body__corrigenda"
itemprop="correction" itemprop="correction"
itemscope itemscope
itemtype="https://schema.org/CorrectionComment" itemtype="https://schema.org/CorrectionComment"
> >
<h2 <h2
class="subheading subheading--corrigendum" class="subheading subheading--corrigenda"
id="corrigendum" id="corrigenda"
> >
Corrigendum Corrigenda
</h2> </h2>
{{ $file := path.Join $.sc.Page.File.Dir "corrigendum.md" | readFile }} {{ $file := path.Join $.sc.Page.File.Dir "corrigenda.md" | readFile }}
{{ $file | .pc.RenderString }} {{ $file | .pc.RenderString }}
</section> </section>

View file

@ -69,7 +69,7 @@
{{- end -}} {{- end -}}
</head> </head>
<body class="site-container site-container {{ block "main-class" . }}layouts-default-baseof layouts-default-baseof-single{{ end }}"> <body class="site-container site-container{{ block "main-class" . }} layouts-default-baseof layouts-default-baseof-single{{ end }}">
{{- block "header" . -}} {{- block "header" . -}}
{{- partialCached "header/site-header.html" . -}} {{- partialCached "header/site-header.html" . -}}
{{- end -}} {{- end -}}

View file

@ -1,16 +1,12 @@
{{ define "main-class" }}--section layouts-cv-cv{{ end }} {{ define "main-class" }}--section layouts-cv-cv{{ end }}
{{ define "header-scripts" }} {{ 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>
<script id="Google-Charts-script" src="/js/google-charts/google-charts.js"></script>
{{ end }}
{{ end }} {{ end }}
{{ define "footer-scripts" }} {{ 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 }}
{{ $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>
<script src="{{ $js.RelPermalink }}" integrity="{{ $js.Data.Integrity }}"></script>
{{- end -}}
{{ end }} {{ end }}
{{ define "main-header" }} {{ define "main-header" }}

View file

@ -10,18 +10,11 @@
{{ end }} {{ end }}
</h2> </h2>
{{ .Content }} {{ .Content }}
{{ if ne .Type "portfolio" }}
<nav class="page-header__minor-links">
{{ partial "years-list.html" . }}
</nav>
{{ end }}
</header> </header>
{{ end }} {{ end }}
{{ define "main-body" }} {{ define "main-body" }}
{{ if eq .Type "portfolio" }} <article class="site-content__body site-content__body--list">
<article class="site-content__body site-content__body--list">
<ul class="site-content__sections-list"> <ul class="site-content__sections-list">
{{ range .Sections.ByWeight }} {{ range .Sections.ByWeight }}
{{ if eq .Weight 10 }}<hr>{{ end }} {{ if eq .Weight 10 }}<hr>{{ end }}
@ -29,7 +22,4 @@
{{ end }} {{ end }}
</ul> </ul>
</article> </article>
{{ else }}
{{ partial "items-grid.html" . }}
{{ end }}
{{ end }} {{ end }}

22
layouts/section.html Normal file
View 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
View 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 }}