various fixes
This commit is contained in:
parent
1fd9adcb52
commit
46bd223627
29 changed files with 6093 additions and 152 deletions
|
@ -1,4 +1,4 @@
|
|||
<!--
|
||||
{{- /*
|
||||
Renders a work citation with semantic markup, called using the `cite` shortcode.
|
||||
|
||||
@params cite URI for work. Optional.
|
||||
|
@ -9,7 +9,7 @@
|
|||
@params title Title of the work to display.
|
||||
@params titleLang Language code of a foreign-language work's title. Optional.
|
||||
@params titleTr English translation of a foreign-language work's title. Optional.
|
||||
-->
|
||||
*/ -}}
|
||||
|
||||
<!-- Optional parameter overrides (for nested citations) -->
|
||||
|
||||
|
@ -19,9 +19,12 @@
|
|||
{{- $titleTr := default .Params.titleTr ( .Scratch.Get "titleTr" ) -}}
|
||||
{{- $schemaType := default .Params.schemaType ( .Scratch.Get "schemaType" ) -}}
|
||||
|
||||
<!-- Validation -->
|
||||
{{- if ( strings.Contains $cite "#" ) -}}
|
||||
{{- erroridf "cite-with-fragment" "Cite parameter includes fragment identifier, which probably isn't what you want." -}}
|
||||
{{- $cite = delimit ( split $cite "#" ) "" -}}
|
||||
{{- end -}}
|
||||
|
||||
<!-- TODO: check `.Params.cite` is URI -->
|
||||
<!-- Validation -->
|
||||
|
||||
{{- if ( and ( isset .Params "citeStyle" ) ( not ( in ( slice "inherit" "enquote" "normal" ) .Params.citeStyle ) ) ) -}}
|
||||
{{- erroridf "invalid-citeStyle" "Invalid `citeStyle` value %q for %q" .Params.citeStyle $title -}}
|
||||
|
@ -33,6 +36,8 @@
|
|||
{{- erroridf "invalid-schemaType" "Invalid Schema.org type value %q for %q" $schemaType $title -}}
|
||||
{{- end -}}
|
||||
|
||||
<!-- TODO: check `.Params.cite` is URI -->
|
||||
|
||||
{{- if ( or $titleLang $titleTr ) -}}
|
||||
{{- if ( not ( and $titleLang $titleTr ) ) -}}
|
||||
{{- erroridf "invalid-foreign-title" "Must have both title translation and language set for foreign language title %q" $title -}}
|
||||
|
@ -60,7 +65,16 @@
|
|||
{{- end -}}
|
||||
<span itemprop="name">
|
||||
{{- if $titleLang -}}
|
||||
<i lang="{{ $titleLang }}" title="{{ $titleTr }}">
|
||||
<i
|
||||
lang="{{ $titleLang }}"
|
||||
title="
|
||||
{{- if $.Params.shortTitle -}}
|
||||
{{- printf "%s [%s]" $title $titleTr | plainify -}}
|
||||
{{- else -}}
|
||||
{{- $titleTr | plainify -}}
|
||||
{{- end -}}
|
||||
"
|
||||
>
|
||||
{{- end -}}
|
||||
|
||||
{{- ( default $title .Params.shortTitle ) | markdownify | safeHTML -}}
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<!--
|
||||
Gets the top-level parent org of an organisation.
|
||||
|
||||
@params organisation The organisation to search for.
|
||||
-->
|
||||
|
||||
{{- $organisation_page := default . ( index .Ancestors.Reverse 3 ) -}}
|
||||
{{- $organisation_title := default $organisation_page.Title $organisation_page.Params.markup_title -}}
|
||||
|
||||
{{- return $organisation_title -}}
|
||||
|
|
@ -1,16 +1,14 @@
|
|||
<aside class="timeline__legend">
|
||||
<div>
|
||||
<label for="legend__past">Past</label>
|
||||
<div id="legend__past">
|
||||
<button id="past-unpaid" class="legend__button"><p><span class="colour-square colour-square--unpaid-past"></span> Unpaid</p></button>
|
||||
<button id="past-paid" class="legend__button"><p><span class="colour-square colour-square--paid-past"></span> Paid</p></button>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label for="legend__current">Current</label>
|
||||
<div id="legend__current">
|
||||
<button id="current-unpaid" class="legend__button"><p><span class="colour-square colour-square--unpaid-current"></span> Unpaid</p></button>
|
||||
<button id="current-paid" class="legend__button"><p><span class="colour-square colour-square--paid-current"></span> Paid</p></button>
|
||||
</div>
|
||||
</div>
|
||||
<fieldset id="legend__past">
|
||||
<legend class="label">Past</legend>
|
||||
|
||||
<button id="past-unpaid" class="button legend__button"><p><span class="colour-square colour-square--unpaid-past"></span> Unpaid</p></button>
|
||||
<button id="past-paid" class="button legend__button"><p><span class="colour-square colour-square--paid-past"></span> Paid</p></button>
|
||||
</fieldset>
|
||||
<fieldset id="legend__current">
|
||||
<legend class="label">Current</legend>
|
||||
|
||||
<button id="current-unpaid" class="button legend__button"><p><span class="colour-square colour-square--unpaid-current"></span> Unpaid</p></button>
|
||||
<button id="current-paid" class="button legend__button"><p><span class="colour-square colour-square--paid-current"></span> Paid</p></button>
|
||||
</fieldset>
|
||||
</aside>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{{ block "header" . }}
|
||||
<h2 class="p-name site-header__title" itemprop="name"><a class="u-url" href="{{ .Site.Home.RelPermalink }}" rel="me author">{{ .Site.Title }}</a></h2>
|
||||
<p class="p-note site-header__tagline" itemprop="about">Views my own. Discussion ≠ endorsement. Do try this at home.</p>
|
||||
<p class="site-header__icons">~ <a class="u-email" href="mailto:{{ $.Site.Author.email }}" rel="me">📧</a> ~ <a class="u-url" href="{{ .Site.Params.codeURL }}" rel="me">💻</a> ~ <a class="u-key" href="/{{ .Site.Params.keyfile }}" rel="me">🔐</a> ~ <a href="/index.xml" aria-label="{{ .Site.Title }} RSS feed"><img class="feed-icon" alt="RSS feed" src="{{ .Site.Params.feedIcon }}"></a> ~</p>
|
||||
<p class="site-header__icons">~ <a class="u-email" href="mailto:{{ $.Site.Author.email }}" rel="me">✉️</a> ~ <a class="u-url" href="{{ .Site.Params.codeURL }}" rel="me">🧑💻</a> ~ <a class="u-key" href="/{{ .Site.Params.keyfile }}" rel="me">🔐</a> ~ <a href="/index.xml" aria-label="{{ .Site.Title }} RSS feed"><img class="feed-icon" alt="RSS feed" src="{{ .Site.Params.feedIcon }}"></a> ~</p>
|
||||
<nav class="site-header__nav">
|
||||
<ul>
|
||||
{{ range ( where .Site.Sections.ByTitle "Type" "in" site.Params.mainSections ) }}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<section class="site-content__body">
|
||||
{{ range ( ( where .Pages "Draft" false ).GroupByPublishDate "2006" ) }}
|
||||
{{ range ( ( where ( where .Pages "Draft" false ) "Params.redact" "ne" true ).GroupByPublishDate "2006" ) }}
|
||||
{{ if ( not ( eq .Key "0001" ) ) }}
|
||||
{{ partialCached "header-tile.html" . .Key }}
|
||||
{{ range .Pages }}
|
||||
{{ if ( not ( .IsDescendant ( .GetPage "/cv/roles" ) ) ) }}
|
||||
{{ partialCached "item-tile.html" . .Title }}
|
||||
{{ partialCached "item-tile.html" . .Path }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
9
layouts/partials/math.html
Normal file
9
layouts/partials/math.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
<script id="MathJax-script" async src="/js/mathjax/tex-chtml.js"></script>
|
||||
<script>
|
||||
MathJax = {
|
||||
tex: {
|
||||
displayMath: [['\\[', '\\]'], ['$$', '$$']], // block
|
||||
inlineMath: [['\\(', '\\)']] // inline
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -5,7 +5,7 @@
|
|||
@params page_file_path Filepath of the calling file for error messages.
|
||||
-->
|
||||
|
||||
{{- $src := . -}}
|
||||
{{- $src := .src -}}
|
||||
|
||||
<video
|
||||
class="u-video figure__video"
|
||||
|
@ -24,4 +24,4 @@
|
|||
"
|
||||
>
|
||||
Your browser doesn't support embedded video, <a href="{{ $src.RelPermalink }}">view the video here</a>.
|
||||
</video>
|
||||
</video>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue