Remove most class and style params
This commit is contained in:
@@ -3,4 +3,4 @@
|
||||
{{ $href := .href }}
|
||||
{{ $style := .style }}
|
||||
|
||||
<a {{ with $class }} {{ . }} {{ end }} {{ with $href }} href="{{ . }}" {{ end }} {{ with $style }} {{ . | safeCSS }} {{ end }}>{{ $content }}</a>
|
||||
<a {{ with $class }} class="{{ . }}" {{ end }} {{ with $href }} href="{{ . }}" {{ end }} {{ with $style }} style="{{ . | safeCSS }}" {{ end }}>{{ $content }}</a>
|
||||
|
@@ -1,15 +1,9 @@
|
||||
{{ $caption := .caption | markdownify }}
|
||||
{{ $captionclass := .captionclass | default "figure-caption" }}
|
||||
{{ $captionstyle := .captionstyle }}
|
||||
{{ $class := .class | default "align-items-center d-flex flex-column justify-content-center paige-figure" }}
|
||||
{{ $content := .content | markdownify }}
|
||||
{{ $contentclass := .contentclass }}
|
||||
{{ $contentstyle := .contentstyle }}
|
||||
{{ $style := .style }}
|
||||
|
||||
<figure {{ with $class }} class="{{ . }}" {{ end }} {{ with $style }} style="{{ . | safeCSS }}" {{ end }}>
|
||||
<div {{ with $contentclass }} class="{{ . }}" {{ end }} {{ with $contentstyle }} style="{{ . | safeCSS }}" {{ end }}>{{ $content }}</div>
|
||||
<figure class="align-items-center d-flex flex-column justify-content-center paige-figure">
|
||||
<div {{ if $caption }} class="mb-2" {{ end }}>{{ $content }}</div>
|
||||
{{ with $caption }}
|
||||
<figcaption {{ with $captionclass }} class="{{ . }}" {{ end }} {{ with $captionstyle }} style="{{ . | safeCSS }}" {{ end }}>{{ . }}</figcaption>
|
||||
<figcaption class="figure-caption">{{ . }}</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
|
@@ -1,37 +1,30 @@
|
||||
{{ $alt := .alt }}
|
||||
{{ $caption := .caption }}
|
||||
{{ $captionclass := .captionclass }}
|
||||
{{ $captionstyle := .captionstyle }}
|
||||
{{ $class := .class }}
|
||||
{{ $contentclass := .contentclass }}
|
||||
{{ $contentstyle := .contentstyle }}
|
||||
{{ $height := .height }}
|
||||
{{ $imageclass := .imageclass | default "img-fluid" }}
|
||||
{{ $imagestyle := .imagestyle }}
|
||||
{{ $link := .link }}
|
||||
{{ $method := .method }}
|
||||
{{ $options := .options }}
|
||||
{{ $page := .page }}
|
||||
{{ $resource := .resource }}
|
||||
{{ $src := .src }}
|
||||
{{ $style := .style }}
|
||||
{{ $table := .table }}
|
||||
{{ $title := .title }}
|
||||
{{ $width := .width }}
|
||||
|
||||
{{ if and (not $contentclass) $caption }}
|
||||
{{ $contentclass = "figure-img" }}
|
||||
{{ $class := "img-fluid" }}
|
||||
{{ if $caption }}
|
||||
{{ $class = "figure-img img-fluid" }}
|
||||
{{ end }}
|
||||
|
||||
{{ $content := partial "paige/img.html" (dict
|
||||
"alt" $alt
|
||||
"class" $imageclass
|
||||
"class" $class
|
||||
"height" $height
|
||||
"method" $method
|
||||
"options" $options
|
||||
"page" $page
|
||||
"resource" $resource
|
||||
"src" $src
|
||||
"style" $imagestyle
|
||||
"title" $title
|
||||
"width" $width
|
||||
) }}
|
||||
@@ -43,13 +36,9 @@
|
||||
) }}
|
||||
{{ end }}
|
||||
|
||||
{{ partial "paige/figure.html" (dict
|
||||
"caption" $caption
|
||||
"captionclass" $captionclass
|
||||
"captionstyle" $captionstyle
|
||||
"class" $class
|
||||
"content" $content
|
||||
"contentclass" $contentclass
|
||||
"contentstyle" $contentstyle
|
||||
"style" $style
|
||||
) }}
|
||||
<figure class="{{ if $table }} d-table mb-0 {{ end }} paige-figure text-center">
|
||||
{{ $content }}
|
||||
{{ with $caption }}
|
||||
<figcaption class="figure-caption" {{ if $table }} style="caption-side: bottom; display: table-caption" {{ end }}>{{ . }}</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
|
@@ -1,26 +1,10 @@
|
||||
{{ $caption := .Get "caption" }}
|
||||
{{ $captionclass := .Get "captionclass" }}
|
||||
{{ $captionstyle := .Get "captionstyle" }}
|
||||
{{ $class := .Get "class" }}
|
||||
{{ $contentclass := .Get "contentclass" | default "mb-2" }}
|
||||
{{ $contentstyle := .Get "contentstyle" }}
|
||||
{{ $lang := .Get 0 | default (.Get "lang") | default "plaintext" }}
|
||||
{{ $options := .Get "options" }}
|
||||
{{ $style := .Get "style" }}
|
||||
|
||||
{{ if $caption }}
|
||||
{{ $contentclass = $contentclass | default "mb-2" }}
|
||||
{{ end }}
|
||||
|
||||
{{ $content := highlight (.Inner | replaceRE "^\n" "") $lang $options }}
|
||||
|
||||
{{ partial "paige/figure.html" (dict
|
||||
"caption" $caption
|
||||
"captionclass" $captionclass
|
||||
"captionstyle" $captionstyle
|
||||
"class" $class
|
||||
"content" $content
|
||||
"contentclass" $contentclass
|
||||
"contentstyle" $contentstyle
|
||||
"style" $style
|
||||
) }}
|
||||
|
@@ -1,24 +1,8 @@
|
||||
{{ $caption := .Get 0 | default (.Get "caption") }}
|
||||
{{ $captionclass := .Get "captionclass" }}
|
||||
{{ $captionstyle := .Get "captionstyle" }}
|
||||
{{ $class := .Get "class" }}
|
||||
{{ $contentclass := .Get "contentclass" }}
|
||||
{{ $contentstyle := .Get "contentstyle" }}
|
||||
{{ $style := .Get "style" }}
|
||||
|
||||
{{ if $caption }}
|
||||
{{ $contentclass = $contentclass | default "mb-2" }}
|
||||
{{ end }}
|
||||
|
||||
{{ $content := .Inner }}
|
||||
|
||||
{{ partial "paige/figure.html" (dict
|
||||
"caption" $caption
|
||||
"captionclass" $captionclass
|
||||
"captionstyle" $captionstyle
|
||||
"class" $class
|
||||
"content" $content
|
||||
"contentclass" $contentclass
|
||||
"contentstyle" $contentstyle
|
||||
"style" $style
|
||||
) }}
|
||||
|
@@ -1,25 +1,15 @@
|
||||
{{ $align := .Get "align" | default "center" }}
|
||||
{{ $caption := .Get "caption" }}
|
||||
{{ $captionclass := .Get "captionclass" }}
|
||||
{{ $captionstyle := .Get "captionstyle" }}
|
||||
{{ $class := .Get "class" }}
|
||||
{{ $contentclass := .Get "contentclass" }}
|
||||
{{ $contentstyle := .Get "contentstyle" }}
|
||||
{{ $height := .Get "height" }}
|
||||
{{ $image := .Get "image" }}
|
||||
{{ $imageclass := .Get "imageclass" }}
|
||||
{{ $images := .Get 0 | default (.Get "images") }}
|
||||
{{ $imagestyle := .Get "imagestyle" }}
|
||||
{{ $innercaptionclass := .Get "innercaptionclass" }}
|
||||
{{ $innercaptionstyle := .Get "innercaptionstyle" }}
|
||||
{{ $innerclass := .Get "innerclass" | default "d-table mb-0" }}
|
||||
{{ $innerstyle := .Get "innerstyle" }}
|
||||
{{ $justify := .Get "justify" | default "center" }}
|
||||
{{ $method := .Get "method" | default "resize" }}
|
||||
{{ $options := .Get "options" | default "550x webp picture Lanczos" }}
|
||||
{{ $style := .Get "style" }}
|
||||
{{ $type := .Get "type" | default "rows" }}
|
||||
{{ $width := .Get "width" }}
|
||||
|
||||
{{ if $image }}
|
||||
{{ $captionclass = $captionclass | default "figure-caption text-center" }}
|
||||
{{ $captionstyle = $captionstyle | default "caption-side: bottom; display: table-caption" }}
|
||||
{{ $resource := partial "paige/func-resource.html" (dict
|
||||
"page" .Page
|
||||
"url" $image
|
||||
@@ -27,20 +17,13 @@
|
||||
|
||||
{{ partial "paige/image-figure.html" (dict
|
||||
"caption" $caption
|
||||
"captionclass" $captionclass
|
||||
"captionstyle" $captionstyle
|
||||
"class" $innerclass
|
||||
"contentclass" $contentclass
|
||||
"contentstyle" $contentstyle
|
||||
"imageclass" $imageclass
|
||||
"imagestyle" $imagestyle
|
||||
"link" $resource.RelPermalink
|
||||
"method" $method
|
||||
"options" $options
|
||||
"page" .Page
|
||||
"resource" $resource
|
||||
"src" $image
|
||||
"style" $innerstyle
|
||||
"table" true
|
||||
) }}
|
||||
{{ else }}
|
||||
{{ $inner := chomp .Inner }}
|
||||
@@ -63,49 +46,35 @@
|
||||
<figure>
|
||||
{{ if eq $type "grid" }}
|
||||
<div class="container-fluid{{ if $caption }} figure-img{{ end }} px-0">
|
||||
<div class="align-items-center gx-3 gy-3 justify-content-center row row-cols-1 row-cols-sm-2 row-cols-md-3 row-cols-lg-4 row-cols-xl-5 row-cols-xxl-6">
|
||||
<div class="align-items-{{ $align }} gx-3 gy-3 justify-content-{{ $justify }} row row-cols-1 row-cols-sm-2 row-cols-md-3 row-cols-lg-4 row-cols-xl-5 row-cols-xxl-6">
|
||||
{{ with $inner }}
|
||||
{{ . }}
|
||||
{{ else }}
|
||||
{{ range $resources }}
|
||||
{{ partial "paige/image-figure.html" (dict
|
||||
"captionclass" $captionclass
|
||||
"captionstyle" $captionstyle
|
||||
"class" $innerclass
|
||||
"contentclass" $contentclass
|
||||
"contentstyle" $contentstyle
|
||||
"imageclass" $imageclass
|
||||
"imagestyle" $imagestyle
|
||||
"link" .RelPermalink
|
||||
"method" $method
|
||||
"options" $options
|
||||
"resource" .
|
||||
"style" $innerstyle
|
||||
"table" true
|
||||
) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ else if eq $type "rows" }}
|
||||
{{ $imagestyle = $imagestyle | default "max-height: 10rem" }}
|
||||
<div class="align-items-center column-gap-3 d-flex{{ with $caption }} figure-img{{ end }} flex-wrap justify-content-center row-gap-3">
|
||||
<div class="align-items-{{ $align }} column-gap-3 d-flex{{ with $caption }} figure-img{{ end }} flex-wrap justify-content-{{ $justify }} row-gap-3">
|
||||
{{ with $inner }}
|
||||
{{ . }}
|
||||
{{ else }}
|
||||
{{ range $resources }}
|
||||
{{ partial "paige/image-figure.html" (dict
|
||||
"captionclass" $captionclass
|
||||
"captionstyle" $captionstyle
|
||||
"class" $innerclass
|
||||
"contentclass" $contentclass
|
||||
"contentstyle" $contentstyle
|
||||
"imageclass" $imageclass
|
||||
"imagestyle" $imagestyle
|
||||
"height" "10rem"
|
||||
"link" .RelPermalink
|
||||
"method" $method
|
||||
"options" $options
|
||||
"resource" .
|
||||
"style" $innerstyle
|
||||
"table" true
|
||||
) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
@@ -1,39 +1,21 @@
|
||||
{{ $alt := .Get "alt" }}
|
||||
{{ $caption := .Get "caption" }}
|
||||
{{ $captionclass := .Get "captionclass" }}
|
||||
{{ $captionstyle := .Get "captionstyle" }}
|
||||
{{ $class := .Get "class" }}
|
||||
{{ $contentclass := .Get "contentclass" }}
|
||||
{{ $contentstyle := .Get "contentstyle" }}
|
||||
{{ $height := .Get "height" }}
|
||||
{{ $imageclass := .Get "imageclass" }}
|
||||
{{ $imagestyle := .Get "imagestyle" }}
|
||||
{{ $link := .Get "link" }}
|
||||
{{ $method := .Get "method" }}
|
||||
{{ $options := .Get "options" }}
|
||||
{{ $src := .Get 0 | default (.Get "src") }}
|
||||
{{ $style := .Get "style" }}
|
||||
{{ $title := .Get "title" }}
|
||||
{{ $width := .Get "width" }}
|
||||
|
||||
{{ partial "paige/image-figure.html" (dict
|
||||
"caption" $caption
|
||||
"captionclass" $captionclass
|
||||
"captionstyle" $captionstyle
|
||||
"class" $class
|
||||
"contentclass" $contentclass
|
||||
"contentstyle" $contentstyle
|
||||
"style" $style
|
||||
|
||||
"alt" $alt
|
||||
"caption" $caption
|
||||
"height" $height
|
||||
"imageclass" $imageclass
|
||||
"imagestyle" $imagestyle
|
||||
"link" $link
|
||||
"method" $method
|
||||
"options" $options
|
||||
"src" $src
|
||||
"title" $title
|
||||
"width" $width
|
||||
|
||||
"link" $link
|
||||
) }}
|
||||
|
Reference in New Issue
Block a user