Use config to hide values
parent
b17519532a
commit
ada7e4c8c1
@ -1,17 +0,0 @@
|
||||
#paige-authors,
|
||||
#paige-breadcrumbs,
|
||||
#paige-date,
|
||||
#paige-file,
|
||||
#paige-keywords,
|
||||
#paige-prev-next,
|
||||
#paige-reading-time,
|
||||
#paige-series,
|
||||
#paige-toc,
|
||||
.paige-authors,
|
||||
.paige-date,
|
||||
.paige-keywords,
|
||||
.paige-reading-time,
|
||||
.paige-series,
|
||||
.paige-summary {
|
||||
display: none;
|
||||
}
|
@ -1,101 +1,103 @@
|
||||
{{ $page := . }}
|
||||
|
||||
{{ $alert := $page.Param "paige.alert" }}
|
||||
{{ $authors := partial "paige/authors.html" $page }}
|
||||
{{ $alert := $page.Param "paige.alert" | and ($page.Param "paige.page.hide_alert" | not) }}
|
||||
{{ $authors := partial "paige/authors.html" $page | and ($page.Param "paige.page.hide_authors" | not) }}
|
||||
{{ $categories := $page.GetTerms "categories" }}
|
||||
{{ $date := and $page.IsPage $page.PublishDate }}
|
||||
{{ $date := and $page.IsPage $page.PublishDate | and ($page.Param "paige.page.hide_date" | not) }}
|
||||
{{ $dateformat := $page.Param "paige.date_format" | default ":date_long" }}
|
||||
{{ $description := $page.Description | markdownify }}
|
||||
{{ $description := $page.Description | markdownify | and ($page.Param "paige.page.hide_description" | not) }}
|
||||
{{ $first := templates.Exists "partials/paige/page-header-first.html" }}
|
||||
{{ $last := templates.Exists "partials/paige/page-header-last.html" }}
|
||||
{{ $link := $page.Params.link }}
|
||||
{{ $readingtime := $page.ReadingTime }}
|
||||
{{ $series := $page.GetTerms "series" }}
|
||||
{{ $table := and $page.Content (ne $page.TableOfContents `<nav id="TableOfContents"></nav>`) }}
|
||||
{{ $readingtime := $page.ReadingTime | and ($page.Param "paige.page.hide_reading_time" | not) }}
|
||||
{{ $series := $page.GetTerms "series" | and ($page.Param "paige.page.hide_series" | not) }}
|
||||
{{ $tags := $page.GetTerms "tags" }}
|
||||
{{ $textkeywords := eq ($page.Param "paige.keyword_style" | default "text") "text" }}
|
||||
{{ $title := $page.Title | markdownify }}
|
||||
|
||||
{{ $keywords := sort (append $categories $tags) "Title" }}
|
||||
|
||||
{{ if or $authors $date $description $first $keywords $last $readingtime $series $table $title }}
|
||||
<header class="align-items-center d-flex flex-column mw-100" id="paige-page-header">
|
||||
{{ if $first }}
|
||||
{{ partial "paige/page-header-first.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ with $title }}
|
||||
<h1 class="fw-bold text-center" id="paige-title">{{ if $link }}<a href="{{ $link }}">{{ . }}</a>{{ else }}{{ . }}{{ end }}</h1>
|
||||
{{ end }}
|
||||
|
||||
{{ with $description }}
|
||||
<p class="lead text-center" id="paige-description">{{ . }}</p>
|
||||
{{ end }}
|
||||
|
||||
{{ if or $authors $date $keywords $readingtime $series }}
|
||||
<div class="my-3">
|
||||
{{ with $keywords }}
|
||||
<p class="{{ if $textkeywords }} mb-0 {{ end }} text-center {{ if $textkeywords }} text-secondary {{ end }}" id="paige-keywords">
|
||||
{{ range $i, $term := . -}}
|
||||
{{- if $textkeywords -}}
|
||||
{{ $title := $page.Title | markdownify | and ($page.Param "paige.page.hide_title" | not) }}
|
||||
{{ $toc := and $page.Content (ne $page.TableOfContents `<nav id="TableOfContents"></nav>`) | and ($page.Param "paige.page.hide_toc" | not) }}
|
||||
|
||||
{{ $keywords := sort (append $categories $tags) "Title" | and ($page.Param "paige.page.hide_keywords" | not) }}
|
||||
|
||||
{{ if or $authors $date $description $first $keywords $last $readingtime $series $title $toc }}
|
||||
<header class="mw-100" id="paige-page-header">
|
||||
<div class="align-items-center d-flex flex-column">
|
||||
{{ if $first }}
|
||||
{{ partial "paige/page-header-first.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ with $title }}
|
||||
<h1 class="fw-bold" id="paige-page-title">{{ if $link }}<a href="{{ $link }}">{{ . }}</a>{{ else }}{{ . }}{{ end }}</h1>
|
||||
{{ end }}
|
||||
|
||||
{{ with $description }}
|
||||
<p class="lead paige-row-wide" id="paige-page-description">{{ . }}</p>
|
||||
{{ end }}
|
||||
|
||||
{{ if or $authors $date $keywords $readingtime $series }}
|
||||
<div id="paige-metadata">
|
||||
{{ with $keywords }}
|
||||
<p class="{{ if $textkeywords }} paige-row-narrow {{ end }} text-center {{ if $textkeywords }} text-secondary {{ end }}" id="paige-keywords">
|
||||
{{ range $i, $term := . -}}
|
||||
{{- if $textkeywords -}}
|
||||
{{- if gt $i 0 }} · {{ end -}}
|
||||
|
||||
<a class="link-secondary" href="{{ .RelPermalink | safeURL }}">{{ .Title }}</a>
|
||||
{{- else -}}
|
||||
{{- if gt $i 0 }} {{ end -}}
|
||||
|
||||
<a class="badge text-bg-secondary text-decoration-none" href="{{ .RelPermalink | safeURL }}">{{ .Title }}</a>
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
{{ with $series }}
|
||||
<p class="paige-row-narrow text-center text-secondary" id="paige-series">
|
||||
{{ range $i, $series := . -}}
|
||||
{{- if gt $i 0 }} · {{ end -}}
|
||||
|
||||
<a class="link-secondary" href="{{ .RelPermalink | safeURL }}">{{ .Title }}</a>
|
||||
{{- else -}}
|
||||
{{- if gt $i 0 }} {{ end -}}
|
||||
|
||||
<a class="badge paige-keyword text-bg-secondary text-decoration-none" href="{{ .RelPermalink | safeURL }}">{{ .Title }}</a>
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
{{ with $series }}
|
||||
<p class="mb-0 text-center text-secondary" id="paige-series">
|
||||
{{ range $i, $series := . -}}
|
||||
{{- if gt $i 0 }} · {{ end -}}
|
||||
|
||||
<a class="link-secondary" href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
{{- end }}
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
{{ with $authors }}
|
||||
<p class="mb-0 text-center text-secondary" id="paige-authors">
|
||||
{{ range $i, $author := . -}}
|
||||
{{- if gt $i 0 }} · {{ end -}}
|
||||
|
||||
<a class="link-secondary" href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
{{- end }}
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
{{ with $date }}
|
||||
<p class="mb-0 text-center text-secondary" id="paige-date">
|
||||
<time datetime="{{ .Format `2006-01-02` }}">{{ time.Format $dateformat . }}</time>
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
{{ with $readingtime }}
|
||||
<p class="mb-0 text-center text-secondary" id="paige-reading-time">{{ . }} {{ i18n "paige_minutes" . }}</p>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ with $alert }}
|
||||
<div class="alert alert-{{ .type }} my-3" id="paige-alert" role="alert">{{ .message | markdownify }}</div>
|
||||
{{ end }}
|
||||
|
||||
{{ if $table }}
|
||||
<div class="my-3" id="paige-toc">
|
||||
<div class="border mb-3 pe-3 ps-3 pt-3 rounded">
|
||||
{{ $page.TableOfContents }}
|
||||
<a class="link-secondary" href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
{{- end }}
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
{{ with $authors }}
|
||||
<p class="paige-row-narrow text-center text-secondary" id="paige-authors">
|
||||
{{ range $i, $author := . -}}
|
||||
{{- if gt $i 0 }} · {{ end -}}
|
||||
|
||||
<a class="link-secondary" href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
{{- end }}
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
{{ with $date }}
|
||||
<p class="paige-row-narrow text-center text-secondary" id="paige-date">
|
||||
<time datetime="{{ .Format `2006-01-02` }}">{{ time.Format $dateformat . }}</time>
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
{{ with $readingtime }}
|
||||
<p class="paige-row-narrow text-center text-secondary" id="paige-reading-time">{{ . }} {{ i18n "paige_minutes" . }}</p>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ with $alert }}
|
||||
<div class="alert alert-{{ .type }} paige-row-wide" id="paige-alert" role="alert">{{ .message | markdownify }}</div>
|
||||
{{ end }}
|
||||
|
||||
{{ if $toc }}
|
||||
<div class="paige-row-wide" id="paige-toc">
|
||||
<div class="border pe-3 ps-3 pt-3 rounded">
|
||||
{{ $page.TableOfContents }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $last }}
|
||||
{{ partial "paige/page-header-last.html" . }}
|
||||
{{ end }}
|
||||
{{ if $last }}
|
||||
{{ partial "paige/page-header-last.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</header>
|
||||
{{ end }}
|
||||
|
@ -1 +1 @@
|
||||
<body class="d-flex flex-column">
|
||||
<body>
|
||||
|
Loading…
Reference in New Issue