Compare commits

..

5 commits

Author SHA1 Message Date
84defe05cf
fix: cites 2025-03-02 22:41:35 +01:00
0a24223fe8
improve renderings 2025-03-02 22:41:10 +01:00
4cd64207fe
fix: authors 2025-03-02 22:40:45 +01:00
ee740bad7a
update permissions 2025-03-02 22:40:04 +01:00
87215650a9
style: feed styling 2025-03-02 22:39:44 +01:00
19 changed files with 251 additions and 129 deletions

View file

@ -5,7 +5,7 @@ $light: #fffff0;
// Fonts // Fonts
$default-font: "Domitian", "Palatino Linotype", "Book Antiqua", palatino, $default-font: "Domitian", "Palatino Linotype", "Book Antiqua", palatino,
garamond, serif; garamond, serif;
$code-font: "Input Mono", "Lucida Console", monaco, monospace; $code-font: "Input Mono", "Lucida Console", monaco, "Courier New", monospace;
// Breakpoints // Breakpoints
$breakpoints: ( $breakpoints: (

View file

@ -56,6 +56,7 @@ h5,
h6 { h6 {
font-weight: normal; font-weight: normal;
margin: 0; margin: 0;
font-variant-numeric: slashed-zero;
} }
a { a {

39
assets/css/feeds.scss Normal file
View file

@ -0,0 +1,39 @@
@import "abstracts/variables";
@import "abstracts/mixins";
@import "base/typography";
.feed {
padding: 10px 20px;
background-color: $light;
color: $dark;
margin: 0 auto;
max-width: 800px;
font-weight: normal;
text-align: center;
gap: 2em;
display: flex;
flex-direction: column;
}
.nav__notice {
display: block;
border: 2px solid $dark;
padding: 20px;
width: 80%;
margin-inline: auto;
}
.summary {
font-style: italic;
}
.feed__header {
padding-block-end: 1em;
margin-block-end: 1em;
border-block-end: 1px solid $dark;
}
.feed__item {
margin-block: 1em;
}

View file

@ -1,6 +1,8 @@
.organisations-table { .organisations-table {
inline-size: 80% !important; inline-size: 80% !important;
& thead { & thead {
z-index: 1;
position: sticky; position: sticky;
& th { & th {
@ -10,9 +12,15 @@
} }
} }
&__logo {
max-inline-size: 5em;
max-block-size: 5em;
fill: $dark;
}
&__items-icon { &__items-icon {
padding: 1em; padding: 1em;
font-size: 1.4em; font-size: 0.8em;
text-align: center; text-align: center;
float: inline-start; float: inline-start;
padding-inline-end: 1em; padding-inline-end: 1em;

View file

@ -102,13 +102,6 @@
} }
} }
.organisation-table {
&__logo {
max-inline-size: 5em;
max-block-size: 5em;
}
}
.timeline__legend { .timeline__legend {
inline-size: fit-content; inline-size: fit-content;
display: flex; display: flex;

View file

@ -62,6 +62,11 @@
align-content: center; align-content: center;
position: relative; position: relative;
&--fit {
background-size: contain;
padding: 1em;
}
& .attr { & .attr {
position: absolute; position: absolute;
background-color: $dark; background-color: $dark;

View file

@ -115,6 +115,12 @@
href="{{ $printStylesheet.Permalink }}" href="{{ $printStylesheet.Permalink }}"
integrity="{{ $printStylesheet.Data.Integrity | html }}" integrity="{{ $printStylesheet.Data.Integrity | html }}"
/> />
{{- $feedsStylesheet := resources.Get "css/feeds.scss" }}
{{- $feedsStylesheet := $feedsStylesheet | css.Sass }}
<link
rel="stylesheet"
href="{{ $feedsStylesheet.Permalink }}"
/>
{{- if .Param "math" -}} {{- if .Param "math" -}}
{{- partialCached "math.html" . -}} {{- partialCached "math.html" . -}}

View file

@ -11,11 +11,13 @@
{{- $pages = $pages | first $limit -}} {{- $pages = $pages | first $limit -}}
{{- end -}} {{- end -}}
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }} {{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> {{- printf "<?xml-stylesheet href=\"/rss.xsl\" type=\"text/xsl\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel> <channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title | plainify }}{{ else }}{{ with .Title }}{{ . | plainify }} on {{ end }}{{ .Site.Title | plainify }}{{ end }}</title> <title>{{ if eq .Title .Site.Title }}{{ .Site.Title | plainify }}{{ else }}{{ with .Title }}{{ . | plainify }} on {{ end }}{{ .Site.Title | plainify }}{{ end }}</title>
<link>{{ .Permalink }}</link> <link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description> <description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<category>{{ .FirstSection.Title }}</category>
{{ with .Site.LanguageCode }}<language>{{.}}</language>{{end}} {{ with .Site.LanguageCode }}<language>{{.}}</language>{{end}}
{{ with .Site.Params.Author.email }}<managingEditor>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</managingEditor>{{end}} {{ with .Site.Params.Author.email }}<managingEditor>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}
{{ with .Site.Params.Author.email }}<webMaster>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</webMaster>{{end}} {{ with .Site.Params.Author.email }}<webMaster>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</webMaster>{{end}}
@ -26,12 +28,14 @@
{{- end -}} {{- end -}}
{{ range $pages }} {{ range $pages }}
<item> <item>
<title>{{ .Title | plainify }}</title> <title>{{ .Title }}</title>
<link>{{ .Permalink }}</link> <link>{{ .Permalink }}</link>
{{ range .GetTerms "categories" }}<category>{{ .Title }}</category>{{ end }}
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Params.Author.email }}<author>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</author>{{end}} {{ with .Site.Params.Author.email }}<author>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid> <guid>{{ .Permalink }}</guid>
<description>{{ .Summary | html }}</description> <description>{{ .Summary | htmlEscape | plainify }}</description>
<content:encoded>{{ printf "<![CDATA[%s]]>" .Content | safeHTML }}</content:encoded>
</item> </item>
{{ end }} {{ end }}
</channel> </channel>

View file

@ -1,5 +1,6 @@
{{ define "title" }} {{ define "title" }}
{{ .Page.Title | plainify }} | {{ .Site.Title }} {{ .Page.Title | plainify }} |
{{ .Site.Title }}
{{ end }} {{ end }}
{{ define "main-class" }}--section layouts-blog-section{{ end }} {{ define "main-class" }}--section layouts-blog-section{{ end }}
@ -12,38 +13,60 @@
{{ define "main-header" }} {{ define "main-header" }}
<header class="site-content__header"> <header class="site-content__header">
<h2 class="page-title">{{ .Title | safeHTML }} <h2 class="page-title">
{{ if eq .Type "blog" }} {{ .Title | safeHTML }}
{{ with .GetPage "blog/posts" }} {{ if eq .Type "blog" }}
{{ with .GetPage "blog/posts" }}
{{ range .AlternativeOutputFormats -}} {{ range .AlternativeOutputFormats -}}
<a href="{{ .RelPermalink }}" aria-label="{{ $.Title }} RSS feed"> <a
<img class="feed-icon" alt="RSS feed" src="{{ $.Site.Params.feedIcon }}"> href="{{ .RelPermalink }}"
aria-label="{{ $.Title }} RSS feed"
>
<img
class="feed-icon"
alt="RSS feed"
src="{{ $.Site.Params.feedIcon }}"
/>
</a> </a>
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ else }} {{ else }}
{{ range .AlternativeOutputFormats -}} {{ range .AlternativeOutputFormats -}}
<a href="{{ .RelPermalink }}" aria-label="{{ $.Title }} RSS feed"> <a
<img class="feed-icon" alt="RSS feed" src="{{ $.Site.Params.feedIcon }}"> href="{{ .RelPermalink }}"
</a> aria-label="{{ $.Title }} RSS feed"
>
<img
class="feed-icon"
alt="RSS feed"
src="{{ $.Site.Params.feedIcon }}"
/>
</a>
{{ end }}
{{ end }} {{ end }}
{{ end }}
</h2> </h2>
{{ .Content }} {{ .Content }}
<nav class="page-header__minor-links"> <nav class="page-header__minor-links">
<ul class="minor-links__categories"> <ul class="minor-links__categories">
<li><a href="/series"><h3>Series</h3></a> <p>({{ len .Site.Taxonomies.series }})</p></li> <li>
{{ range .Site.Taxonomies.categories }} <a href="/series"><h3>Series</h3></a>
<li><a href="{{ .Page.RelPermalink }}"><h3>{{ .Page.Title | safeHTML }}</h3></a> <p>({{ len . }})</p></li> <p>({{ len .Site.Taxonomies.series }})</p>
{{ end }} </li>
{{ range .Site.Taxonomies.categories }}
<li>
<a href="{{ .Page.RelPermalink }}"><h3>{{ .Page.Title | safeHTML }}</h3></a>
<p>({{ len . }})</p>
</li>
{{ end }}
</ul> </ul>
{{ if eq .Type "blog" }} {{ if eq .Type "blog" }}
{{ with .GetPage "blog/posts" }} {{ with .GetPage "blog/posts" }}
{{ partial "years-list.html" . }} {{ partial "years-list.html" . }}
{{ end }} {{ end }}
{{ else }} {{ else }}
{{ partial "years-list.html" . }} {{ partial "years-list.html" . }}
{{ end }} {{ end }}
</nav> </nav>
</header> </header>
@ -51,10 +74,10 @@
{{ define "main-body" }} {{ define "main-body" }}
{{ if eq .Type "blog" }} {{ if eq .Type "blog" }}
{{ with .GetPage "blog/posts" }} {{ with .GetPage "blog/posts" }}
{{ partial "items-grid.html" . }}
{{ end }}
{{ else }}
{{ partial "items-grid.html" . }} {{ partial "items-grid.html" . }}
{{ end }}
{{ else }}
{{ partial "items-grid.html" . }}
{{ end }} {{ end }}
{{ end }} {{ end }}

View file

@ -1,35 +1,40 @@
{{ define "title" }} {{ define "title" }}
{{ .Page.Title | plainify }} | {{ .Site.Title }} {{ .Page.Title | plainify }} |
{{ .Site.Title }}
{{ end }} {{ end }}
{{ define "main-class" }}--section layouts-cv-organisations-section{{ end }} {{ define "main-class" }}--section layouts-cv-organisations-section{{ end }}
{{ define "main-header" }} {{ define "main-header" }}
{{ if .IsDescendant ( .GetPage "/cv/organisations" ) }} {{ if .IsDescendant ( .GetPage "/cv/organisations" ) }}
<header class="site-content__header"> <header class="site-content__header">
<div class="article-header__featured-image" <div
{{ if .Params.featured_image }} class="article-header__featured-image"
{{ with .Resources.GetMatch .Params.featured_image }} {{ if .Params.featured_image }}
style="background-image: url({{ .RelPermalink }})" {{ with .Resources.GetMatch .Params.featured_image }}
{{ end }} style="background-image: url({{ .RelPermalink }}); {{ with .Params.bg }}background-color: {{ . }};{{ end }}"
{{ end }}> {{ end }}
<div class="article-header__title-wrapper{{ if .Params.title_in_logo }} article-header__title-wrapper--no-title{{ end }}"> {{ end }}
<h2 class="article-header__title">{{ if ( .Params.markup_title ) }}{{ .Params.markup_title | safeHTML }}{{ else }}{{ .Title }}{{ end }}</h2> >
</div> <div class="article-header__title-wrapper{{ if .Params.title_in_logo }}article-header__title-wrapper--no-title{{ end }}">
</div> <h2 class="article-header__title">
</header> {{ default .Title .Params.markup_title | .Page.RenderString }}
{{ else }} </h2>
<header class="site-content__header"> </div>
<h2 class="page-title">{{ .Title | safeHTML }}.</h2> </div>
{{- .Content -}} </header>
</header> {{ else }}
{{ end }} <header class="site-content__header">
<h2 class="page-title">{{ .Title | safeHTML }}.</h2>
{{- .Content -}}
</header>
{{ end }}
{{ end }} {{ end }}
{{ define "main-body" }} {{ define "main-body" }}
{{ with .GetPage "cv/organisations" }} {{ with .GetPage "cv/organisations" }}
{{ partial "cv/organisations/organisations-table.html" . }} {{ partial "cv/organisations/organisations-table.html" . }}
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ define "main-footer" }} {{ define "main-footer" }}

View file

@ -118,14 +118,14 @@
{{ define "main-header" }} {{ define "main-header" }}
{{ if .IsDescendant ( .GetPage "/cv/organisations" ) }} {{ if .IsDescendant ( .GetPage "/cv/organisations" ) }}
<header class="site-content__header"> <header class="site-content__header">
<div class="article-header__featured-image" <div class="article-header__featured-image article-header__featured-image--fit"
{{ if .Params.featured_image }} {{ if .Params.featured_image }}
{{ with .Resources.GetMatch .Params.featured_image }} {{ with .Resources.GetMatch .Params.featured_image }}
style="background-image: url({{ .RelPermalink }})" style="background-image: url({{ .RelPermalink }}); {{ with .Params.bg }}background-color: {{ . }};{{ end }}"
{{ end }} {{ end }}
{{ end }}> {{ end }}>
<div class="article-header__title-wrapper{{ if .Params.title_in_logo }} article-header__title-wrapper--no-title{{ end }}"> <div class="article-header__title-wrapper{{ if .Params.title_in_logo }} article-header__title-wrapper--no-title{{ end }}">
<h2 class="article-header__title">{{ if ( .Params.markup_title ) }}{{ .Params.markup_title | safeHTML }}{{ else }}{{ .Title }}{{ end }}</h2> <h2 class="article-header__title">{{ default .Title .Params.markup_title | .Page.RenderString }}</h2>
</div> </div>
</div> </div>
{{- with .Params.nka -}}<p>Now known as: {{ . }}</p>{{- end -}} {{- with .Params.nka -}}<p>Now known as: {{ . }}</p>{{- end -}}
@ -198,8 +198,8 @@
{{ partial "cv/organisations/recursive-parents.html" ( dict "c" . "g" $ ) }} {{ partial "cv/organisations/recursive-parents.html" ( dict "c" . "g" $ ) }}
{{- $parents := partial "cv/organisations/reverse-slice.html" ( $.Scratch.Get "parents" ) -}} {{- $parents := partial "cv/organisations/reverse-slice.html" ( $.Scratch.Get "parents" ) -}}
{{- range $parents -}}<ul><li class="hierarchy-item hierarchy-item--parent"><a href="{{ .RelPermalink }}">{{ .Title | safeHTML }}</a>{{- end -}} {{- range $parents -}}<ul><li class="hierarchy-item hierarchy-item--parent"><a href="{{ .RelPermalink }}">{{ default .Title .Params.markup_title | .Page.RenderString }}</a>{{- end -}}
<ul><li class="hierarchy-item hierarchy-item--current">{{ .Title | safeHTML }}</li> <ul><li class="hierarchy-item hierarchy-item--current">{{ default .Title .Params.markup_title | .Page.RenderString }}</li>
{{ range .Sections }}<ul>{{ partial "cv/organisations/recursive-children.html" . }}</ul>{{ end }} {{ range .Sections }}<ul>{{ partial "cv/organisations/recursive-children.html" . }}</ul>{{ end }}
</ul> </ul>
{{- range $parents -}}</li></ul>{{- end -}} {{- range $parents -}}</li></ul>{{- end -}}

View file

@ -12,8 +12,11 @@
*/ -}} */ -}}
<!-- Optional parameter overrides (for nested citations) --> <!-- Optional parameter overrides (for nested citations) -->
{{- $citeText := default .Params.cite ( .Scratch.Get "cite" ) }}
{{- $replacedCite := replaceRE `^([a-z]+?://)?(www)?` "" $citeText }}
{{- $startOfCite := delimit ( findRE `^([a-z]+?://)?(www)?` $citeText 1 ) "" }}
{{- $cite := replaceRE `^` $startOfCite ( trim ( $replacedCite | .Page.RenderString ) "\r\n" ) -}}
{{- $cite := trim ( default .Params.cite ( .Scratch.Get "cite" ) | .Page.RenderString ) "\r\n" -}}
{{- $title := trim ( default .Params.title ( .Scratch.Get "title" ) | .Page.RenderString ) "\r\n" -}} {{- $title := trim ( default .Params.title ( .Scratch.Get "title" ) | .Page.RenderString ) "\r\n" -}}
{{- $titleLang := default .Params.titleLang ( .Scratch.Get "titleLang" ) -}} {{- $titleLang := default .Params.titleLang ( .Scratch.Get "titleLang" ) -}}
{{- $titleTr := default .Params.titleTr ( .Scratch.Get "titleTr" ) -}} {{- $titleTr := default .Params.titleTr ( .Scratch.Get "titleTr" ) -}}
@ -45,7 +48,6 @@
{{- end -}} {{- end -}}
<!-- Rendering --> <!-- Rendering -->
{{- $itemType := default "CreativeWork" $schemaType -}} {{- $itemType := default "CreativeWork" $schemaType -}}
{{- if ( or ( in $.Site.Data.itemtypes $itemType ) ( eq .Params.suppress "true" ) ) -}} {{- if ( or ( in $.Site.Data.itemtypes $itemType ) ( eq .Params.suppress "true" ) ) -}}
{{- with .Params.href -}} {{- with .Params.href -}}

View file

@ -29,13 +29,11 @@
{{- end -}} {{- end -}}
{{- else -}} {{- else -}}
{{- if .Params.featured_image -}} {{- if .Params.featured_image -}}
<img class="organisation-table__logo" loading="lazy" src=" {{- with .Resources.GetMatch .Params.featured_image -}}
{{- if .Resources.GetMatch .Params.featured_image -}} <img class="organisations-table__logo" loading="lazy" src="{{- .RelPermalink -}}" {{ with .Params.bg }}style="background-color: {{ . }}"{{ end }}>
{{- ( .Resources.GetMatch .Params.featured_image ).RelPermalink -}}
{{- else -}} {{- else -}}
{{- .Params.featured_image -}} <img class="organisations-table__logo" loading="lazy" src="{{- .Params.featured_image -}}">
{{- end -}} {{- end -}}
">
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
</td> </td>
@ -48,7 +46,7 @@
{{- else -}} {{- else -}}
<a href="{{ .RelPermalink }}"> <a href="{{ .RelPermalink }}">
{{- if .Params.TitleLang -}}<i lang="{{ .Params.TitleLang }}" title="{{ .Params.TitleTrans }}"}>{{- end -}} {{- if .Params.TitleLang -}}<i lang="{{ .Params.TitleLang }}" title="{{ .Params.TitleTrans }}"}>{{- end -}}
{{- with .Params.markup_title -}}{{- . | safeHTML -}}{{- else -}}{{- $organisation_title | safeHTML -}}{{- end -}} {{- with .Params.markup_title -}}{{- . | $.Page.RenderString -}}{{- else -}}{{- $organisation_title | $.Page.RenderString -}}{{- end -}}
{{- if .Params.TitleLang -}}</i>{{- end -}} {{- if .Params.TitleLang -}}</i>{{- end -}}
</a> </a>
{{- end -}} {{- end -}}

View file

@ -1,22 +1,18 @@
{{- if ( not ( and ( .Params.redact ) ( ne $.Site.Params.redact "show" ) ) ) -}} {{- if ( not ( and ( .Params.redact ) ( ne $.Site.Params.redact "show" ) ) ) -}}
<li class="hierarchy-item hierarchy-item--child"> <li class="hierarchy-item hierarchy-item--child">
{{- if ( and ( .Params.redact ) ( ne $.Site.Params.redact "show" ) ) -}} {{- if ( and ( .Params.redact ) ( ne $.Site.Params.redact "show" ) ) -}}
{{- if ( eq $.Site.Params.redact "black" ) -}} {{- if ( eq $.Site.Params.redact "black" ) -}}
{{- partialCached "redact-black.html" . -}} {{- partialCached "redact-black.html" . -}}
{{- end -}} {{- end -}}
{{- else -}} {{- else -}}
<a href="{{ .RelPermalink }}"> <a href="{{ .RelPermalink }}">
{{- with .Params.markup_title }} {{ default .Title .Params.markup_title | .Page.RenderString }}
{{- . | safeHTML -}} </a>
{{- else -}} {{- range .Sections -}}
{{- .Title | safeHTML -}} <ul>
{{- end -}} {{- partialCached "cv/organisations/recursive-children.html" . .Title -}}
</a> </ul>
{{- range .Sections -}} {{- end -}}
<ul>
{{- partialCached "cv/organisations/recursive-children.html" . .Title -}}
</ul>
{{- end -}}
{{- end -}} {{- end -}}
</li> </li>
{{- end -}} {{- end -}}

View file

@ -1,33 +1,55 @@
{{- if ( and ( .Params.redact ) ( ne $.Site.Params.redact "show" ) ) -}} {{- if ( and ( .Params.redact ) ( ne $.Site.Params.redact "show" ) ) -}}
{{- if ( eq $.Site.Params.redact "black" ) -}} {{- if ( eq $.Site.Params.redact "black" ) -}}
<article class="item-tile item-tile--redacted {{- with .Params.site }} item-tile--{{ . }}{{ end -}}"> <article class="item-tile item-tile--redacted {{- with .Params.site }}item-tile--{{ . }}{{ end -}}">
<header class="item-tile__header"> <header class="item-tile__header">
<h2 class="p-name item-tile__title{{ if gt ( len ( .Title | plainify ) ) 40 }} item-tile__title--long{{ end }}" itemprop="name"> <h2
{{- partialCached "redact-black.html" . -}} class="p-name item-tile__title{{ if gt ( len ( .Title | plainify ) ) 40 }}item-tile__title--long{{ end }}"
</h2> itemprop="name"
<p style="display: none;">Published: <time class="dt-published" itemprop="datePublished" datetime="{{ .PublishDate | time.Format "2006-01-02T15:04:05-07:00" }}">{{ .PublishDate | time.Format "2006-01-02T15:04:05-07:00"}}</time></p> >
{{- partialCached "redact-black.html" . -}}
</h2>
<p style="display: none;">
Published:
<time
class="dt-published"
itemprop="datePublished"
datetime="{{ .PublishDate | time.Format "2006-01-02T15:04:05-07:00" }}"
>{{ .PublishDate | time.Format "2006-01-02T15:04:05-07:00" }}</time
>
</p>
</header> </header>
</article> </article>
{{- end -}} {{- end -}}
{{- else -}} {{- else -}}
<a id="{{ .Title | urlize }}" class="h-entry u-url link--tile" href="{{ .RelPermalink }}" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting"> <a
<article class="item-tile lazy {{- with .Params.site }} item-tile--{{ . }}{{ end -}}" id="{{ .Title | urlize }}"
{{ if .Params.featured_image }} class="h-entry u-url link--tile"
{{ with .Resources.GetMatch .Params.featured_image }} href="{{ .RelPermalink }}"
{{ if eq .MediaType.SubType "svg" }} itemprop="blogPost"
style="background-image: url({{ .RelPermalink }})" itemscope
{{ else }} itemtype="https://schema.org/BlogPosting"
{{ with .Resize "1000x webp" }} >
style="background-image: url({{ .RelPermalink }})" <article
{{ end }} class="item-tile lazy {{- with .Params.site }}item-tile--{{ . }}{{ end -}}"
{{ end }} {{ if .Params.featured_image }}
{{ else }} {{ with .Resources.GetMatch .Params.featured_image }}
style="background-image: url({{ .Params.featured_image }})" {{ if eq .MediaType.SubType "svg" }}
style="background-image: url({{ .RelPermalink }})"
{{ else }}
{{ with .Resize "1000x webp" }}
style="background-image: url({{ .RelPermalink }})"
{{ end }} {{ end }}
{{ end }} {{ end }}
> {{ else }}
{{ if .Params.featured_image -}} style="background-image: url({{ .Params.featured_image }})"
<img class="u-photo" style="display: none;" src=" {{ end }}
{{ end }}
>
{{ if .Params.featured_image -}}
<img
class="u-photo"
style="display: none;"
src="
{{- with .Resources.GetMatch .Params.featured_image -}} {{- with .Resources.GetMatch .Params.featured_image -}}
{{- if eq .MediaType.SubType "svg" -}} {{- if eq .MediaType.SubType "svg" -}}
{{ .RelPermalink }} {{ .RelPermalink }}
@ -39,30 +61,48 @@
{{- else -}} {{- else -}}
{{ .Params.featured_image }} {{ .Params.featured_image }}
{{ end }} {{ end }}
" alt=" "
alt="
{{- with .Resources.GetMatch .Params.featured_image -}} {{- with .Resources.GetMatch .Params.featured_image -}}
{{- .Params.alt -}} {{- .Params.alt -}}
{{- end -}} {{- end -}}
" "
/> />
{{- end }} {{- end }}
<header class="item-tile__header"> <header class="item-tile__header">
{{ if ( or .Params.series .Params.published_in ) }} {{ if ( or .Params.series .Params.published_in ) }}
<span class="item-tile__banner item-tile__banner--{{ if .Params.series }}series{{ else if .Params.published_in }}published-in{{ end}}"> <span
class="item-tile__banner item-tile__banner--{{ if .Params.series }}
series
{{ else if .Params.published_in }}
published-in
{{ end }}"
>
{{- if .Params.series -}} {{- if .Params.series -}}
{{ .Params.series | safeHTML }} {{ .Params.series | safeHTML }}
{{- else if .Params.published_in -}} {{- else if .Params.published_in -}}
{{ .Params.published_in | safeHTML }} {{ .Params.published_in | safeHTML }}
{{- end -}} {{- end -}}
</span> </span>
{{ end }} {{ end }}
<h2 class="p-name item-tile__title{{ if gt ( len ( .Title | plainify ) ) 40 }} item-tile__title--long{{ end }}" itemprop="name"> <h2
{{ .Title | safeHTML }} class="p-name item-tile__title {{ if gt ( len ( .Title | plainify ) ) 40 }}item-tile__title--long{{ end }}"
</h2> itemprop="name"
{{ with .Params.subtitle }} >
<p class="item-tile__subtitle">{{ . | safeHTML }}</p> {{ default .Title .Params.markup_title | $.Page.RenderString }}
{{ end }} </h2>
<p style="display: none;">Published: <time class="dt-published" itemprop="datePublished" datetime="{{ .PublishDate | time.Format "2006-01-02T15:04:05-07:00" }}">{{ .PublishDate | time.Format "2006-01-02T15:04:05-07:00"}}</time></p> {{ with .Params.subtitle }}
<p class="item-tile__subtitle">{{ . | $.Page.RenderString }}</p>
{{ end }}
<p style="display: none;">
Published:
<time
class="dt-published"
itemprop="datePublished"
datetime="{{ .PublishDate | time.Format "2006-01-02T15:04:05-07:00" }}"
>{{ .PublishDate | time.Format "2006-01-02T15:04:05-07:00" }}</time
>
</p>
</header> </header>
</article> </article>
</a> </a>

View file

@ -5,7 +5,8 @@
@params sc The site context. @params sc The site context.
*/ -}} */ -}}
<p style="display: none">Author{{ with .authors }}s{{ end }}:&nbsp; <span style="display: none">
<p>Author{{ with .authors }}s{{ end }}:&nbsp;
{{- with .authors -}} {{- with .authors -}}
</p> </p>
<ul> <ul>
@ -19,5 +20,6 @@
</ul> </ul>
{{- else -}} {{- else -}}
<a class="p-author" itemprop="author" rel="author" href="{{ $.sc.Site.Home.Permalink }}">{{ $.sc.Site.Params.Author.name }}</a> <a class="p-author" itemprop="author" rel="author" href="{{ $.sc.Site.Home.Permalink }}">{{ $.sc.Site.Params.Author.name }}</a>
</p>
{{- end -}} {{- end -}}
</p> </span>

View file

@ -41,11 +41,11 @@
<div class="article-header__title-wrapper"> <div class="article-header__title-wrapper">
<a class="u-url u-uid" style="display: none" href="{{ .pc.Permalink }}"></a> <a class="u-url u-uid" style="display: none" href="{{ .pc.Permalink }}"></a>
<hgroup class="p-name" itemprop="name"> <hgroup class="p-name" itemprop="name">
<h2 class="article-header__title{{ if gt ( len ( .pc.Title | plainify ) ) 40 }} article-header__title--long{{ end }}"> <h2 class="article-header__title {{ if gt ( len ( .pc.Title | plainify ) ) 40 }}article-header__title--long{{ end }}">
{{- .pc.Title | safeHTML -}} {{- default .pc.Title .pc.Params.markup_title | .pc.Page.RenderString -}}
</h2> </h2>
{{ with .pc.Params.subtitle }} {{ with .pc.Params.subtitle }}
<p class="article-header__subtitle">{{ . | safeHTML }}</p> <p class="article-header__subtitle">{{ . | $.pc.Page.RenderString }}</p>
{{ end }} {{ end }}
</hgroup> </hgroup>
</div> </div>

View file

@ -24,7 +24,7 @@
{{ end }} {{ end }}
{{ else }} {{ else }}
{{ erroridf "missing-organisation" "Could not find organisation %q (%q)" .Title $.sc.File.Path }} {{ erroridf "missing-organisation" "Could not find organisation %q (%q)" .Title $.sc.File.Path }}
<li>{{ if ( .Params.markup_title ) }}{{ .Params.markup_title | safeHTML }}{{ else }}{{ .Title }}{{ end }}</li> <li>{{ default .Title .Params.markup_title | .Page.RenderString }}</li>
{{ end }} {{ end }}
{{- end -}} {{- end -}}
</ul> </ul>

0
static/css/leaflet/leaflet.css Normal file → Executable file
View file