Use camel case for vars

master
Will Faught 5 months ago
parent b840f2233a
commit 20798f3a3a

@ -1,7 +1,7 @@
{{- $href := cond (.Destination | not | not) (printf ` href="%s"` .Destination) "" -}} {{- $href := cond (.Destination | not | not) (printf ` href="%s"` .Destination) "" -}}
{{- $targetvalue := partial "paige/func-target.html" (dict "page" .Page "url" .Destination) -}} {{- $targetValue := partial "paige/func-target.html" (dict "page" .Page "url" .Destination) -}}
{{- $title := cond (.Title | not | not) (printf ` title="%s"` .Title) "" -}} {{- $title := cond (.Title | not | not) (printf ` title="%s"` .Title) "" -}}
{{- $targetattr := cond ($targetvalue | not | not) (printf ` target="%s"` $targetvalue) "" -}} {{- $targetAttr := cond ($targetValue | not | not) (printf ` target="%s"` $targetValue) "" -}}
{{- printf `<a%s%s%s>%s</a>` $href $targetattr $title .Text | safeHTML -}} {{- printf `<a%s%s%s>%s</a>` $href $targetAttr $title .Text | safeHTML -}}

@ -1,13 +1,13 @@
{{ $page := . }} {{ $page := . }}
{{ $itemattrs := slice }} {{ $itemAttrs := slice }}
{{ $microdata := $page.Params.paige.page.microdata }} {{ $microdata := $page.Params.paige.page.microdata }}
{{ range $k, $v := $microdata }} {{ range $k, $v := $microdata }}
{{ $itemattrs = $itemattrs | append (printf `%s="%v"` $k $v) }} {{ $itemAttrs = $itemAttrs | append (printf `%s="%v"` $k $v) }}
{{ end }} {{ end }}
{{ $itemattrs = delimit (sort $itemattrs) " " }} {{ $itemAttrs = delimit (sort $itemAttrs) " " }}
<!doctype html> <!doctype html>
{{ partial "paige/tag-html.html" $page }} {{ partial "paige/tag-html.html" $page }}
@ -20,7 +20,7 @@
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col mt-3" id="paige-site" {{ with $itemattrs }} {{ $itemattrs | safeHTMLAttr }} {{ end }}> <div class="col mt-3" id="paige-site" {{ with $itemAttrs }} {{ $itemAttrs | safeHTMLAttr }} {{ end }}>
{{ if templates.Exists "partials/paige/site-first.html" }} {{ if templates.Exists "partials/paige/site-first.html" }}
{{ partial "paige/site-first.html" $page }} {{ partial "paige/site-first.html" $page }}
{{ end }} {{ end }}

@ -98,19 +98,19 @@
{{ range $subpage := $subpages }} {{ range $subpage := $subpages }}
<entry> <entry>
{{ $content := .Content }} {{ $content := .Content }}
{{ $external := and .Params.link (not (.Param "paige.feed.link_to_page")) | not | not }}
{{ $id := printf "tag:%s,%s:%s" (urls.Parse site.BaseURL).Host (.PublishDate.Format "2006-01-02") .RelPermalink }} {{ $id := printf "tag:%s,%s:%s" (urls.Parse site.BaseURL).Host (.PublishDate.Format "2006-01-02") .RelPermalink }}
{{ $paramlink := and .Params.link (not (.Param "paige.feed.link_to_page")) | not | not }}
{{ $published := cond (not .PublishDate.IsZero) (.PublishDate.Format $format) "" }} {{ $published := cond (not .PublishDate.IsZero) (.PublishDate.Format $format) "" }}
{{ $summary := .Description | markdownify }} {{ $summary := .Description | markdownify }}
{{ $title := .Title | markdownify }} {{ $title := .Title | markdownify }}
{{ $updated := .Lastmod.Format $format }} {{ $updated := .Lastmod.Format $format }}
{{ $link := cond $paramlink .Params.link .Permalink }} {{ $link := cond $external .Params.link .Permalink }}
{{ if and $content $paramlink }} {{ if and $content $external }}
{{ $link := or (.Param "paige.feed.page_link" | markdownify) "⏎" }} {{ $text := or (.Param "paige.feed.page_link" | markdownify) "⏎" }}
{{ $footer := printf `<p><a href="%s" title="%s">%s</a></p>` .Permalink (htmlEscape .Title) $link | safeHTML }} {{ $footer := printf `<p><a href="%s" title="%s">%s</a></p>` .Permalink (htmlEscape .Title) $text | safeHTML }}
{{ $content = print $content $footer }} {{ $content = print $content $footer }}
{{ end }} {{ end }}

@ -1,19 +1,19 @@
{{ $page := . }} {{ $page := . }}
{{ $build := false }}
{{ $copyright := site.Copyright | markdownify | plainify | htmlUnescape }} {{ $copyright := site.Copyright | markdownify | plainify | htmlUnescape }}
{{ $description := or $page.Description (i18n "paige_recent_content") }} {{ $description := or $page.Description (i18n "paige_recent_content") }}
{{ $editor := $page.Param "paige.feed.rss.managing_editor" }}
{{ $format := "Mon, 02 Jan 2006 15:04:05 MST" }} {{ $format := "Mon, 02 Jan 2006 15:04:05 MST" }}
{{ $language := site.LanguageCode | default site.Language.Lang }} {{ $language := site.LanguageCode | default site.Language.Lang }}
{{ $lastbuilddate := false }}
{{ $limit := site.Config.Services.RSS.Limit }} {{ $limit := site.Config.Services.RSS.Limit }}
{{ $link := ($page.AlternativeOutputFormats.Get "html").Permalink }} {{ $link := ($page.AlternativeOutputFormats.Get "html").Permalink }}
{{ $managingeditor := $page.Param "paige.feed.rss.managing_editor" }} {{ $master := $page.Param "paige.feed.rss.web_master" }}
{{ $subpages := slice }} {{ $subpages := slice }}
{{ $webmaster := $page.Param "paige.feed.rss.web_master" }}
{{ range $page.RegularPagesRecursive.ByPublishDate.Reverse }} {{ range $page.RegularPagesRecursive.ByPublishDate.Reverse }}
{{ if or (and (not $lastbuilddate) (not .Lastmod.IsZero)) (and $lastbuilddate (lt $lastbuilddate .Lastmod)) }} {{ if or (and (not $build) (not .Lastmod.IsZero)) (and $build (lt $build .Lastmod)) }}
{{ $lastbuilddate = .Lastmod }} {{ $build = .Lastmod }}
{{ end }} {{ end }}
{{ if not (.Param "paige.feed.disable") }} {{ if not (.Param "paige.feed.disable") }}
@ -72,19 +72,19 @@
<language>{{ . }}</language> <language>{{ . }}</language>
{{ end }} {{ end }}
{{ with $lastbuilddate }} {{ with $build }}
<lastBuildDate>{{ . }}</lastBuildDate> <lastBuildDate>{{ . }}</lastBuildDate>
{{ end }} {{ end }}
<link>{{ $link }}</link> <link>{{ $link }}</link>
{{ with $managingeditor }} {{ with $editor }}
<managingEditor>{{ . }}</managingEditor> <managingEditor>{{ . }}</managingEditor>
{{ end }} {{ end }}
<title>{{ $title }}</title> <title>{{ $title }}</title>
{{ with $webmaster }} {{ with $master }}
<webMaster>{{ . }}</webMaster> <webMaster>{{ . }}</webMaster>
{{ end }} {{ end }}
@ -93,12 +93,12 @@
{{ $author := "" }} {{ $author := "" }}
{{ $authors := partial "paige/func-authors.html" . }} {{ $authors := partial "paige/func-authors.html" . }}
{{ $description := .Content }} {{ $description := .Content }}
{{ $external := and .Params.link (not (.Param "paige.feed.link_to_page")) | not | not }}
{{ $guid := printf "tag:%s,%s:%s" (urls.Parse site.BaseURL).Host (.PublishDate.Format "2006-01-02") (cond (.Params.id | not) .RelPermalink .Params.id) }} {{ $guid := printf "tag:%s,%s:%s" (urls.Parse site.BaseURL).Host (.PublishDate.Format "2006-01-02") (cond (.Params.id | not) .RelPermalink .Params.id) }}
{{ $paramlink := and .Params.link (not (.Param "paige.feed.link_to_page")) | not | not }} {{ $published := .PublishDate.Format $format }}
{{ $pubdate := .PublishDate.Format $format }}
{{ $title := .Title | markdownify | plainify | htmlUnescape }} {{ $title := .Title | markdownify | plainify | htmlUnescape }}
{{ $link := cond $paramlink .Params.link .Permalink }} {{ $link := cond $external .Params.link .Permalink }}
{{ with $authors }} {{ with $authors }}
{{ $primary := index . 0 }} {{ $primary := index . 0 }}
@ -110,10 +110,10 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ if and $description $paramlink }} {{ if and $description $external }}
{{ $pagelink := or (.Param "paige.feed.page_link" | markdownify) "⏎" }} {{ $text := or (.Param "paige.feed.page_link" | markdownify) "⏎" }}
{{ $footer := printf `<p><a href="%s" title="%s">%s</a></p>` .Permalink (htmlEscape $title) $pagelink | safeHTML }} {{ $footer := printf `<p><a href="%s" title="%s">%s</a></p>` .Permalink (htmlEscape $title) $text | safeHTML }}
{{ $description = print $description $footer }} {{ $description = print $description $footer }}
{{ end }} {{ end }}
@ -143,7 +143,7 @@
<link>{{ . }}</link> <link>{{ . }}</link>
{{ end }} {{ end }}
{{ with $pubdate }} {{ with $published }}
<pubDate>{{ . }}</pubDate> <pubDate>{{ . }}</pubDate>
{{ end }} {{ end }}

@ -1,11 +1,11 @@
{{ $page := . }} {{ $page := . }}
{{ $enabled := $page.Param "paige.comments.disable" | not }} {{ $enabled := $page.Param "paige.comments.disable" | not }}
{{ $disabledkinds := $page.Param "paige.comments.disable_kinds" }} {{ $disabledKinds := $page.Param "paige.comments.disable_kinds" }}
{{ $enabledkind := or (not $disabledkinds) (not (in $disabledkinds $page.Kind)) }} {{ $enabledKind := or (not $disabledKinds) (not (in $disabledKinds $page.Kind)) }}
{{ if and $enabled $enabledkind }} {{ if and $enabled $enabledKind }}
{{ template "_internal/disqus.html" $page }} {{ template "_internal/disqus.html" $page }}
{{ partial "paige/comments/cactus.html" $page }} {{ partial "paige/comments/cactus.html" $page }}
{{ partial "paige/comments/commento.html" $page }} {{ partial "paige/comments/commento.html" $page }}

@ -4,13 +4,13 @@
{{ $breakpoints := $params.breakpoints }} {{ $breakpoints := $params.breakpoints }}
{{ $class := $params.class }} {{ $class := $params.class }}
{{ $densities := $params.densities }} {{ $densities := $params.densities }}
{{ $fetchpriority := $params.fetchpriority }} {{ $fetchPriority := $params.fetchpriority }}
{{ $height := $params.height }} {{ $height := $params.height }}
{{ $link := $params.link }} {{ $link := $params.link }}
{{ $linked := $params.linked }} {{ $linked := $params.linked }}
{{ $loading := $params.loading }} {{ $loading := $params.loading }}
{{ $maxheight := $params.maxheight }} {{ $maxHeight := $params.maxheight }}
{{ $maxwidth := $params.maxwidth }} {{ $maxWidth := $params.maxwidth }}
{{ $page := $params.page }} {{ $page := $params.page }}
{{ $process := $params.process }} {{ $process := $params.process }}
{{ $resource := $params.resource }} {{ $resource := $params.resource }}
@ -21,14 +21,14 @@
{{ $title := $params.title }} {{ $title := $params.title }}
{{ $width := $params.width }} {{ $width := $params.width }}
{{ $intrinsicheight := "" }} {{ $intrinsicHeight := "" }}
{{ $intrinsicwidth := "" }} {{ $intrinsicWidth := "" }}
{{ if and (or $height $maxheight) (not (or $maxwidth $width)) }} {{ if and (or $height $maxHeight) (not (or $maxWidth $width)) }}
{{ $width = "auto" }} {{ $width = "auto" }}
{{ end }} {{ end }}
{{ if and (or $maxwidth $width) (not (or $height $maxheight)) }} {{ if and (or $maxWidth $width) (not (or $height $maxHeight)) }}
{{ $height = "auto" }} {{ $height = "auto" }}
{{ end }} {{ end }}
@ -54,12 +54,12 @@
{{ $style = $style | append (print "height: " $height) }} {{ $style = $style | append (print "height: " $height) }}
{{ end }} {{ end }}
{{ if $maxheight }} {{ if $maxHeight }}
{{ $style = $style | append (print "max-height: " $maxheight) }} {{ $style = $style | append (print "max-height: " $maxHeight) }}
{{ end }} {{ end }}
{{ if $maxwidth }} {{ if $maxWidth }}
{{ $style = $style | append (print "max-width: " $maxwidth) }} {{ $style = $style | append (print "max-width: " $maxWidth) }}
{{ end }} {{ end }}
{{ if $width }} {{ if $width }}
@ -77,7 +77,7 @@
{{ $options := slice }} {{ $options := slice }}
{{ $quality := "" }} {{ $quality := "" }}
{{ $size := "" }} {{ $size := "" }}
{{ $smallerresource := $resource }} {{ $smallerResource := $resource }}
{{ if $process }} {{ if $process }}
{{ range split (lower (cond (eq $process "default") "" $process)) " " }} {{ range split (lower (cond (eq $process "default") "" $process)) " " }}
@ -109,33 +109,33 @@
{{ $smalleroptions := print $size " " $quality " " $options }} {{ $smalleroptions := print $size " " $quality " " $options }}
{{ if eq $method "crop" }} {{ if eq $method "crop" }}
{{ $smallerresource = $resource.Crop $smalleroptions }} {{ $smallerResource = $resource.Crop $smalleroptions }}
{{ else if eq $method "fill" }} {{ else if eq $method "fill" }}
{{ $smallerresource = $resource.Fill $smalleroptions }} {{ $smallerResource = $resource.Fill $smalleroptions }}
{{ else if eq $method "fit" }} {{ else if eq $method "fit" }}
{{ $smallerresource = $resource.Fit $smalleroptions }} {{ $smallerResource = $resource.Fit $smalleroptions }}
{{ else if eq $method "resize" }} {{ else if eq $method "resize" }}
{{ $smallerresource = $resource.Resize $smalleroptions }} {{ $smallerResource = $resource.Resize $smalleroptions }}
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ $smallerresource = $smallerresource | fingerprint }} {{ $smallerResource = $smallerResource | fingerprint }}
{{ $intrinsicheight = $smallerresource.Height }} {{ $intrinsicHeight = $smallerResource.Height }}
{{ $intrinsicwidth = $smallerresource.Width }} {{ $intrinsicWidth = $smallerResource.Width }}
{{ $src = $smallerresource.Permalink }} {{ $src = $smallerResource.Permalink }}
{{ if and (not $sizes) (not $srcset) }} {{ if and (not $sizes) (not $srcset) }}
{{ $partialresource := "" }} {{ $partialResource := "" }}
{{ if and $method (or $breakpoints $densities) (ne $method "resize") }} {{ if and $method (or $breakpoints $densities) (ne $method "resize") }}
{{ $partialoptions := print $size " q100 " $options }} {{ $partialOptions := print $size " q100 " $options }}
{{ if eq $method "crop" }} {{ if eq $method "crop" }}
{{ $partialresource = $resource.Crop $partialoptions }} {{ $partialResource = $resource.Crop $partialOptions }}
{{ else if eq $method "fill" }} {{ else if eq $method "fill" }}
{{ $partialresource = $resource.Fill $partialoptions }} {{ $partialResource = $resource.Fill $partialOptions }}
{{ else if eq $method "fit" }} {{ else if eq $method "fit" }}
{{ $partialresource = $resource.Fit $partialoptions }} {{ $partialResource = $resource.Fit $partialOptions }}
{{ end }} {{ end }}
{{ end }} {{ end }}
@ -143,81 +143,81 @@
{{ $densities = split $densities " " }} {{ $densities = split $densities " " }}
{{ $srcset = slice }} {{ $srcset = slice }}
{{ $parseddensities := slice }} {{ $parsedDensities := slice }}
{{ range $densities }} {{ range $densities }}
{{ with findRE `^(\d+(\.\d+)?x|\.\d+x)$` . 1 }} {{ with findRE `^(\d+(\.\d+)?x|\.\d+x)$` . 1 }}
{{ $parseddensities = $parseddensities | append (strings.TrimSuffix "x" (index . 0) | float) }} {{ $parsedDensities = $parsedDensities | append (strings.TrimSuffix "x" (index . 0) | float) }}
{{ else }} {{ else }}
{{ errorf "layouts/partials/paige/image.html: invalid pixel density: %q" . }} {{ errorf "layouts/partials/paige/image.html: invalid pixel density: %q" . }}
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ $parseddensities = $parseddensities | uniq | sort }} {{ $parsedDensities = $parsedDensities | uniq | sort }}
{{ if lt (len $parseddensities) 2 }} {{ if lt (len $parsedDensities) 2 }}
{{ errorf "layouts/partials/paige/image.html: must have at least two unique pixel densities" }} {{ errorf "layouts/partials/paige/image.html: must have at least two unique pixel densities" }}
{{ end }} {{ end }}
{{ $base := 0 }} {{ $base := 0 }}
{{ $maxdensity := index $parseddensities (sub (len $parseddensities) 1) }} {{ $maxDensity := index $parsedDensities (sub (len $parsedDensities) 1) }}
{{ with $partialresource }} {{ with $partialResource }}
{{ $base = div .Width $maxdensity }} {{ $base = div .Width $maxDensity }}
{{ else }} {{ else }}
{{ $base = div $smallerresource.Width $maxdensity }} {{ $base = div $smallerResource.Width $maxDensity }}
{{ end }} {{ end }}
{{ range $parseddensities }} {{ range $parsedDensities }}
{{ if eq . $maxdensity }} {{ if eq . $maxDensity }}
{{ continue }} {{ continue }}
{{ end }} {{ end }}
{{ $imagewidth := mul $base . | math.Round | int }} {{ $imageWidth := mul $base . | math.Round | int }}
{{ $resized := "" }} {{ $resized := "" }}
{{ with $partialresource }} {{ with $partialResource }}
{{ $resized = .Resize (print $imagewidth "x " $quality " " $options) }} {{ $resized = .Resize (print $imageWidth "x " $quality " " $options) }}
{{ else }} {{ else }}
{{ $resized = $smallerresource.Resize (print $imagewidth "x q100 " $options) }} {{ $resized = $smallerResource.Resize (print $imageWidth "x q100 " $options) }}
{{ end }} {{ end }}
{{ $resized = $resized | fingerprint }} {{ $resized = $resized | fingerprint }}
{{ $srcset = $srcset | append (printf "%s %gx" $resized.RelPermalink .) }} {{ $srcset = $srcset | append (printf "%s %gx" $resized.RelPermalink .) }}
{{ end }} {{ end }}
{{ $srcset = $srcset | append (printf "%s %gx" $smallerresource.RelPermalink $maxdensity) }} {{ $srcset = $srcset | append (printf "%s %gx" $smallerResource.RelPermalink $maxDensity) }}
{{ $srcset = delimit $srcset ", " | string }} {{ $srcset = delimit $srcset ", " | string }}
{{ else if $breakpoints }} {{ else if $breakpoints }}
{{ $sizes = slice }} {{ $sizes = slice }}
{{ $srcset = slice }} {{ $srcset = slice }}
{{ $maxwidth := 0 }} {{ $maxWidth := 0 }}
{{ range slice (slice 550 576) (slice 696 768) (slice 936 992) (slice 1116 1200) (slice 1296 1400) }} {{ range slice (slice 550 576) (slice 696 768) (slice 936 992) (slice 1116 1200) (slice 1296 1400) }}
{{ $imagewidth := index . 0 }} {{ $imageWidth := index . 0 }}
{{ $viewwidth := index . 1 }} {{ $viewWidth := index . 1 }}
{{ if gt $imagewidth $smallerresource.Width }} {{ if gt $imageWidth $smallerResource.Width }}
{{ continue }} {{ continue }}
{{ end }} {{ end }}
{{ $resized := "" }} {{ $resized := "" }}
{{ with $partialresource }} {{ with $partialResource }}
{{ $resized = .Resize (print $imagewidth "x " $quality " " $options) }} {{ $resized = .Resize (print $imageWidth "x " $quality " " $options) }}
{{ else }} {{ else }}
{{ $resized = $smallerresource.Resize (print $imagewidth "x q100 " $options) }} {{ $resized = $smallerResource.Resize (print $imageWidth "x q100 " $options) }}
{{ end }} {{ end }}
{{ $resized = $resized | fingerprint }} {{ $resized = $resized | fingerprint }}
{{ $maxwidth = math.Max $maxwidth $imagewidth }} {{ $maxWidth = math.Max $maxWidth $imageWidth }}
{{ $sizes = $sizes | append (printf "(max-width: %dpx) %dpx" $viewwidth $imagewidth) }} {{ $sizes = $sizes | append (printf "(max-width: %dpx) %dpx" $viewWidth $imageWidth) }}
{{ $srcset = $srcset | append (printf "%s %dw" $resized.RelPermalink $imagewidth) }} {{ $srcset = $srcset | append (printf "%s %dw" $resized.RelPermalink $imageWidth) }}
{{ end }} {{ end }}
{{ if $sizes }} {{ if $sizes }}
{{ $sizes = $sizes | append (print $maxwidth "px") }} {{ $sizes = $sizes | append (print $maxWidth "px") }}
{{ $sizes = delimit $sizes ", " }} {{ $sizes = delimit $sizes ", " }}
{{ $srcset = delimit $srcset ", " }} {{ $srcset = delimit $srcset ", " }}
{{ end }} {{ end }}
@ -230,15 +230,15 @@
{{ $content := partial "paige/tag-img.html" (dict {{ $content := partial "paige/tag-img.html" (dict
"alt" $alt "alt" $alt
"class" $class "class" $class
"fetchpriority" $fetchpriority "fetchpriority" $fetchPriority
"height" $intrinsicheight "height" $intrinsicHeight
"loading" $loading "loading" $loading
"sizes" $sizes "sizes" $sizes
"src" $src "src" $src
"srcset" $srcset "srcset" $srcset
"style" $style "style" $style
"title" $title "title" $title
"width" $intrinsicwidth "width" $intrinsicWidth
) }} ) }}
{{ if $linked }} {{ if $linked }}

@ -3,20 +3,20 @@
{{ $authors := partial "paige/func-authors.html" $page | and ($page.Parent.Param "paige.subpage.disable_authors" | not) }} {{ $authors := partial "paige/func-authors.html" $page | and ($page.Parent.Param "paige.subpage.disable_authors" | not) }}
{{ $categories := $page.GetTerms "categories" }} {{ $categories := $page.GetTerms "categories" }}
{{ $date := $page.PublishDate | and ($page.Parent.Param "paige.subpage.disable_date" | not) }} {{ $date := $page.PublishDate | and ($page.Parent.Param "paige.subpage.disable_date" | not) }}
{{ $dateformat := $page.Parent.Param "paige.date_format" | default ":date_long" }}
{{ $description := $page.Description | markdownify | plainify | htmlUnescape | and ($page.Parent.Param "paige.subpage.disable_description" | not) }} {{ $description := $page.Description | markdownify | plainify | htmlUnescape | and ($page.Parent.Param "paige.subpage.disable_description" | not) }}
{{ $draft := $page.Draft }} {{ $draft := $page.Draft }}
{{ $expired := and $page.ExpiryDate (lt $page.ExpiryDate now) }} {{ $expired := and $page.ExpiryDate (lt $page.ExpiryDate now) }}
{{ $flags := slice }} {{ $flags := slice }}
{{ $format := $page.Parent.Param "paige.date_format" | default ":date_long" }}
{{ $future := and $page.PublishDate (gt $page.PublishDate now) }} {{ $future := and $page.PublishDate (gt $page.PublishDate now) }}
{{ $link := $page.RelPermalink }}
{{ $modified := and $page.PublishDate $page.Lastmod (lt $page.PublishDate $page.Lastmod) }} {{ $modified := and $page.PublishDate $page.Lastmod (lt $page.PublishDate $page.Lastmod) }}
{{ $readingtime := $page.ReadingTime | and ($page.Parent.Param "paige.subpage.disable_reading_time" | not) }} {{ $normal := eq ($page.Parent.Param "paige.keyword_style" | default "text") "text" }}
{{ $series := $page.GetTerms "series" | and ($page.Parent.Param "paige.subpage.disable_series" | not) }} {{ $series := $page.GetTerms "series" | and ($page.Parent.Param "paige.subpage.disable_series" | not) }}
{{ $summary := $page.Summary | markdownify | plainify | htmlUnescape | and ($page.Parent.Param "paige.subpage.disable_summary" | not) }} {{ $summary := $page.Summary | markdownify | plainify | htmlUnescape | and ($page.Parent.Param "paige.subpage.disable_summary" | not) }}
{{ $tags := $page.GetTerms "tags" }} {{ $tags := $page.GetTerms "tags" }}
{{ $textkeywords := eq ($page.Parent.Param "paige.keyword_style" | default "text") "text" }} {{ $time := $page.ReadingTime | and ($page.Parent.Param "paige.subpage.disable_reading_time" | not) }}
{{ $title := $page.Title | markdownify | plainify | htmlUnescape | and ($page.Parent.Param "paige.subpage.disable_title" | not) }} {{ $title := $page.Title | markdownify | plainify | htmlUnescape | and ($page.Parent.Param "paige.subpage.disable_title" | not) }}
{{ $titlelink := $page.RelPermalink }}
{{ if $draft }} {{ if $draft }}
{{ $flags = $flags | append "paige-draft" "paige-unpublished" }} {{ $flags = $flags | append "paige-draft" "paige-unpublished" }}
@ -43,7 +43,7 @@
<div class="{{ $class }}"> <div class="{{ $class }}">
{{ with $title }} {{ with $title }}
<p class="paige-row-narrow paige-title text-center"><a href="{{ $titlelink }}">{{ . }}</a></p> <p class="paige-row-narrow paige-title text-center"><a href="{{ $link }}">{{ . }}</a></p>
{{ end }} {{ end }}
{{ with $description }} {{ with $description }}
@ -65,7 +65,7 @@
{{- $kind = "tag" -}} {{- $kind = "tag" -}}
{{- end -}} {{- end -}}
{{- if $textkeywords -}} {{- if $normal -}}
{{- if gt $i 0 }} · {{ end -}} {{- if gt $i 0 }} · {{ end -}}
<a class="link-secondary paige-keyword paige-keyword-{{ $kind }}" href="{{ .RelPermalink | safeURL }}">{{ .Title }}</a> <a class="link-secondary paige-keyword paige-keyword-{{ $kind }}" href="{{ .RelPermalink | safeURL }}">{{ .Title }}</a>
@ -100,11 +100,11 @@
{{ with $date }} {{ with $date }}
<p class="paige-date text-center paige-row-narrow text-secondary"> <p class="paige-date text-center paige-row-narrow text-secondary">
<time datetime="{{ .Format `2006-01-02` }}">{{ time.Format $dateformat . }}</time> <time datetime="{{ .Format `2006-01-02` }}">{{ time.Format $format . }}</time>
</p> </p>
{{ end }} {{ end }}
{{ with $readingtime }} {{ with $time }}
<p class="paige-reading-time paige-row-narrow text-center text-secondary">{{ . }} {{ i18n "paige_minutes" . }}</p> <p class="paige-reading-time paige-row-narrow text-center text-secondary">{{ . }} {{ i18n "paige_minutes" . }}</p>
{{ end }} {{ end }}
</div> </div>

@ -4,22 +4,22 @@
{{ $authors := partial "paige/func-authors.html" $page | and ($page.Param "paige.page.disable_authors" | not) }} {{ $authors := partial "paige/func-authors.html" $page | and ($page.Param "paige.page.disable_authors" | not) }}
{{ $categories := $page.GetTerms "categories" }} {{ $categories := $page.GetTerms "categories" }}
{{ $date := and $page.IsPage $page.PublishDate | and ($page.Param "paige.page.disable_date" | not) }} {{ $date := and $page.IsPage $page.PublishDate | and ($page.Param "paige.page.disable_date" | not) }}
{{ $dateformat := $page.Param "paige.date_format" | default ":date_long" }}
{{ $description := $page.Description | markdownify | and ($page.Param "paige.page.disable_description" | not) }} {{ $description := $page.Description | markdownify | and ($page.Param "paige.page.disable_description" | not) }}
{{ $first := templates.Exists "partials/paige/page-header-first.html" }} {{ $first := templates.Exists "partials/paige/page-header-first.html" }}
{{ $format := $page.Param "paige.date_format" | default ":date_long" }}
{{ $last := templates.Exists "partials/paige/page-header-last.html" }} {{ $last := templates.Exists "partials/paige/page-header-last.html" }}
{{ $link := $page.Params.link }} {{ $link := $page.Params.link }}
{{ $microdata := $page.Params.paige.page.microdata }} {{ $microdata := $page.Params.paige.page.microdata }}
{{ $readingtime := $page.ReadingTime | and ($page.Param "paige.page.disable_reading_time" | not) }} {{ $normal := eq ($page.Param "paige.keyword_style" | default "text") "text" }}
{{ $series := $page.GetTerms "series" | and ($page.Param "paige.page.disable_series" | not) }} {{ $series := $page.GetTerms "series" | and ($page.Param "paige.page.disable_series" | not) }}
{{ $tags := $page.GetTerms "tags" }} {{ $tags := $page.GetTerms "tags" }}
{{ $textkeywords := eq ($page.Param "paige.keyword_style" | default "text") "text" }} {{ $time := $page.ReadingTime | and ($page.Param "paige.page.disable_reading_time" | not) }}
{{ $title := $page.Title | markdownify | and ($page.Param "paige.page.disable_title" | not) }} {{ $title := $page.Title | markdownify | and ($page.Param "paige.page.disable_title" | not) }}
{{ $toc := and $page.Content (ne $page.TableOfContents `<nav id="TableOfContents"></nav>`) | and ($page.Param "paige.page.disable_toc" | not) }} {{ $toc := and $page.Content (ne $page.TableOfContents `<nav id="TableOfContents"></nav>`) | and ($page.Param "paige.page.disable_toc" | not) }}
{{ $keywords := sort (append $categories $tags) "Title" | and ($page.Param "paige.page.disable_keywords" | not) }} {{ $keywords := sort (append $categories $tags) "Title" | and ($page.Param "paige.page.disable_keywords" | not) }}
{{ if or $alert $authors $date $description $first $keywords $last $readingtime $series $title $toc }} {{ if or $alert $authors $date $description $first $keywords $last $time $series $title $toc }}
<header class="mw-100" id="paige-page-header"> <header class="mw-100" id="paige-page-header">
<div class="align-items-center d-flex flex-column"> <div class="align-items-center d-flex flex-column">
{{ if $first }} {{ if $first }}
@ -34,10 +34,10 @@
<p class="lead paige-row-wide" id="paige-page-description" {{ if $microdata }} itemprop="alternativeHeadline description" {{ end }}>{{ . }}</p> <p class="lead paige-row-wide" id="paige-page-description" {{ if $microdata }} itemprop="alternativeHeadline description" {{ end }}>{{ . }}</p>
{{ end }} {{ end }}
{{ if or $authors $date $keywords $readingtime $series }} {{ if or $authors $date $keywords $time $series }}
<div id="paige-metadata"> <div id="paige-metadata">
{{ with $keywords }} {{ with $keywords }}
<p class="{{ if $textkeywords }} paige-row-narrow {{ end }} text-center {{ if $textkeywords }} text-secondary {{ end }}" id="paige-keywords"> <p class="{{ if $normal }} paige-row-narrow {{ end }} text-center {{ if $normal }} text-secondary {{ end }}" id="paige-keywords">
{{ range $i, $term := . -}} {{ range $i, $term := . -}}
{{- $kind := false -}} {{- $kind := false -}}
@ -47,7 +47,7 @@
{{- $kind = "tag" -}} {{- $kind = "tag" -}}
{{- end -}} {{- end -}}
{{- if $textkeywords -}} {{- if $normal -}}
{{- if gt $i 0 }} · {{ end -}} {{- if gt $i 0 }} · {{ end -}}
<a class="link-secondary paige-keyword paige-keyword-{{ $kind }}" href="{{ .RelPermalink | safeURL }}" {{ if $microdata }} itemprop="keywords" {{ end }}>{{ .Title }}</a> <a class="link-secondary paige-keyword paige-keyword-{{ $kind }}" href="{{ .RelPermalink | safeURL }}" {{ if $microdata }} itemprop="keywords" {{ end }}>{{ .Title }}</a>
@ -82,11 +82,11 @@
{{ with $date }} {{ with $date }}
<p class="paige-row-narrow text-center text-secondary" id="paige-date"> <p class="paige-row-narrow text-center text-secondary" id="paige-date">
<time datetime="{{ .Format `2006-01-02` }}" {{ if $microdata }} itemprop="datePublished" {{ end }}>{{ time.Format $dateformat . }}</time> <time datetime="{{ .Format `2006-01-02` }}" {{ if $microdata }} itemprop="datePublished" {{ end }}>{{ time.Format $format . }}</time>
</p> </p>
{{ end }} {{ end }}
{{ with $readingtime }} {{ with $time }}
<p class="paige-row-narrow text-center text-secondary" id="paige-reading-time" {{ if $microdata }} itemprop="timeRequired" {{ end }}>{{ . }} {{ i18n "paige_minutes" . }}</p> <p class="paige-row-narrow text-center text-secondary" id="paige-reading-time" {{ if $microdata }} itemprop="timeRequired" {{ end }}>{{ . }} {{ i18n "paige_minutes" . }}</p>
{{ end }} {{ end }}
</div> </div>

@ -1,15 +1,15 @@
{{ $page := . }} {{ $page := . }}
{{ $auto := $page.Param "paige.page.disable_auto_schema" | not }} {{ $auto := $page.Param "paige.page.disable_auto_schema" | not }}
{{ $pagebase := $page.Param "paige.page.base_schema" }} {{ $pageBase := $page.Param "paige.page.base_schema" }}
{{ $sitebase := $page.Param "paige.site.base_schema" }} {{ $siteBase := $page.Param "paige.site.base_schema" }}
{{ range $page.Param "paige.site.schemas" }} {{ range $page.Param "paige.site.schemas" }}
<script type="application/ld+json">{{ merge $sitebase . | jsonify | safeJS }}</script> <script type="application/ld+json">{{ merge $siteBase . | jsonify | safeJS }}</script>
{{ end }} {{ end }}
{{ range $page.Param "paige.page.schemas" }} {{ range $page.Param "paige.page.schemas" }}
<script type="application/ld+json">{{ merge $pagebase . | jsonify | safeJS }}</script> <script type="application/ld+json">{{ merge $pageBase . | jsonify | safeJS }}</script>
{{ end }} {{ end }}
{{ if $auto }} {{ if $auto }}
@ -38,44 +38,44 @@
{{ end }} {{ end }}
{{ with $audios }} {{ with $audios }}
{{ $audioObjects := slice }} {{ $objects := slice }}
{{ range $audios }} {{ range $audios }}
{{ $audioObjects = $audioObjects | append (dict "@type" "AudioObject" "url" .) }} {{ $objects = $objects | append (dict "@type" "AudioObject" "url" .) }}
{{ end }} {{ end }}
{{ $schema.Set "audio" $audioObjects }} {{ $schema.Set "audio" $objects }}
{{ end }} {{ end }}
{{ with $authors }} {{ with $authors }}
{{ $authorObjects := slice }} {{ $objects := slice }}
{{ range $authors }} {{ range $authors }}
{{ $authoremail := cond (. | not | not) .Params.paige.author.email "" }} {{ $email := cond (. | not | not) .Params.paige.author.email "" }}
{{ $authorname := cond (. | not | not) .Params.paige.author.name "" }} {{ $name := cond (. | not | not) .Params.paige.author.name "" }}
{{ $authorurl := cond (. | not | not) .Params.paige.author.url "" }} {{ $url := cond (. | not | not) .Params.paige.author.url "" }}
{{ if or $authoremail $authorname $authorurl }} {{ if or $email $name $url }}
{{ $authorSchema := newScratch }} {{ $object := newScratch }}
{{ with $authoremail }} {{ with $email }}
{{ $authorSchema.Set "email" . }} {{ $object.Set "email" . }}
{{ end }} {{ end }}
{{ with $authorname }} {{ with $name }}
{{ $authorSchema.Set "name" . }} {{ $object.Set "name" . }}
{{ end }} {{ end }}
{{ with $authorurl }} {{ with $url }}
{{ $authorSchema.Set "url" . }} {{ $object.Set "url" . }}
{{ end }} {{ end }}
{{ $authorSchema.Set "@type" "Person" }} {{ $object.Set "@type" "Person" }}
{{ $authorObjects = $authorObjects | append $authorSchema.Values }} {{ $objects = $objects | append $object.Values }}
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ $schema.Set "author" $authorObjects }} {{ $schema.Set "author" $objects }}
{{ end }} {{ end }}
{{ with site.Copyright }} {{ with site.Copyright }}
@ -107,13 +107,13 @@
{{ end }} {{ end }}
{{ with $images }} {{ with $images }}
{{ $imageObjects := slice }} {{ $objects := slice }}
{{ range $images }} {{ range $images }}
{{ $imageObjects = $imageObjects | append (dict "@type" "ImageObject" "url" .) }} {{ $objects = $objects | append (dict "@type" "ImageObject" "url" .) }}
{{ end }} {{ end }}
{{ $schema.Set "image" $imageObjects }} {{ $schema.Set "image" $objects }}
{{ end }} {{ end }}
{{ with site.Language }} {{ with site.Language }}
@ -137,18 +137,18 @@
{{ end }} {{ end }}
{{ with $videos }} {{ with $videos }}
{{ $videoObjects := slice }} {{ $objects := slice }}
{{ range $videos }} {{ range $videos }}
{{ $videoObjects = $videoObjects | append (dict "@type" "VideoObject" "url" .) }} {{ $objects = $objects | append (dict "@type" "VideoObject" "url" .) }}
{{ end }} {{ end }}
{{ $schema.Set "video" $videoObjects }} {{ $schema.Set "video" $objects }}
{{ end }} {{ end }}
{{ with $page.WordCount }} {{ with $page.WordCount }}
{{ $schema.Set "wordCount" . }} {{ $schema.Set "wordCount" . }}
{{ end }} {{ end }}
<script type="application/ld+json">{{ merge $pagebase $schema.Values | jsonify | safeJS }}</script> <script type="application/ld+json">{{ merge $pageBase $schema.Values | jsonify | safeJS }}</script>
{{ end }} {{ end }}

@ -1,8 +1,6 @@
{{ $page := . }} {{ $page := . }}
{{ $titleconfig := $page.Param "paige.title" | default site.Title }} {{ $basePath := path.Clean (urls.Parse (relLangURL "")).Path }}
{{ $basepath := path.Clean (urls.Parse (relLangURL "")).Path }}
{{ $breadcrumbs := $page.Ancestors | and ($page.Param "paige.site.disable_breadcrumbs" | not) }} {{ $breadcrumbs := $page.Ancestors | and ($page.Param "paige.site.disable_breadcrumbs" | not) }}
{{ $description := $page.Param "paige.description" | markdownify | and ($page.Param "paige.site.disable_description" | not) }} {{ $description := $page.Param "paige.description" | markdownify | and ($page.Param "paige.site.disable_description" | not) }}
{{ $first := templates.Exists "partials/paige/site-header-first.html" }} {{ $first := templates.Exists "partials/paige/site-header-first.html" }}
@ -11,14 +9,14 @@
{{ $menu := $page.Param "paige.site.disable_menu" | not }} {{ $menu := $page.Param "paige.site.disable_menu" | not }}
{{ $pills := false }} {{ $pills := false }}
{{ $tabs := false }} {{ $tabs := false }}
{{ $title := $titleconfig | markdownify | and ($page.Param "paige.site.disable_title" | not) }} {{ $title := $page.Param "paige.title" | default site.Title | markdownify | and ($page.Param "paige.site.disable_title" | not) }}
{{ $underline := false }} {{ $underline := false }}
{{ if eq $basepath "/" }} {{ if eq $basePath "/" }}
{{ $basepath = "" }} {{ $basePath = "" }}
{{ end }} {{ end }}
{{ $pagepath := strings.TrimPrefix $basepath $page.RelPermalink }} {{ $pagePath := strings.TrimPrefix $basePath $page.RelPermalink }}
{{ with $page.Param "paige.menu_style" }} {{ with $page.Param "paige.menu_style" }}
{{ if eq . "pills" }} {{ if eq . "pills" }}
@ -53,13 +51,13 @@
<nav aria-label="{{ i18n `paige_menu` }}" class="paige-row-wide" id="paige-menu"> <nav aria-label="{{ i18n `paige_menu` }}" class="paige-row-wide" id="paige-menu">
<ul class="align-items-center justify-content-center nav {{ if $pills }} nav-pills {{ else if $tabs }} nav-tabs {{ else if $underline }} nav-underline {{ end }}"> <ul class="align-items-center justify-content-center nav {{ if $pills }} nav-pills {{ else if $tabs }} nav-tabs {{ else if $underline }} nav-underline {{ end }}">
{{ range . }} {{ range . }}
{{ $menupath := strings.TrimPrefix $basepath .URL }} {{ $menuPath := strings.TrimPrefix $basePath .URL }}
{{ $home := and (eq $menupath "/") (eq $page.Section "") }} {{ $home := and (eq $menuPath "/") (eq $page.Section "") }}
{{ $menuprefix := and (ne $menupath "/") (hasPrefix $pagepath $menupath) }} {{ $menu := and (ne $menuPath "/") (hasPrefix $pagePath $menuPath) }}
{{ $sectionprefix := and (ne $menupath "/") (hasPrefix $menupath (printf "/%s/" $page.Section)) }} {{ $section := and (ne $menuPath "/") (hasPrefix $menuPath (printf "/%s/" $page.Section)) }}
{{ $active := or $home $menuprefix $sectionprefix }} {{ $active := or $home $menu $section }}
<li class="nav-item {{ if .Children }} dropdown {{ end }}"> <li class="nav-item {{ if .Children }} dropdown {{ end }}">
<a {{ if $active }} aria-current="page" {{ end }} {{ if .Children }} aria-expanded="false" {{ end }} class="{{ if $active }} active {{ if $links }} fw-bold text-body {{ end }} {{ end }} {{ if .Params.paige.disabled }} disabled {{ end }} nav-link {{ if .Children }} dropdown-toggle {{ end }} {{ if $links }} text-decoration-underline {{ end }}" {{ if .Children }} data-bs-toggle="dropdown" {{ end }} href="{{ if not .Children -}} {{- .URL | safeURL -}} {{- end }}" {{ if .Children }} role="button" {{ end }} {{ if not .Children }} {{ with partial "paige/func-target.html" (dict "page" $page "url" .URL) }} target="{{ . }}" {{ end }} {{ end }}>{{ .Name | markdownify }}</a> <a {{ if $active }} aria-current="page" {{ end }} {{ if .Children }} aria-expanded="false" {{ end }} class="{{ if $active }} active {{ if $links }} fw-bold text-body {{ end }} {{ end }} {{ if .Params.paige.disabled }} disabled {{ end }} nav-link {{ if .Children }} dropdown-toggle {{ end }} {{ if $links }} text-decoration-underline {{ end }}" {{ if .Children }} data-bs-toggle="dropdown" {{ end }} href="{{ if not .Children -}} {{- .URL | safeURL -}} {{- end }}" {{ if .Children }} role="button" {{ end }} {{ if not .Children }} {{ with partial "paige/func-target.html" (dict "page" $page "url" .URL) }} target="{{ . }}" {{ end }} {{ end }}>{{ .Name | markdownify }}</a>
@ -114,22 +112,22 @@
<nav aria-label="{{ i18n `paige_menu` }}" class="paige-row-wide" id="paige-menu"> <nav aria-label="{{ i18n `paige_menu` }}" class="paige-row-wide" id="paige-menu">
<ul class="align-items-center justify-content-center nav {{ if $pills }} nav-pills {{ else if $tabs }} nav-tabs {{ else if $underline }} nav-underline {{ end }}"> <ul class="align-items-center justify-content-center nav {{ if $pills }} nav-pills {{ else if $tabs }} nav-tabs {{ else if $underline }} nav-underline {{ end }}">
{{ with $titleconfig }} {{ with $title }}
{{ $homemenuactive := eq $page.Section "" }} {{ $active := eq $page.Section "" }}
<li class="nav-item"> <li class="nav-item">
<a {{ if $homemenuactive }} aria-current="page" {{ end }} class="{{ if $homemenuactive }} active {{ if $links }} fw-bold text-body {{ end }} {{ end }} nav-link {{ if $links }} text-decoration-underline {{ end }}" href="/">{{ . }}</a> <a {{ if $active }} aria-current="page" {{ end }} class="{{ if $active }} active {{ if $links }} fw-bold text-body {{ end }} {{ end }} nav-link {{ if $links }} text-decoration-underline {{ end }}" href="/">{{ . }}</a>
</li> </li>
{{ end }} {{ end }}
{{ range $pages }} {{ range $pages }}
{{ $menupath := strings.TrimPrefix $basepath .RelPermalink }} {{ $menuPath := strings.TrimPrefix $basePath .RelPermalink }}
{{ $home := and (eq $menupath "/") (eq $page.Section "") }} {{ $home := and (eq $menuPath "/") (eq $page.Section "") }}
{{ $menuprefix := and (ne $menupath "/") (hasPrefix $pagepath $menupath) }} {{ $menu := and (ne $menuPath "/") (hasPrefix $pagePath $menuPath) }}
{{ $sectionprefix := and (ne $menupath "/") (hasPrefix $menupath (printf "/%s/" $page.Section)) }} {{ $section := and (ne $menuPath "/") (hasPrefix $menuPath (printf "/%s/" $page.Section)) }}
{{ $active := or $home $menuprefix $sectionprefix }} {{ $active := or $home $menu $section }}
<li class="nav-item"> <li class="nav-item">
<a {{ if $active }} aria-current="page" {{ end }} class="{{ if $active }} active {{ if $links }} fw-bold text-body {{ end }} {{ end }} nav-link {{ if $links }} text-decoration-underline {{ end }}" href="{{ .RelPermalink | safeURL }}" {{ with partial "paige/func-target.html" (dict "page" $page "url" .RelPermalink) }} target="{{ . }}" {{ end }}>{{ .Title }}</a> <a {{ if $active }} aria-current="page" {{ end }} class="{{ if $active }} active {{ if $links }} fw-bold text-body {{ end }} {{ end }} nav-link {{ if $links }} text-decoration-underline {{ end }}" href="{{ .RelPermalink | safeURL }}" {{ with partial "paige/func-target.html" (dict "page" $page "url" .RelPermalink) }} target="{{ . }}" {{ end }}>{{ .Title }}</a>

@ -1,8 +1,8 @@
{{ $params := . }} {{ $params := . }}
{{ $fullscreen := $params.fullscreen }} {{ $fullscreen := $params.fullscreen }}
{{ $referrerpolicy := $params.referrerpolicy | default "no-referrer" }} {{ $policy := $params.referrerpolicy | default "no-referrer" }}
{{ $src := $params.src }} {{ $src := $params.src }}
{{ $title := $params.title }} {{ $title := $params.title }}
<iframe {{ if $fullscreen }} allowfullscreen {{ end }} {{ with $referrerpolicy }} referrerpolicy="{{ . }}" {{ end }} {{ with $src }} src="{{ . | safeURL }}" {{ end }} {{ with $title }} title="{{ . }}" {{ end }}></iframe> <iframe {{ if $fullscreen }} allowfullscreen {{ end }} {{ with $policy }} referrerpolicy="{{ . }}" {{ end }} {{ with $src }} src="{{ . | safeURL }}" {{ end }} {{ with $title }} title="{{ . }}" {{ end }}></iframe>

@ -2,11 +2,11 @@
{{ $alt := $params.alt }} {{ $alt := $params.alt }}
{{ $class := $params.class }} {{ $class := $params.class }}
{{ $crossorigin := $params.crossorigin | default "anonymous" }}
{{ $fetchpriority := $params.fetchpriority }}
{{ $height := $params.height }} {{ $height := $params.height }}
{{ $loading := $params.loading | default "eager" }} {{ $loading := $params.loading | default "eager" }}
{{ $referrerpolicy := $params.referrerpolicy | default "no-referrer" }} {{ $origin := $params.crossorigin | default "anonymous" }}
{{ $policy := $params.referrerpolicy | default "no-referrer" }}
{{ $priority := $params.fetchpriority }}
{{ $sizes := $params.sizes }} {{ $sizes := $params.sizes }}
{{ $src := $params.src }} {{ $src := $params.src }}
{{ $srcset := $params.srcset }} {{ $srcset := $params.srcset }}
@ -14,4 +14,4 @@
{{ $title := $params.title }} {{ $title := $params.title }}
{{ $width := $params.width }} {{ $width := $params.width }}
<img {{ with $alt }} alt="{{ . }}" {{ end }} {{ with $class }} class="{{ . }}" {{ end }} crossorigin="{{ $crossorigin }}" {{ if and $fetchpriority (ne $fetchpriority "auto") }} fetchpriority="{{ $fetchpriority }}" {{ end }} {{ with $height }} height="{{ . }}" {{ end }} {{ if ne $loading "eager" }} loading="{{ $loading }}" {{ end }} referrerpolicy="{{ $referrerpolicy }}" {{ with $sizes }} sizes="{{ . }}" {{ end }} src="{{ $src }}" {{ with $srcset }} {{ printf `srcset="%s"` . | safeHTMLAttr }} {{ end }} {{ with $style }} style="{{ . | safeCSS }}" {{ end }} {{ with $title }} title="{{ . }}" {{ end }} {{ with $width }} width="{{ . }}" {{ end }}> <img {{ with $alt }} alt="{{ . }}" {{ end }} {{ with $class }} class="{{ . }}" {{ end }} crossorigin="{{ $origin }}" {{ if and $priority (ne $priority "auto") }} fetchpriority="{{ $priority }}" {{ end }} {{ with $height }} height="{{ . }}" {{ end }} {{ if ne $loading "eager" }} loading="{{ $loading }}" {{ end }} referrerpolicy="{{ $policy }}" {{ with $sizes }} sizes="{{ . }}" {{ end }} src="{{ $src }}" {{ with $srcset }} {{ printf `srcset="%s"` . | safeHTMLAttr }} {{ end }} {{ with $style }} style="{{ . | safeCSS }}" {{ end }} {{ with $title }} title="{{ . }}" {{ end }} {{ with $width }} width="{{ . }}" {{ end }}>

@ -1,14 +1,14 @@
{{ $params := . }} {{ $params := . }}
{{ $context := $params.context }} {{ $context := $params.context }}
{{ $crossorigin := $params.crossorigin | default "anonymous" }}
{{ $enablesourcemap := not hugo.IsProduction }} {{ $enablesourcemap := not hugo.IsProduction }}
{{ $href := $params.href }} {{ $href := $params.href }}
{{ $includepaths := $params.includepaths }}
{{ $integrity := $params.integrity }} {{ $integrity := $params.integrity }}
{{ $origin := $params.crossorigin | default "anonymous" }}
{{ $outputstyle := cond hugo.IsProduction "compressed" "" }} {{ $outputstyle := cond hugo.IsProduction "compressed" "" }}
{{ $page := $params.page }} {{ $page := $params.page }}
{{ $referrerpolicy := $params.referrerpolicy | default "no-referrer" }} {{ $paths := $params.includepaths }}
{{ $policy := $params.referrerpolicy | default "no-referrer" }}
{{ $sass := $params.sass }} {{ $sass := $params.sass }}
{{ $template := $params.template }} {{ $template := $params.template }}
@ -28,7 +28,7 @@
{{ if $sass }} {{ if $sass }}
{{/* TODO: Remove the silenceDeprecations option when Bootstrap is updated beyond v5.3.3. */}} {{/* TODO: Remove the silenceDeprecations option when Bootstrap is updated beyond v5.3.3. */}}
{{ $resource = $resource | toCSS (dict "enableSourceMap" $enablesourcemap "includePaths" $includepaths "outputStyle" $outputstyle "silenceDeprecations" (slice "color-functions" "global-builtin" "import" "mixed-decls") "transpiler" "dartsass") }} {{ $resource = $resource | toCSS (dict "enableSourceMap" $enablesourcemap "includePaths" $paths "outputStyle" $outputstyle "silenceDeprecations" (slice "color-functions" "global-builtin" "import" "mixed-decls") "transpiler" "dartsass") }}
{{ end }} {{ end }}
{{ $resource = $resource | minify | fingerprint }} {{ $resource = $resource | minify | fingerprint }}
@ -38,4 +38,4 @@
{{ $href = relLangURL $href }} {{ $href = relLangURL $href }}
{{ end }} {{ end }}
<link {{ with $crossorigin }} crossorigin="{{ . }}" {{ end }} href="{{ $href | safeURL }}" {{ with $integrity }} integrity="{{ . }}" {{ end }} {{ with $referrerpolicy }} referrerpolicy="{{ . }}" {{ end }} rel="stylesheet"> <link {{ with $origin }} crossorigin="{{ . }}" {{ end }} href="{{ $href | safeURL }}" {{ with $integrity }} integrity="{{ . }}" {{ end }} {{ with $policy }} referrerpolicy="{{ . }}" {{ end }} rel="stylesheet">

@ -1,11 +1,11 @@
{{ $params := . }} {{ $params := . }}
{{ $crossorigin := $params.crossorigin | default "anonymous" }}
{{ $defer := $params.defer | default "defer" }} {{ $defer := $params.defer | default "defer" }}
{{ $integrity := $params.integrity }} {{ $integrity := $params.integrity }}
{{ $onload := $params.onload | safeJS }} {{ $onload := $params.onload | safeJS }}
{{ $origin := $params.crossorigin | default "anonymous" }}
{{ $page := $params.page }} {{ $page := $params.page }}
{{ $referrerpolicy := $params.referrerpolicy | default "no-referrer" }} {{ $policy := $params.referrerpolicy | default "no-referrer" }}
{{ $src := $params.src }} {{ $src := $params.src }}
{{ $type := $params.type }} {{ $type := $params.type }}
@ -22,4 +22,4 @@
{{ $src = relLangURL $src }} {{ $src = relLangURL $src }}
{{ end }} {{ end }}
<script {{ with $crossorigin }} crossorigin="{{ . }}" {{ end }} {{ with $defer }} defer {{ end }} integrity="{{ $integrity }}" {{ with $onload }} onload="{{ . }}" {{ end }} {{ with $referrerpolicy }} referrerpolicy="{{ . }}" {{ end }} src="{{ $src | safeURL }}" {{ with $type }} {{ printf `type="%v"` . | safeHTMLAttr }} {{ end }}></script> <script {{ with $origin }} crossorigin="{{ . }}" {{ end }} {{ with $defer }} defer {{ end }} integrity="{{ $integrity }}" {{ with $onload }} onload="{{ . }}" {{ end }} {{ with $policy }} referrerpolicy="{{ . }}" {{ end }} src="{{ $src | safeURL }}" {{ with $type }} {{ printf `type="%v"` . | safeHTMLAttr }} {{ end }}></script>

@ -3,9 +3,9 @@
{{ $class := $params.class | default "paige-video ratio ratio-16x9" }} {{ $class := $params.class | default "paige-video ratio ratio-16x9" }}
{{ $fullscreen := $params.fullscreen }} {{ $fullscreen := $params.fullscreen }}
{{ $height := $params.height }} {{ $height := $params.height }}
{{ $maxheight := $params.maxheight }} {{ $maxHeight := $params.maxheight }}
{{ $maxwidth := $params.maxwidth }} {{ $maxWidth := $params.maxwidth }}
{{ $referrerpolicy := $params.referrerpolicy | default "no-referrer" }} {{ $policy := $params.referrerpolicy | default "no-referrer" }}
{{ $src := $params.src }} {{ $src := $params.src }}
{{ $title := $params.title }} {{ $title := $params.title }}
{{ $width := $params.width }} {{ $width := $params.width }}
@ -16,12 +16,12 @@
{{ $styles = $styles | append (print "height: " $height) }} {{ $styles = $styles | append (print "height: " $height) }}
{{ end }} {{ end }}
{{ if $maxheight }} {{ if $maxHeight }}
{{ $styles = $styles | append (print "max-height: " $maxheight) }} {{ $styles = $styles | append (print "max-height: " $maxHeight) }}
{{ end }} {{ end }}
{{ if $maxwidth }} {{ if $maxWidth }}
{{ $styles = $styles | append (print "max-width: " $maxwidth) }} {{ $styles = $styles | append (print "max-width: " $maxWidth) }}
{{ end }} {{ end }}
{{ if $width }} {{ if $width }}
@ -33,7 +33,7 @@
<div class="{{ $class }}" {{ with $styles }} style="{{ . | safeCSS }}" {{ end }}> <div class="{{ $class }}" {{ with $styles }} style="{{ . | safeCSS }}" {{ end }}>
{{ partial "paige/tag-iframe.html" (dict {{ partial "paige/tag-iframe.html" (dict
"fullscreen" $fullscreen "fullscreen" $fullscreen
"referrerpolicy" $referrerpolicy "referrerpolicy" $policy
"src" $src "src" $src
"title" $title "title" $title
) }} ) }}

@ -2,7 +2,7 @@
{{ $content := .InnerDeindent | markdownify }} {{ $content := .InnerDeindent | markdownify }}
{{ $float := .Get "float" }} {{ $float := .Get "float" }}
{{ $horizontal := .Get "horizontal" | default "center" }} {{ $horizontal := .Get "horizontal" | default "center" }}
{{ $maxwidth := .Get "maxwidth" }} {{ $maxWidth := .Get "maxwidth" }}
{{ $number := .Get "number" }} {{ $number := .Get "number" }}
{{ $numbered := .Get "numbered" }} {{ $numbered := .Get "numbered" }}
{{ $vertical := .Get "vertical" | default "center" }} {{ $vertical := .Get "vertical" | default "center" }}
@ -12,8 +12,8 @@
{{ errorf "layouts/shortcodes/paige/figure.html: no content" }} {{ errorf "layouts/shortcodes/paige/figure.html: no content" }}
{{ end }} {{ end }}
{{ $showcaption := $caption }} {{ $showCaption := $caption }}
{{ $sidemargin := "" }} {{ $sideMargin := "" }}
{{ $table := false }} {{ $table := false }}
{{ $widths := slice }} {{ $widths := slice }}
@ -21,8 +21,8 @@
{{ $table = true }} {{ $table = true }}
{{ end }} {{ end }}
{{ if $maxwidth }} {{ if $maxWidth }}
{{ $widths = $widths | append (printf "max-width: %v" $maxwidth) }} {{ $widths = $widths | append (printf "max-width: %v" $maxWidth) }}
{{ end }} {{ end }}
{{ if $width }} {{ if $width }}
@ -33,9 +33,9 @@
{{ if $float }} {{ if $float }}
{{ if eq $float "start" }} {{ if eq $float "start" }}
{{ $sidemargin = "me-4" }} {{ $sideMargin = "me-4" }}
{{ else if eq $float "end" }} {{ else if eq $float "end" }}
{{ $sidemargin = "ms-4" }} {{ $sideMargin = "ms-4" }}
{{ else }} {{ else }}
{{ errorf "layouts/shortcodes/paige/figure.html: invalid float: %q" $float }} {{ errorf "layouts/shortcodes/paige/figure.html: invalid float: %q" $float }}
{{ end }} {{ end }}
@ -48,20 +48,20 @@
{{ else }} {{ else }}
{{ if $number }} {{ if $number }}
{{ $caption = printf "%v %v" (i18n "paige_figure") $number }} {{ $caption = printf "%v %v" (i18n "paige_figure") $number }}
{{ $showcaption = true }} {{ $showCaption = true }}
{{ else if $numbered }} {{ else if $numbered }}
{{ $showcaption = true }} {{ $showCaption = true }}
{{ end }} {{ end }}
{{ end }} {{ end }}
{{/* The markup below cannot be indented due to nested shortcodes within Markdown. */}} {{/* The markup below cannot be indented due to nested shortcodes within Markdown. */}}
<div class="paige-figure {{ if $numbered }} paige-figure-numbered {{ end }}"> <div class="paige-figure {{ if $numbered }} paige-figure-numbered {{ end }}">
<div class="align-items-{{ $vertical }} d-flex {{ with $float }} float-{{ . }} {{ end }} h-100 justify-content-{{ $horizontal }} {{ with $sidemargin }} {{ . }} {{ end }}"> <div class="align-items-{{ $vertical }} d-flex {{ with $float }} float-{{ . }} {{ end }} h-100 justify-content-{{ $horizontal }} {{ with $sideMargin }} {{ . }} {{ end }}">
<figure class="{{ if $table }} d-table {{ end }} mb-0" {{ with $widths }} style="{{ . | safeCSS }}" {{ end }}> <figure class="{{ if $table }} d-table {{ end }} mb-0" {{ with $widths }} style="{{ . | safeCSS }}" {{ end }}>
<div class="d-flex justify-content-{{ $horizontal }} text-{{ $horizontal }}">{{ $content }}</div> <div class="d-flex justify-content-{{ $horizontal }} text-{{ $horizontal }}">{{ $content }}</div>
{{ if $showcaption }} {{ if $showCaption }}
<figcaption class="figure-caption mt-2 text-{{ $horizontal }}" {{ if $table }} style="caption-side: bottom; display: table-caption" {{ end }}>{{ $caption }}</figcaption> <figcaption class="figure-caption mt-2 text-{{ $horizontal }}" {{ if $table }} style="caption-side: bottom; display: table-caption" {{ end }}>{{ $caption }}</figcaption>
{{ end }} {{ end }}
</figure> </figure>

@ -2,15 +2,15 @@
{{ $breakpoints := .Get "breakpoints" }} {{ $breakpoints := .Get "breakpoints" }}
{{ $class := .Get "class" }} {{ $class := .Get "class" }}
{{ $densities := .Get "densities" }} {{ $densities := .Get "densities" }}
{{ $fetchpriority := .Get "fetchpriority" }}
{{ $height := .Get "height" }} {{ $height := .Get "height" }}
{{ $images := .Get 0 | default (.Get "images") }} {{ $images := .Get 0 | default (.Get "images") }}
{{ $justify := .Get "justify" | default "center" }} {{ $justify := .Get "justify" | default "center" }}
{{ $linked := .Get "linked" }} {{ $linked := .Get "linked" }}
{{ $loading := .Get "loading" }} {{ $loading := .Get "loading" }}
{{ $maxheight := .Get "maxheight" }} {{ $maxHeight := .Get "maxheight" }}
{{ $maxwidth := .Get "maxwidth" }} {{ $maxWidth := .Get "maxwidth" }}
{{ $page := .Page }} {{ $page := .Page }}
{{ $priority := .Get "fetchpriority" }}
{{ $process := .Get "process" }} {{ $process := .Get "process" }}
{{ $style := .Get "style" }} {{ $style := .Get "style" }}
{{ $type := .Get "type" | default "rows" }} {{ $type := .Get "type" | default "rows" }}
@ -53,12 +53,12 @@
"breakpoints" $breakpoints "breakpoints" $breakpoints
"class" (printf "img-fluid %s" $class) "class" (printf "img-fluid %s" $class)
"densities" $densities "densities" $densities
"fetchpriority" $fetchpriority "fetchpriority" $priority
"height" $height "height" $height
"linked" $linked "linked" $linked
"loading" $loading "loading" $loading
"maxheight" $maxheight "maxheight" $maxHeight
"maxwidth" $maxwidth "maxwidth" $maxWidth
"page" $page "page" $page
"process" $process "process" $process
"resource" . "resource" .
@ -79,12 +79,12 @@
"breakpoints" $breakpoints "breakpoints" $breakpoints
"class" (printf "img-fluid %s" $class) "class" (printf "img-fluid %s" $class)
"densities" $densities "densities" $densities
"fetchpriority" $fetchpriority "fetchpriority" $priority
"height" $height "height" $height
"linked" $linked "linked" $linked
"loading" $loading "loading" $loading
"maxheight" $maxheight "maxheight" $maxHeight
"maxwidth" $maxwidth "maxwidth" $maxWidth
"page" $page "page" $page
"process" $process "process" $process
"resource" . "resource" .

@ -2,13 +2,13 @@
{{ $breakpoints := .Get "breakpoints" }} {{ $breakpoints := .Get "breakpoints" }}
{{ $class := .Get "class" }} {{ $class := .Get "class" }}
{{ $densities := .Get "densities" }} {{ $densities := .Get "densities" }}
{{ $fetchpriority := .Get "fetchpriority" }}
{{ $height := .Get "height" }} {{ $height := .Get "height" }}
{{ $link := .Get "link" }} {{ $link := .Get "link" }}
{{ $linked := .Get "linked" }} {{ $linked := .Get "linked" }}
{{ $loading := .Get "loading" }} {{ $loading := .Get "loading" }}
{{ $maxheight := .Get "maxheight" }} {{ $maxHeight := .Get "maxheight" }}
{{ $maxwidth := .Get "maxwidth" }} {{ $maxWidth := .Get "maxwidth" }}
{{ $priority := .Get "fetchpriority" }}
{{ $process := .Get "process" }} {{ $process := .Get "process" }}
{{ $sizes := .Get "sizes" }} {{ $sizes := .Get "sizes" }}
{{ $src := .Get 0 | default (.Get "src") }} {{ $src := .Get 0 | default (.Get "src") }}
@ -23,13 +23,13 @@
"breakpoints" $breakpoints "breakpoints" $breakpoints
"class" (printf "img-fluid %s" $class) "class" (printf "img-fluid %s" $class)
"densities" $densities "densities" $densities
"fetchpriority" $fetchpriority "fetchpriority" $priority
"height" $height "height" $height
"link" $link "link" $link
"linked" $linked "linked" $linked
"loading" $loading "loading" $loading
"maxheight" $maxheight "maxheight" $maxHeight
"maxwidth" $maxwidth "maxwidth" $maxWidth
"page" .Page "page" .Page
"process" $process "process" $process
"sizes" $sizes "sizes" $sizes

@ -1,5 +1,5 @@
{{ $content := chomp .InnerDeindent | markdownify }} {{ $content := chomp .InnerDeindent | markdownify }}
{{ $tabcount := .Page.Scratch.Get "paige-tabs" | default 0 }} {{ $tabs := .Page.Scratch.Get "paige-tabs" | default 0 }}
{{ if not $content }} {{ if not $content }}
{{ errorf "layouts/shortcodes/paige/tab/button.html: no content" }} {{ errorf "layouts/shortcodes/paige/tab/button.html: no content" }}
@ -7,10 +7,10 @@
{{ .Page.Scratch.Add "paige-tabs-button" 1 }} {{ .Page.Scratch.Add "paige-tabs-button" 1 }}
{{ $buttoncount := .Page.Scratch.Get "paige-tabs-button" }} {{ $buttons := .Page.Scratch.Get "paige-tabs-button" }}
{{ $active := eq $buttoncount 1 }} {{ $active := eq $buttons 1 }}
<li class="nav-item" role="presentation"> <li class="nav-item" role="presentation">
<button aria-controls="paige-tabs-{{ $tabcount }}-pane-{{ $buttoncount }}" aria-selected="{{ $active }}" class="{{ if $active }} active {{ end }} nav-link" data-bs-target="#paige-tabs-{{ $tabcount }}-pane-{{ $buttoncount }}" data-bs-toggle="tab" id="paige-tabs-{{ $tabcount }}-button-{{ $buttoncount }}" role="tab" type="button">{{ $content }}</button> <button aria-controls="paige-tabs-{{ $tabs }}-pane-{{ $buttons }}" aria-selected="{{ $active }}" class="{{ if $active }} active {{ end }} nav-link" data-bs-target="#paige-tabs-{{ $tabs }}-pane-{{ $buttons }}" data-bs-toggle="tab" id="paige-tabs-{{ $tabs }}-button-{{ $buttons }}" role="tab" type="button">{{ $content }}</button>
</li> </li>

@ -1,5 +1,5 @@
{{ $content := chomp .InnerDeindent | markdownify }} {{ $content := chomp .InnerDeindent | markdownify }}
{{ $tabcount := .Page.Scratch.Get "paige-tabs" | default 0 }} {{ $tabs := .Page.Scratch.Get "paige-tabs" | default 0 }}
{{ if not $content }} {{ if not $content }}
{{ errorf "layouts/shortcodes/paige/tab/pane.html: no content" }} {{ errorf "layouts/shortcodes/paige/tab/pane.html: no content" }}
@ -7,8 +7,8 @@
{{ .Page.Scratch.Add "paige-tabs-pane" 1 }} {{ .Page.Scratch.Add "paige-tabs-pane" 1 }}
{{ $panecount := .Page.Scratch.Get "paige-tabs-pane" }} {{ $panes := .Page.Scratch.Get "paige-tabs-pane" }}
{{ $active := eq $panecount 1 }} {{ $active := eq $panes 1 }}
<div aria-labelledby="paige-tabs-{{ $tabcount }}-button-{{ $panecount }}" class="{{ if $active }} active {{ end }} fade {{ if $active }} show {{ end }} tab-pane" id="paige-tabs-{{ $tabcount }}-pane-{{ $panecount }}" role="tabpanel" tabindex="0">{{ $content }}</div> <div aria-labelledby="paige-tabs-{{ $tabs }}-button-{{ $panes }}" class="{{ if $active }} active {{ end }} fade {{ if $active }} show {{ end }} tab-pane" id="paige-tabs-{{ $tabs }}-pane-{{ $panes }}" role="tabpanel" tabindex="0">{{ $content }}</div>

@ -1,5 +1,5 @@
{{ $autopause := .Get "autopause" | default true }} {{ $autoPause := .Get "autopause" | default true }}
{{ $autoplay := .Get "autoplay" }} {{ $autoPlay := .Get "autoplay" }}
{{ $background := .Get "background" }} {{ $background := .Get "background" }}
{{ $byline := .Get "byline" }} {{ $byline := .Get "byline" }}
{{ $color := .Get "color" }} {{ $color := .Get "color" }}
@ -10,16 +10,16 @@
{{ $height := .Get "height" }} {{ $height := .Get "height" }}
{{ $keyboard := .Get "keyboard" | default true }} {{ $keyboard := .Get "keyboard" | default true }}
{{ $loop := .Get "loop" }} {{ $loop := .Get "loop" }}
{{ $maxheight := .Get "maxheight" }} {{ $maxHeight := .Get "maxheight" }}
{{ $maxwidth := .Get "maxwidth" }} {{ $maxWidth := .Get "maxwidth" }}
{{ $muted := .Get "muted" }} {{ $muted := .Get "muted" }}
{{ $pip := .Get "pip" }} {{ $pip := .Get "pip" }}
{{ $playsinline := .Get "playsinline" | default true }} {{ $playsInline := .Get "playsinline" | default true }}
{{ $policy := .Get "referrerpolicy" | default "no-referrer" }}
{{ $portrait := .Get "portrait" }} {{ $portrait := .Get "portrait" }}
{{ $quality := .Get "quality" }} {{ $quality := .Get "quality" }}
{{ $referrerpolicy := .Get "referrerpolicy" | default "no-referrer" }}
{{ $speed := .Get "speed" }} {{ $speed := .Get "speed" }}
{{ $texttrack := .Get "texttrack" }} {{ $textTrack := .Get "texttrack" }}
{{ $time := .Get "time" }} {{ $time := .Get "time" }}
{{ $title := .Get "title" }} {{ $title := .Get "title" }}
{{ $transparent := .Get "transparent" | default true }} {{ $transparent := .Get "transparent" | default true }}
@ -32,11 +32,11 @@
{{ $params := slice }} {{ $params := slice }}
{{ if not $autopause }} {{ if not $autoPause }}
{{ $params = $params | append "autopause=0" }} {{ $params = $params | append "autopause=0" }}
{{ end }} {{ end }}
{{ if $autoplay }} {{ if $autoPlay }}
{{ $params = $params | append "autoplay=1" }} {{ $params = $params | append "autoplay=1" }}
{{ end }} {{ end }}
@ -76,7 +76,7 @@
{{ $params = $params | append "pip=1" }} {{ $params = $params | append "pip=1" }}
{{ end }} {{ end }}
{{ if not $playsinline }} {{ if not $playsInline }}
{{ $params = $params | append "playsinline=0" }} {{ $params = $params | append "playsinline=0" }}
{{ end }} {{ end }}
@ -92,7 +92,7 @@
{{ $params = $params | append "speed=1" }} {{ $params = $params | append "speed=1" }}
{{ end }} {{ end }}
{{ with $texttrack }} {{ with $textTrack }}
{{ $params = $params | append (printf "texttrack=%v" .) }} {{ $params = $params | append (printf "texttrack=%v" .) }}
{{ end }} {{ end }}
@ -120,9 +120,9 @@
{{ partial "paige/video.html" (dict {{ partial "paige/video.html" (dict
"fullscreen" $fullscreen "fullscreen" $fullscreen
"height" $height "height" $height
"maxheight" $maxheight "maxheight" $maxHeight
"maxwidth" $maxwidth "maxwidth" $maxWidth
"referrerpolicy" $referrerpolicy "referrerpolicy" $policy
"src" $src "src" $src
"title" $description "title" $description
"width" $width "width" $width

@ -1,4 +1,4 @@
{{ $autoplay := .Get "autoplay" }} {{ $autoPlay := .Get "autoplay" }}
{{ $controls := .Get "controls" | default true }} {{ $controls := .Get "controls" | default true }}
{{ $description := .Get "description" | default "YouTube video" }} {{ $description := .Get "description" | default "YouTube video" }}
{{ $end := .Get "end" }} {{ $end := .Get "end" }}
@ -6,10 +6,10 @@
{{ $height := .Get "height" }} {{ $height := .Get "height" }}
{{ $list := .Get "list" }} {{ $list := .Get "list" }}
{{ $loop := .Get "loop" }} {{ $loop := .Get "loop" }}
{{ $maxheight := .Get "maxheight" }} {{ $maxHeight := .Get "maxheight" }}
{{ $maxwidth := .Get "maxwidth" }} {{ $maxWidth := .Get "maxwidth" }}
{{ $mute := .Get "mute" }} {{ $mute := .Get "mute" }}
{{ $referrerpolicy := .Get "referrerpolicy" | default "no-referrer-when-downgrade" }} {{ $policy := .Get "referrerpolicy" | default "no-referrer-when-downgrade" }}
{{ $start := .Get "start" }} {{ $start := .Get "start" }}
{{ $video := .Get 0 | default (.Get "video") | default "dQw4w9WgXcQ" }} {{ $video := .Get 0 | default (.Get "video") | default "dQw4w9WgXcQ" }}
{{ $width := .Get "width" }} {{ $width := .Get "width" }}
@ -30,7 +30,7 @@
{{ $params := slice (print "hl=" (site.LanguageCode | default site.Language.Lang)) "modestbranding=1" }} {{ $params := slice (print "hl=" (site.LanguageCode | default site.Language.Lang)) "modestbranding=1" }}
{{ if $autoplay }} {{ if $autoPlay }}
{{ $params = $params | append "autoplay=1" | append "mute=1" }} {{ $params = $params | append "autoplay=1" | append "mute=1" }}
{{ end }} {{ end }}
@ -74,9 +74,9 @@
{{ partial "paige/video.html" (dict {{ partial "paige/video.html" (dict
"fullscreen" $fullscreen "fullscreen" $fullscreen
"height" $height "height" $height
"maxheight" $maxheight "maxheight" $maxHeight
"maxwidth" $maxwidth "maxwidth" $maxWidth
"referrerpolicy" $referrerpolicy "referrerpolicy" $policy
"src" $src "src" $src
"title" $description "title" $description
"width" $width "width" $width

Loading…
Cancel
Save