Remove useless div

master
Will Faught 4 months ago
parent 9f4f3eee62
commit 70825a706a

@ -21,109 +21,107 @@
{{ $keywords := sort (append $categories $tags) "LinkTitle" | and ($page.Param "paige.pages.disable_keywords" | not) }} {{ $keywords := sort (append $categories $tags) "LinkTitle" | and ($page.Param "paige.pages.disable_keywords" | not) }}
{{ if or $alert $authors $date $description $first $keywords $last $time $series $title $toc $words }} {{ if or $alert $authors $date $description $first $keywords $last $time $series $title $toc $words }}
<header class="mw-100" id="paige-page-header"> <header class="align-items-center d-flex flex-column mw-100" id="paige-page-header">
<div class="align-items-center d-flex flex-column"> {{ partial "paige/func-include.html" (dict "name" "page-header-first%s.html" "page" $page) | safeHTML }}
{{ partial "paige/func-include.html" (dict "name" "page-header-first%s.html" "page" $page) | safeHTML }}
{{ with $title }}
{{ with $title }} <h1 class="fw-bold text-center" id="paige-page-title" {{ if $microdata }} itemprop="headline name" {{ end }}>{{ if $link }}<a href="{{ $link }}">{{ . }}</a>{{ else }}{{ . }}{{ end }}</h1>
<h1 class="fw-bold text-center" id="paige-page-title" {{ if $microdata }} itemprop="headline name" {{ end }}>{{ if $link }}<a href="{{ $link }}">{{ . }}</a>{{ else }}{{ . }}{{ end }}</h1> {{ end }}
{{ end }}
{{ with $description }}
{{ with $description }} <p class="lead paige-row-tall text-center" id="paige-page-description" {{ if $microdata }} itemprop="alternativeHeadline description" {{ end }}>{{ . }}</p>
<p class="lead paige-row-tall text-center" id="paige-page-description" {{ if $microdata }} itemprop="alternativeHeadline description" {{ end }}>{{ . }}</p> {{ end }}
{{ end }}
{{ if or $authors $date $keywords $time $series }}
{{ if or $authors $date $keywords $time $series }} <div id="paige-page-metadata">
<div id="paige-page-metadata"> {{ with $keywords }}
{{ with $keywords }} <p class="{{ if $normal }} paige-row-short {{ end }} text-center {{ if $normal }} text-secondary {{ end }}" id="paige-page-keywords">
<p class="{{ if $normal }} paige-row-short {{ end }} text-center {{ if $normal }} text-secondary {{ end }}" id="paige-page-keywords"> {{ range $i, $term := . }}
{{ range $i, $term := . }} {{ $kind := false }}
{{ $kind := false }}
{{ if in $categories $term }}
{{ if in $categories $term }} {{ $kind = "category" }}
{{ $kind = "category" }} {{ else }}
{{ else }} {{ $kind = "tag" }}
{{ $kind = "tag" }}
{{ end }}
{{ if $normal }}
{{ if gt $i 0 }} · {{ end }}
{{ if .RelPermalink }}
<a class="link-secondary paige-page-keyword-{{ $kind }}" href="{{ .RelPermalink }}" {{ if $microdata }} itemprop="keywords" {{ end }}>{{ .LinkTitle }}</a>
{{ else }}
<span class="text-secondary paige-page-keyword-{{ $kind }}" {{ if $microdata }} itemprop="keywords" {{ end }}>{{ .LinkTitle }}</span>
{{ end }}
{{ else }}
{{ if gt $i 0 }} {{ end }}
{{ if .RelPermalink }}
<a class="badge paige-page-keyword-{{ $kind }} text-bg-secondary text-decoration-none" href="{{ .RelPermalink }}" {{ if $microdata }} itemprop="keywords" {{ end }}>{{ .LinkTitle }}</a>
{{ else }}
<span class="badge paige-page-keyword-{{ $kind }} text-bg-secondary" {{ if $microdata }} itemprop="keywords" {{ end }}>{{ .LinkTitle }}</span>
{{ end }}
{{ end }}
{{ end }} {{ end }}
</p>
{{ end }}
{{ with $series }} {{ if $normal }}
<p class="paige-row-short text-center text-secondary" id="paige-page-series">
{{ range $i, $series := . }}
{{ if gt $i 0 }} · {{ end }} {{ if gt $i 0 }} · {{ end }}
{{ if .RelPermalink }} {{ if .RelPermalink }}
<a class="link-secondary" href="{{ .RelPermalink }}" {{ if $microdata }} itemprop="isPartOf" {{ end }}>{{ .LinkTitle }}</a> <a class="link-secondary paige-page-keyword-{{ $kind }}" href="{{ .RelPermalink }}" {{ if $microdata }} itemprop="keywords" {{ end }}>{{ .LinkTitle }}</a>
{{ else }} {{ else }}
<span class="text-secondary" {{ if $microdata }} itemprop="isPartOf" {{ end }}>{{ .LinkTitle }}</span> <span class="text-secondary paige-page-keyword-{{ $kind }}" {{ if $microdata }} itemprop="keywords" {{ end }}>{{ .LinkTitle }}</span>
{{ end }} {{ end }}
{{ end }} {{ else }}
</p> {{ if gt $i 0 }} {{ end }}
{{ end }}
{{ with $authors }}
<p class="paige-row-short text-center text-secondary" id="paige-page-authors">
{{ range $i, $author := . }}
{{ if gt $i 0 }} · {{ end }}
{{ if .RelPermalink }} {{ if .RelPermalink }}
<a class="link-secondary" href="{{ .RelPermalink }}" {{ if $microdata }} itemprop="author" {{ end }}>{{ .LinkTitle }}</a> <a class="badge paige-page-keyword-{{ $kind }} text-bg-secondary text-decoration-none" href="{{ .RelPermalink }}" {{ if $microdata }} itemprop="keywords" {{ end }}>{{ .LinkTitle }}</a>
{{ else }} {{ else }}
<span class="text-secondary" {{ if $microdata }} itemprop="author" {{ end }}>{{ .LinkTitle }}</span> <span class="badge paige-page-keyword-{{ $kind }} text-bg-secondary" {{ if $microdata }} itemprop="keywords" {{ end }}>{{ .LinkTitle }}</span>
{{ end }} {{ end }}
{{ end }} {{ end }}
</p> {{ end }}
{{ end }} </p>
{{ end }}
{{ with $date }}
<p class="paige-row-short text-center text-secondary" id="paige-page-date"> {{ with $series }}
<time datetime="{{ .Format `2006-01-02` }}" {{ if $microdata }} itemprop="datePublished" {{ end }}>{{ time.Format $format . }}</time> <p class="paige-row-short text-center text-secondary" id="paige-page-series">
</p> {{ range $i, $series := . }}
{{ end }} {{ if gt $i 0 }} · {{ end }}
{{ with $words }} {{ if .RelPermalink }}
<p class="paige-row-short text-center text-secondary" id="paige-page-word-count" {{ if $microdata }} itemprop="wordCount" {{ end }}>{{ . }} {{ i18n "paige_words" . }}</p> <a class="link-secondary" href="{{ .RelPermalink }}" {{ if $microdata }} itemprop="isPartOf" {{ end }}>{{ .LinkTitle }}</a>
{{ end }} {{ else }}
<span class="text-secondary" {{ if $microdata }} itemprop="isPartOf" {{ end }}>{{ .LinkTitle }}</span>
{{ with $time }} {{ end }}
<p class="paige-row-short text-center text-secondary" id="paige-page-reading-time" {{ if $microdata }} itemprop="timeRequired" {{ end }}>{{ . }} {{ i18n "paige_minutes" . }}</p> {{ end }}
{{ end }} </p>
</div> {{ end }}
{{ end }}
{{ with $authors }}
{{ with $alert }} <p class="paige-row-short text-center text-secondary" id="paige-page-authors">
<div class="alert alert-{{ .type }} paige-row-tall" id="paige-page-alert" role="alert">{{ .message | markdownify }}</div> {{ range $i, $author := . }}
{{ end }} {{ if gt $i 0 }} · {{ end }}
{{ if $toc }} {{ if .RelPermalink }}
<div class="paige-row-tall" id="paige-page-toc"> <a class="link-secondary" href="{{ .RelPermalink }}" {{ if $microdata }} itemprop="author" {{ end }}>{{ .LinkTitle }}</a>
<div class="border pe-3 ps-3 pt-3 rounded"> {{ else }}
{{ $page.TableOfContents }} <span class="text-secondary" {{ if $microdata }} itemprop="author" {{ end }}>{{ .LinkTitle }}</span>
</div> {{ end }}
{{ end }}
</p>
{{ end }}
{{ with $date }}
<p class="paige-row-short text-center text-secondary" id="paige-page-date">
<time datetime="{{ .Format `2006-01-02` }}" {{ if $microdata }} itemprop="datePublished" {{ end }}>{{ time.Format $format . }}</time>
</p>
{{ end }}
{{ with $words }}
<p class="paige-row-short text-center text-secondary" id="paige-page-word-count" {{ if $microdata }} itemprop="wordCount" {{ end }}>{{ . }} {{ i18n "paige_words" . }}</p>
{{ end }}
{{ with $time }}
<p class="paige-row-short text-center text-secondary" id="paige-page-reading-time" {{ if $microdata }} itemprop="timeRequired" {{ end }}>{{ . }} {{ i18n "paige_minutes" . }}</p>
{{ end }}
</div>
{{ end }}
{{ with $alert }}
<div class="alert alert-{{ .type }} paige-row-tall" id="paige-page-alert" role="alert">{{ .message | markdownify }}</div>
{{ end }}
{{ if $toc }}
<div class="paige-row-tall" id="paige-page-toc">
<div class="border pe-3 ps-3 pt-3 rounded">
{{ $page.TableOfContents }}
</div> </div>
{{ end }} </div>
{{ end }}
{{ partial "paige/func-include.html" (dict "name" "page-header-last%s.html" "page" $page) | safeHTML }} {{ partial "paige/func-include.html" (dict "name" "page-header-last%s.html" "page" $page) | safeHTML }}
</div>
</header> </header>
{{ end }} {{ end }}

Loading…
Cancel
Save