Rename listshowcontent to fullpages
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
{{ $params := . }}
|
||||
|
||||
{{ $fullpages := false }}
|
||||
{{ $page := . }}
|
||||
{{ $listshowcontent := false }}
|
||||
|
||||
{{ if reflect.IsMap $params }}
|
||||
{{ $fullpages = $params.fullpages }}
|
||||
{{ $page = $params.page }}
|
||||
{{ $listshowcontent = $params.listshowcontent }}
|
||||
{{ else }}
|
||||
{{ $params = dict "listshowcontent" $listshowcontent "page" $page }}
|
||||
{{ $params = dict "fullpages" $fullpages "page" $page }}
|
||||
{{ end }}
|
||||
|
||||
{{ $class := slice "paige-article" }}
|
||||
|
@@ -1,18 +1,18 @@
|
||||
{{ $params := . }}
|
||||
|
||||
{{ $fullpages := false }}
|
||||
{{ $page := . }}
|
||||
{{ $listshowcontent := false }}
|
||||
|
||||
{{ if reflect.IsMap $params }}
|
||||
{{ $fullpages = $params.fullpages }}
|
||||
{{ $page = $params.page }}
|
||||
{{ $listshowcontent = $params.listshowcontent }}
|
||||
{{ end }}
|
||||
|
||||
{{ $class := $page.Param "paige.content.class" | default "mw-100 paige-content" }}
|
||||
{{ $content := "" }}
|
||||
|
||||
{{ if $page.Param "paige.content.hide" | not }}
|
||||
{{ $content = cond ($listshowcontent | not) ($page.Content | replaceRE `(<h[1-6] id="([^"]+)".+)(</h[1-6]+>)` (printf `${1}<a aria-label="%v" class="paige-header-link" href="#${2}">#</a>${3}` (i18n "paige_aria_section_link")) | safeHTML) $page.Content }}
|
||||
{{ $content = cond ($fullpages | not) ($page.Content | replaceRE `(<h[1-6] id="([^"]+)".+)(</h[1-6]+>)` (printf `${1}<a aria-label="%v" class="paige-header-link" href="#${2}">#</a>${3}` (i18n "paige_aria_section_link")) | safeHTML) $page.Content }}
|
||||
{{ end }}
|
||||
|
||||
{{ with $content }}
|
||||
|
@@ -1,11 +1,11 @@
|
||||
{{ $params := . }}
|
||||
|
||||
{{ $fullpages := false }}
|
||||
{{ $page := . }}
|
||||
{{ $listshowcontent := false }}
|
||||
|
||||
{{ if reflect.IsMap $params }}
|
||||
{{ $fullpages = $params.fullpages }}
|
||||
{{ $page = $params.page }}
|
||||
{{ $listshowcontent = $params.listshowcontent }}
|
||||
{{ end }}
|
||||
|
||||
{{ $authors := partial "paige/authors.html" $page }}
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
<section class="paige-metadata w-100">
|
||||
{{ with $title }}
|
||||
<h1 class="display-5 fw-bold paige-title text-center">{{ with $titlelink }}<a href="{{ . }}">{{ . }}</a>{{ else }}{{ . }}{{ end }}{{ if $listshowcontent }}<a aria-label="{{ i18n `paige_aria_page_link` }}" class="paige-header-link" href="{{ $titlepage }}">#</a>{{ end }}</h1>
|
||||
<h1 class="display-5 fw-bold paige-title text-center">{{ with $titlelink }}<a href="{{ . }}">{{ . }}</a>{{ else }}{{ . }}{{ end }}{{ if $fullpages }}<a aria-label="{{ i18n `paige_aria_page_link` }}" class="paige-header-link" href="{{ $titlepage }}">#</a>{{ end }}</h1>
|
||||
{{ end }}
|
||||
|
||||
{{ with $description }}
|
||||
|
@@ -5,7 +5,7 @@
|
||||
{{ $p := $page.Paginate $page.Pages }}
|
||||
<section id="paige-pages">
|
||||
{{ range $p.Pages }}
|
||||
{{ partial "paige/article.html" (dict "listshowcontent" true "page" .) }}
|
||||
{{ partial "paige/article.html" (dict "fullpages" true "page" .) }}
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ if or $p.HasPrev $p.HasNext }}
|
||||
|
@@ -1,14 +1,14 @@
|
||||
{{ $params := . }}
|
||||
|
||||
{{ $fullpages := false }}
|
||||
{{ $page := . }}
|
||||
{{ $listshowcontent := false }}
|
||||
|
||||
{{ if reflect.IsMap $params }}
|
||||
{{ $fullpages = $params.fullpages }}
|
||||
{{ $page = $params.page }}
|
||||
{{ $listshowcontent = $params.listshowcontent }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and $page.Content (not $listshowcontent) (ne $page.TableOfContents `<nav id="TableOfContents"></nav>`) }}
|
||||
{{ if and $page.Content (not $fullpages) (ne $page.TableOfContents `<nav id="TableOfContents"></nav>`) }}
|
||||
<section class="paige-toc">
|
||||
<div class="border mb-3 pe-3 ps-3 pt-3 rounded">
|
||||
{{ $page.TableOfContents }}
|
||||
|
Reference in New Issue
Block a user