mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
theme: replace output-partial by Hugo mechanisms #891
This commit is contained in:
parent
a467f6f087
commit
e95d057776
65 changed files with 222 additions and 345 deletions
|
@ -1,6 +1,6 @@
|
||||||
+++
|
+++
|
||||||
archetype = "chapter"
|
|
||||||
title = "{{ replace .Name "-" " " | title }}"
|
title = "{{ replace .Name "-" " " | title }}"
|
||||||
|
type = "chapter"
|
||||||
weight = 1
|
weight = 1
|
||||||
+++
|
+++
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
+++
|
+++
|
||||||
archetype = "home"
|
|
||||||
title = "{{ replace .Name "-" " " | title }}"
|
title = "{{ replace .Name "-" " " | title }}"
|
||||||
|
type = "home"
|
||||||
+++
|
+++
|
||||||
|
|
||||||
This is a new home page.
|
This is a new home page.
|
||||||
|
|
|
@ -137,7 +137,7 @@ h1 + .footline{
|
||||||
#R-body .topbar-sidebar-divider {
|
#R-body .topbar-sidebar-divider {
|
||||||
border-width: 0;
|
border-width: 0;
|
||||||
}
|
}
|
||||||
.term-list {
|
article .R-taxonomy {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
mark.search {
|
mark.search {
|
||||||
|
|
|
@ -404,21 +404,21 @@ pre:not(.mermaid) .copy-to-clipboard-button:hover {
|
||||||
--VARIABLE-BOX-TEXT-color: var(--VARIABLE-BOX-CAPTION-color);
|
--VARIABLE-BOX-TEXT-color: var(--VARIABLE-BOX-CAPTION-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
#R-body .tags {
|
article .R-taxonomy.tags {
|
||||||
--VARIABLE-TAGS-color: var(--INTERNAL-MAIN-BG-color);
|
--VARIABLE-TAGS-color: var(--INTERNAL-MAIN-BG-color);
|
||||||
--VARIABLE-TAGS-BG-color: var(--VARIABLE-BOX-color);
|
--VARIABLE-TAGS-BG-color: var(--VARIABLE-BOX-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
#R-body .tags a.term-link {
|
article .R-taxonomy.tags a.term-link {
|
||||||
background-color: var(--VARIABLE-TAGS-BG-color);
|
background-color: var(--VARIABLE-TAGS-BG-color);
|
||||||
color: var(--VARIABLE-TAGS-color);
|
color: var(--VARIABLE-TAGS-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
#R-body .tags a.term-link:before {
|
article .R-taxonomy.tags a.term-link:before {
|
||||||
border-right-color: var(--VARIABLE-TAGS-BG-color);
|
border-right-color: var(--VARIABLE-TAGS-BG-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
#R-body .tags a.term-link:after {
|
article .R-taxonomy.tags a.term-link:after {
|
||||||
background-color: var(--VARIABLE-TAGS-color);
|
background-color: var(--VARIABLE-TAGS-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
+++
|
+++
|
||||||
archetype = "home"
|
|
||||||
description = "A theme for Hugo designed for documentation."
|
description = "A theme for Hugo designed for documentation."
|
||||||
title = "Hugo Relearn Theme"
|
title = "Hugo Relearn Theme"
|
||||||
|
type = "home"
|
||||||
+++
|
+++
|
||||||
{{% replaceRE "https://mcshelby.github.io/hugo-theme-relearn/" "" %}}
|
{{% replaceRE "https://mcshelby.github.io/hugo-theme-relearn/" "" %}}
|
||||||
{{< include "README.md" "true" >}}
|
{{< include "README.md" "true" >}}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
+++
|
+++
|
||||||
archetype = "home"
|
|
||||||
description = "A theme fer Cap'n Hugo designed fer documentat'n."
|
description = "A theme fer Cap'n Hugo designed fer documentat'n."
|
||||||
title = "Cap'n Hugo Relearrrn Theme"
|
title = "Cap'n Hugo Relearrrn Theme"
|
||||||
|
type = "home"
|
||||||
+++
|
+++
|
||||||
{{< piratify true >}}
|
{{< piratify true >}}
|
|
@ -1,6 +1,6 @@
|
||||||
+++
|
+++
|
||||||
archetype = "chapter"
|
|
||||||
title = "Basics"
|
title = "Basics"
|
||||||
|
type = "chapter"
|
||||||
weight = 1
|
weight = 1
|
||||||
+++
|
+++
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
+++
|
+++
|
||||||
archetype = "chapter"
|
|
||||||
title = "Basics"
|
title = "Basics"
|
||||||
|
type = "chapter"
|
||||||
weight = 1
|
weight = 1
|
||||||
+++
|
+++
|
||||||
{{< piratify >}}
|
{{< piratify >}}
|
|
@ -1,6 +1,6 @@
|
||||||
+++
|
+++
|
||||||
archetype = "chapter"
|
|
||||||
title = "Content"
|
title = "Content"
|
||||||
|
type = "chapter"
|
||||||
weight = 2
|
weight = 2
|
||||||
+++
|
+++
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
+++
|
+++
|
||||||
archetype = "chapter"
|
|
||||||
title = "Rambl'n"
|
title = "Rambl'n"
|
||||||
|
type = "chapter"
|
||||||
weight = 2
|
weight = 2
|
||||||
+++
|
+++
|
||||||
{{< piratify >}}
|
{{< piratify >}}
|
|
@ -25,8 +25,8 @@ This leads to a file with the following content
|
||||||
|
|
||||||
````toml {title="_index.md"}
|
````toml {title="_index.md"}
|
||||||
+++
|
+++
|
||||||
archetype = "home"
|
|
||||||
title = "{{ replace .Name "-" " " | title }}"
|
title = "{{ replace .Name "-" " " | title }}"
|
||||||
|
type = "home"
|
||||||
+++
|
+++
|
||||||
|
|
||||||
Lorem Ipsum.
|
Lorem Ipsum.
|
||||||
|
@ -48,8 +48,8 @@ This leads to a file with the following content
|
||||||
|
|
||||||
````toml {title="_index.md"}
|
````toml {title="_index.md"}
|
||||||
+++
|
+++
|
||||||
archetype = "chapter"
|
|
||||||
title = "{{ replace .Name "-" " " | title }}"
|
title = "{{ replace .Name "-" " " | title }}"
|
||||||
|
type = "chapter"
|
||||||
weight = 1
|
weight = 1
|
||||||
+++
|
+++
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ Define a template file in your project at `archetypes/<kind>.md` and make sure i
|
||||||
|
|
||||||
````toml {title="<kind>.md"}
|
````toml {title="<kind>.md"}
|
||||||
+++
|
+++
|
||||||
archetype = "<kind>"
|
type = "<kind>"
|
||||||
+++
|
+++
|
||||||
````
|
````
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
+++
|
+++
|
||||||
archetype = "chapter"
|
|
||||||
hidden = true
|
hidden = true
|
||||||
title = "Development"
|
title = "Development"
|
||||||
|
type = "chapter"
|
||||||
weight = 4
|
weight = 4
|
||||||
+++
|
+++
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
+++
|
+++
|
||||||
archetype = "chapter"
|
|
||||||
hidden = true
|
hidden = true
|
||||||
title = "Development"
|
title = "Development"
|
||||||
|
type = "chapter"
|
||||||
weight = 4
|
weight = 4
|
||||||
+++
|
+++
|
||||||
{{< piratify >}}
|
{{< piratify >}}
|
|
@ -1,7 +1,7 @@
|
||||||
+++
|
+++
|
||||||
archetype = "chapter"
|
|
||||||
title = "Shortcodes"
|
|
||||||
ordersectionsby = "title"
|
ordersectionsby = "title"
|
||||||
|
title = "Shortcodes"
|
||||||
|
type = "chapter"
|
||||||
weight = 3
|
weight = 3
|
||||||
+++
|
+++
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
+++
|
+++
|
||||||
archetype = "chapter"
|
|
||||||
title = "Shorrrtcodes"
|
|
||||||
ordersectionsby = "title"
|
ordersectionsby = "title"
|
||||||
|
title = "Shorrrtcodes"
|
||||||
|
type = "chapter"
|
||||||
weight = 3
|
weight = 3
|
||||||
+++
|
+++
|
||||||
{{< piratify >}}
|
{{< piratify >}}
|
|
@ -4,4 +4,4 @@ tags = ["children", "non-hidden"]
|
||||||
title = "page 1-1-2-1"
|
title = "page 1-1-2-1"
|
||||||
+++
|
+++
|
||||||
|
|
||||||
This is a plain demo child page.
|
This is a plain demo child page 1-1-2-1.
|
||||||
|
|
|
@ -4,4 +4,4 @@ tags = ["children", "non-hidden"]
|
||||||
title = "page 1-1-2-2"
|
title = "page 1-1-2-2"
|
||||||
+++
|
+++
|
||||||
|
|
||||||
This is a plain demo child page.
|
This is a plain demo child page 1-1-2-2.
|
||||||
|
|
|
@ -4,4 +4,4 @@ tags = ["children", "non-hidden"]
|
||||||
title = "page 1-1-3"
|
title = "page 1-1-3"
|
||||||
+++
|
+++
|
||||||
|
|
||||||
This is a plain demo child page.
|
This is a plain demo child page 1-1-3.
|
||||||
|
|
|
@ -4,4 +4,4 @@ tags = ["children", "non-hidden"]
|
||||||
title = "page 3-1"
|
title = "page 3-1"
|
||||||
+++
|
+++
|
||||||
|
|
||||||
This is a plain demo child page.
|
This is a plain demo child page 3-1.
|
||||||
|
|
|
@ -7,4 +7,4 @@ title: "page X"
|
||||||
weight: 1
|
weight: 1
|
||||||
---
|
---
|
||||||
|
|
||||||
This is a plain demo child page.
|
This is a plain demo child page X.
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{{ if (eq .Params.archetype "chapter") }}<b style="display: inline-block; font-weight: 200; padding-left: .3rem; text-align: left; width: 1.1rem;">{{ .Params.weight }}.</b> {{ end }}
|
{{ if (eq .Type "chapter") }}<b style="display: inline-block; font-weight: 200; padding-left: .3rem; text-align: left; width: 1.1rem;">{{ .Params.weight }}.</b> {{ end }}
|
|
@ -1,18 +1,22 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
{{- partialCached "page-meta.hugo" . .RelPermalink }}
|
{{- partialCached "page-meta.hugo" . .RelPermalink }}
|
||||||
|
{{- .Store.Set "relearnOutputFormat" "notfound" -}}
|
||||||
|
<!DOCTYPE html>
|
||||||
<html lang="{{ .Page.Language.LanguageCode }}" dir="{{ .Page.Language.LanguageDirection | default (T "Reading-direction") | default "ltr" }}" itemscope itemtype="http://schema.org/Article">
|
<html lang="{{ .Page.Language.LanguageCode }}" dir="{{ .Page.Language.LanguageDirection | default (T "Reading-direction") | default "ltr" }}" itemscope itemtype="http://schema.org/Article">
|
||||||
<head>
|
<head>
|
||||||
{{- partial "meta.html" . }}
|
{{- partial "meta.html" . }}
|
||||||
{{- $title := partial "pageHelper/title.hugo" (dict "page" . "fullyQualified" true "reverse" true) }}
|
{{- $title := partial "pageHelper/title.hugo" (dict "page" . "fullyQualified" true "reverse" true) }}
|
||||||
<title>{{ $title }}</title>
|
<title>{{ $title }}</title>
|
||||||
|
|
||||||
|
{{- /* because this file can be called from literally any URL inside your project, we need to base all relative URLs to make them work */}}
|
||||||
<base href="{{ .Site.BaseURL }}">
|
<base href="{{ .Site.BaseURL }}">
|
||||||
|
|
||||||
{{- partialCached "favicon.html" . }}
|
{{- partialCached "favicon.html" . }}
|
||||||
{{- partial "stylesheet.html" . }}
|
{{- partial "stylesheet.html" . }}
|
||||||
{{- partial "custom-header.html" . }}
|
{{- partial "custom-header.html" . }}
|
||||||
</head>
|
</head>
|
||||||
<body class="mobile-support html notfound" data-url="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .) }}">
|
<body class="mobile-support {{ with .Store.Get "relearnOutputFormat" }}{{ . }}{{ else }}html{{ end }}" data-url="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .) }}">
|
||||||
<div id="R-body" class="default-animation">
|
<div id="R-body" class="default-animation">
|
||||||
<main id="R-body-inner" class="chapter" tabindex="-1">
|
<main id="R-body-inner" class="highlightable chapter" tabindex="-1">
|
||||||
<div class="flex-block-wrapper">
|
<div class="flex-block-wrapper">
|
||||||
<article>
|
<article>
|
||||||
<h1 id="404"><span>4</span>{{ partial "shortcodes/icon.html" (dict "page" . "icon" "far fa-frown" )}}<span>4</span></h1>
|
<h1 id="404"><span>4</span>{{ partial "shortcodes/icon.html" (dict "page" . "icon" "far fa-frown" )}}<span>4</span></h1>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
{{- partialCached "page-meta.hugo" . .RelPermalink -}}
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
{{- $outputFormat := partial "output-format.hugo" . }}
|
{{- block "storeOutputFormat" . }}{{ end }}
|
||||||
{{- if eq . .Site.Sites.First.Home }}
|
{{- if eq . .Site.Sites.First.Home }}
|
||||||
{{- $hugoVersion := "0.126.0" }}
|
{{- $hugoVersion := "0.126.0" }}
|
||||||
{{- if lt hugo.Version $hugoVersion }}
|
{{- if lt hugo.Version $hugoVersion }}
|
||||||
|
@ -12,11 +13,10 @@
|
||||||
<html lang="{{ .Page.Language.LanguageCode }}" dir="{{ .Page.Language.LanguageDirection | default (T "Reading-direction") | default "ltr" }}" itemscope itemtype="http://schema.org/Article">
|
<html lang="{{ .Page.Language.LanguageCode }}" dir="{{ .Page.Language.LanguageDirection | default (T "Reading-direction") | default "ltr" }}" itemscope itemtype="http://schema.org/Article">
|
||||||
<head>
|
<head>
|
||||||
{{- partial "meta.html" . }}
|
{{- partial "meta.html" . }}
|
||||||
{{- $page := . }}
|
|
||||||
{{- $link := "<link href=\"%s\" rel=\"%s\" type=\"%s\" title=\"%s\">" }}
|
|
||||||
{{- $title := partial "pageHelper/title.hugo" (dict "page" . "fullyQualified" true "reverse" true) }}
|
{{- $title := partial "pageHelper/title.hugo" (dict "page" . "fullyQualified" true "reverse" true) }}
|
||||||
<title>{{ $title }}</title>
|
<title>{{ $title }}</title>
|
||||||
|
|
||||||
|
{{- /* multilingual stuff */}}
|
||||||
{{- if .IsTranslated -}}
|
{{- if .IsTranslated -}}
|
||||||
{{- range $index, $trans := .AllTranslations }}
|
{{- range $index, $trans := .AllTranslations }}
|
||||||
{{- if eq $index 0 }}
|
{{- if eq $index 0 }}
|
||||||
|
@ -26,8 +26,11 @@
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
{{- /* output formats */}}
|
||||||
{{- if not (and .Title .RelPermalink (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSeoHiddenPages true) ) ) }}
|
{{- if not (and .Title .RelPermalink (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSeoHiddenPages true) ) ) }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
|
{{- $page := . }}
|
||||||
|
{{- $link := "<link href=\"%s\" rel=\"%s\" type=\"%s\" title=\"%s\">" }}
|
||||||
{{- range .AlternativeOutputFormats }}
|
{{- range .AlternativeOutputFormats }}
|
||||||
{{- if eq .Rel "canonical" }}
|
{{- if eq .Rel "canonical" }}
|
||||||
{{ (printf $link (partial "relLangPrettyUglyURL.hugo" (dict "to" . "abs" true)) .Rel .MediaType.Type ($title | htmlEscape)) | safeHTML }}
|
{{ (printf $link (partial "relLangPrettyUglyURL.hugo" (dict "to" . "abs" true)) .Rel .MediaType.Type ($title | htmlEscape)) | safeHTML }}
|
||||||
|
@ -36,13 +39,12 @@
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- partialCached "favicon.html" . }}
|
{{- partialCached "favicon.html" . }}
|
||||||
{{- partial "stylesheet.html" . }}
|
{{- partial "stylesheet.html" . }}
|
||||||
{{- partial "dependencies.html" (dict "page" . "location" "header") }}
|
{{- partial "dependencies.html" (dict "page" . "location" "header") }}
|
||||||
{{- partial "custom-header.html" . }}
|
{{- partial "custom-header.html" . }}
|
||||||
</head>
|
</head>
|
||||||
<body class="mobile-support {{ $outputFormat }}{{- if .Site.Params.disableInlineCopyToClipBoard }} disableInlineCopyToClipboard{{ end }}{{- if .Site.Params.disableHoverBlockCopyToClipBoard }} disableHoverBlockCopyToClipBoard{{ end }}" data-url="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .) }}">
|
<body class="mobile-support {{ with .Store.Get "relearnOutputFormat" }}{{ . }}{{ else }}html{{ end }}{{- if .Site.Params.disableInlineCopyToClipBoard }} disableInlineCopyToClipboard{{ end }}{{- if .Site.Params.disableHoverBlockCopyToClipBoard }} disableHoverBlockCopyToClipBoard{{ end }}" data-url="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .) }}">
|
||||||
<div id="R-body" class="default-animation">
|
<div id="R-body" class="default-animation">
|
||||||
<div id="R-body-overlay"></div>
|
<div id="R-body-overlay"></div>
|
||||||
<nav id="R-topbar">
|
<nav id="R-topbar">
|
||||||
|
@ -58,7 +60,7 @@
|
||||||
</ol>
|
</ol>
|
||||||
{{- else }}
|
{{- else }}
|
||||||
<span class="topbar-breadcrumbs highlightable">
|
<span class="topbar-breadcrumbs highlightable">
|
||||||
{{ .Title }}
|
{{ partial "pageHelper/title.hugo" (dict "page" . "linkTitle" true) }}
|
||||||
</span>
|
</span>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<div class="topbar-area topbar-area-end" data-area="end">
|
<div class="topbar-area topbar-area-end" data-area="end">
|
||||||
|
@ -66,7 +68,20 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
{{- $hook := "styleclass" }}
|
|
||||||
<div id="R-main-overlay"></div>
|
<div id="R-main-overlay"></div>
|
||||||
<main id="R-body-inner" class="highlightable {{ partialCached "archetype.hugo" (dict "hook" $hook "page" . "parameter" .) .RelPermalink $hook }}" tabindex="-1">
|
<main id="R-body-inner" class="highlightable{{ with or .Type "default" }} {{ . }}{{ end }}" tabindex="-1">
|
||||||
<div class="flex-block-wrapper">
|
<div class="flex-block-wrapper">
|
||||||
|
{{- block "body" . }}{{ end }}
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
{{- partial "custom-comments.html" . }}
|
||||||
|
</div>
|
||||||
|
{{- block "menu" . }}{{ end }}
|
||||||
|
{{- $assetBusting := partialCached "assetbusting.hugo" . }}
|
||||||
|
<script src="{{"js/clipboard.min.js" | relURL}}{{ $assetBusting }}" defer></script>
|
||||||
|
<script src="{{"js/perfect-scrollbar.min.js" | relURL}}{{ $assetBusting }}" defer></script>
|
||||||
|
{{- partial "dependencies.html" (dict "page" . "location" "footer") }}
|
||||||
|
<script src="{{"js/theme.js" | relURL}}{{ $assetBusting }}" defer></script>
|
||||||
|
{{- partial "custom-footer.html" . }}
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -1 +0,0 @@
|
||||||
{{- partial "_main.hugo" . }}
|
|
|
@ -1 +1,9 @@
|
||||||
{{- partial "_main.hugo" . }}
|
{{- define "storeOutputFormat" }}
|
||||||
|
{{- .Render "views/storeOutputFormat" }}
|
||||||
|
{{- end }}
|
||||||
|
{{- define "body" }}
|
||||||
|
{{- .Render "views/page" }}
|
||||||
|
{{- end }}
|
||||||
|
{{- define "menu" }}
|
||||||
|
{{- .Render "views/menu" }}
|
||||||
|
{{- end }}
|
|
@ -1 +1,9 @@
|
||||||
{{- partial "_main.hugo" . }}
|
{{- define "storeOutputFormat" }}
|
||||||
|
{{- .Render "views/storeOutputFormat" }}
|
||||||
|
{{- end }}
|
||||||
|
{{- define "body" }}
|
||||||
|
{{- .Render "views/page" }}
|
||||||
|
{{- end }}
|
||||||
|
{{- define "menu" }}
|
||||||
|
{{- .Render "views/menu" }}
|
||||||
|
{{- end }}
|
|
@ -1,33 +1,9 @@
|
||||||
{{- partialCached "page-meta.hugo" . .RelPermalink }}
|
{{- define "storeOutputFormat" }}
|
||||||
{{- partial "header.html" . }}
|
{{- .Render "views/storeOutputFormat" }}
|
||||||
<article>
|
|
||||||
<header class="headline">
|
|
||||||
</header>
|
|
||||||
{{- $page := . }}
|
|
||||||
|
|
||||||
{{- $title := partial "pageHelper/title.hugo" (dict "page" .) }}
|
|
||||||
<h1 id="{{ $title | plainify | anchorize }}">{{ $title }}</h1>
|
|
||||||
{{- .Content }}
|
|
||||||
{{- $lastCapital := "" }}
|
|
||||||
{{- $pages := partialCached "partials/pageHelper/taxonomyPages.html" . . }}
|
|
||||||
{{- range $pages }}
|
|
||||||
{{- $capital := substr .Title 0 1 | upper }}
|
|
||||||
{{- if ne $lastCapital $capital }}
|
|
||||||
{{- if ne $lastCapital "" }}
|
|
||||||
</ul>
|
|
||||||
{{- end }}
|
|
||||||
<h2 id="{{ $capital | plainify | anchorize }}">{{ $capital }}</h2>
|
|
||||||
<ul class="columnize">
|
|
||||||
{{- end }}
|
|
||||||
{{- /* display terms of a taxonomy */}}
|
|
||||||
<li><a href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .Page) }}">{{ .Title }}</a> ({{ .Count }})</li>
|
|
||||||
{{- $lastCapital = $capital }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if ne $lastCapital "" }}
|
{{- define "body" }}
|
||||||
</ul>
|
{{- partial "bodys/taxonomy.html" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- define "menu" }}
|
||||||
|
{{- .Render "views/menu" }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
<footer class="footline">
|
|
||||||
</footer>
|
|
||||||
</article>
|
|
||||||
{{- partial "footer.html" . }}
|
|
|
@ -1,37 +1,9 @@
|
||||||
{{- partialCached "page-meta.hugo" . .RelPermalink }}
|
{{- define "storeOutputFormat" }}
|
||||||
{{- partial "header.html" . }}
|
{{- .Render "views/storeOutputFormat" }}
|
||||||
<article>
|
|
||||||
<header class="headline">
|
|
||||||
</header>
|
|
||||||
{{- $page := . }}
|
|
||||||
|
|
||||||
{{- $title := partial "pageHelper/title.hugo" (dict "page" .) }}
|
|
||||||
<h1 id="{{ $title | plainify | anchorize }}">{{ $title }}</h1>
|
|
||||||
{{- .Content }}
|
|
||||||
{{- $lastCapital := "" }}
|
|
||||||
{{- $pages := partialCached "partials/pageHelper/termPages.html" . . }}
|
|
||||||
{{- range $pages }}
|
|
||||||
{{- $capital := substr .Title 0 1 | upper }}
|
|
||||||
{{- if ne $lastCapital $capital }}
|
|
||||||
{{- if ne $lastCapital "" }}
|
|
||||||
</ul>
|
|
||||||
{{- end }}
|
|
||||||
<h2 id="{{ $capital | plainify | anchorize }}">{{ $capital }}</h2>
|
|
||||||
<ul class="columnize">
|
|
||||||
{{- end }}
|
|
||||||
{{- /* display pages of a term */}}
|
|
||||||
{{- $breadcrumb := "" }}
|
|
||||||
{{- if (ne .Page.Site.Params.disableTermBreadcrumbs true) }}
|
|
||||||
{{- $breadcrumb = trim (partial "breadcrumbs.html" (dict "page" .Page "dirOnly" true) | plainify | htmlUnescape) "\n\r\t " }}
|
|
||||||
{{- end }}
|
|
||||||
<li><a href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .Page) }}">{{ .Title }}</a>{{ with $breadcrumb }}<div class="breadcrumbs highlightable" title="{{ . }}">{{ . }}</div>{{ end }}</li>
|
|
||||||
{{- $lastCapital = $capital }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if ne $lastCapital "" }}
|
{{- define "body" }}
|
||||||
</ul>
|
{{- partial "bodys/term.html" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- define "menu" }}
|
||||||
|
{{- .Render "views/menu" }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
<footer class="footline">
|
|
||||||
</footer>
|
|
||||||
</article>
|
|
||||||
{{- partial "footer.html" . }}
|
|
|
@ -1,15 +1,12 @@
|
||||||
{{- $page := .page }}
|
|
||||||
{{- $content := .content }}
|
|
||||||
{{- with $page }}
|
|
||||||
<article class="default">
|
<article class="default">
|
||||||
<header class="headline">
|
<header class="headline">
|
||||||
{{- partial "content-header.html" . }}
|
{{- partial "content-header.html" . }}
|
||||||
</header>
|
</header>
|
||||||
{{ partial "heading-pre.html" . }}{{ partial "heading.html" . }}{{ partial "heading-post.html" . }}
|
{{ partial "heading-pre.html" . }}{{ partial "heading.html" . }}{{ partial "heading-post.html" . }}
|
||||||
|
|
||||||
{{ $content | safeHTML }}
|
{{ partial "content.html" . | safeHTML }}
|
||||||
<footer class="footline">
|
<footer class="footline">
|
||||||
{{- partial "content-footer.html" . }}
|
{{- partial "content-footer.html" . }}
|
||||||
</footer>
|
</footer>
|
||||||
</article>
|
</article>
|
||||||
{{- end }}
|
|
1
layouts/_default/views/menu.html
Normal file
1
layouts/_default/views/menu.html
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{{- partial "menu.html" . }}
|
1
layouts/_default/views/page.html
Normal file
1
layouts/_default/views/page.html
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{{- partial "bodys/page-single.html" . }}
|
1
layouts/_default/views/page.print.html
Normal file
1
layouts/_default/views/page.print.html
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{{- partial "bodys/page-tree.html" . }}
|
1
layouts/_default/views/storeOutputFormat.html
Normal file
1
layouts/_default/views/storeOutputFormat.html
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{{- .Store.Set "relearnOutputFormat" "html" }}
|
1
layouts/_default/views/storeOutputFormat.print.html
Normal file
1
layouts/_default/views/storeOutputFormat.print.html
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{{- .Store.Set "relearnOutputFormat" "print" }}
|
|
@ -1,16 +1,13 @@
|
||||||
{{- $page := .page }}
|
|
||||||
{{- $content := .content }}
|
<article class="chapter narrow">
|
||||||
{{- with $page }}
|
|
||||||
<article class="chapter">
|
|
||||||
<header class="headline">
|
<header class="headline">
|
||||||
{{- partial "content-header.html" . }}
|
{{- partial "content-header.html" . }}
|
||||||
</header>
|
</header>
|
||||||
{{ partial "heading-pre.html" . }}<div class="article-subheading">{{ T "Chapter" .Params.Weight }}</div>
|
{{ partial "heading-pre.html" . }}<div class="article-subheading">{{ T "Chapter" .Params.Weight }}</div>
|
||||||
{{ partial "heading.html" . }}{{ partial "heading-post.html" . }}
|
{{ partial "heading.html" . }}{{ partial "heading-post.html" . }}
|
||||||
|
|
||||||
{{ $content | safeHTML }}
|
{{ partial "content.html" . | safeHTML }}
|
||||||
<footer class="footline">
|
<footer class="footline">
|
||||||
{{- partial "content-footer.html" . }}
|
{{- partial "content-footer.html" . }}
|
||||||
</footer>
|
</footer>
|
||||||
</article>
|
</article>
|
||||||
{{- end }}
|
|
|
@ -1,15 +1,12 @@
|
||||||
{{- $page := .page }}
|
|
||||||
{{- $content := .content }}
|
|
||||||
{{- with $page }}
|
|
||||||
<article class="home">
|
<article class="home">
|
||||||
<header class="headline">
|
<header class="headline">
|
||||||
{{- partial "content-header.html" . }}
|
{{- partial "content-header.html" . }}
|
||||||
</header>
|
</header>
|
||||||
{{ partial "heading-pre.html" . }}{{ partial "heading.html" . }}{{ partial "heading-post.html" . }}
|
{{ partial "heading-pre.html" . }}{{ partial "heading.html" . }}{{ partial "heading-post.html" . }}
|
||||||
|
|
||||||
{{ $content | safeHTML }}
|
{{ partial "content.html" . | safeHTML }}
|
||||||
<footer class="footline">
|
<footer class="footline">
|
||||||
{{- partial "content-footer.html" . }}
|
{{- partial "content-footer.html" . }}
|
||||||
</footer>
|
</footer>
|
||||||
</article>
|
</article>
|
||||||
{{- end }}
|
|
|
@ -1,8 +0,0 @@
|
||||||
{{- partialCached "page-meta.hugo" . .RelPermalink }}
|
|
||||||
{{- partial "output-partial.hugo" (dict "base" "header" "page" . "parameter" .) }}
|
|
||||||
{{- if not .File }}
|
|
||||||
{{- partial "output-partial.hugo" (dict "base" "body" "page" . "parameter" (dict "page" . "content" (partial "output-partial.hugo" (dict "base" "initial" "page" . "parameter" .)))) }}
|
|
||||||
{{- else }}
|
|
||||||
{{- partial "output-partial.hugo" (dict "base" "body" "page" . "parameter" (dict "page" . "content" (partial "output-partial.hugo" (dict "base" "content" "page" . "parameter" .)))) }}
|
|
||||||
{{- end }}
|
|
||||||
{{- partial "output-partial.hugo" (dict "base" "footer" "page" . "parameter" .) }}
|
|
|
@ -1,23 +0,0 @@
|
||||||
{{- $hook := .hook }}
|
|
||||||
{{- $page := .page }}
|
|
||||||
{{- $parameter := .parameter }}
|
|
||||||
{{- $archetype := "default" }}
|
|
||||||
{{- if not $page.File }}
|
|
||||||
{{- else if $page.Params.archetype }}
|
|
||||||
{{- $archetype = $page.Params.archetype }}
|
|
||||||
{{- else if $page.Params.chapter }}
|
|
||||||
{{- $archetype = "chapter" }}
|
|
||||||
{{- if findRE `(?s)<h1.*?>.*?</h1>` .Content }}
|
|
||||||
{{- $archetype = "deprecated-chapter" }}
|
|
||||||
{{- end }}
|
|
||||||
{{- else if $page.IsHome }}
|
|
||||||
{{- $archetype = "home" }}
|
|
||||||
{{- if findRE `(?s)<h1.*?>.*?</h1>` .Content }}
|
|
||||||
{{- $archetype = "deprecated-home" }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
{{- $f := printf "/layouts/partials/archetypes/%s" $archetype }}
|
|
||||||
{{- if not (partialCached "fileExists.hugo" $f $f) }}
|
|
||||||
{{- $archetype = "default" }}
|
|
||||||
{{- end }}
|
|
||||||
{{- partial "output-partial.hugo" (dict "base" (printf "archetypes/%s/%s" $archetype $hook) "page" $page "parameter" $parameter) }}
|
|
|
@ -1 +0,0 @@
|
||||||
chapter narrow
|
|
|
@ -1 +0,0 @@
|
||||||
default
|
|
|
@ -1,15 +0,0 @@
|
||||||
{{- $page := .page }}
|
|
||||||
{{- $content := .content }}
|
|
||||||
{{- with $page }}
|
|
||||||
{{- warnf "%q: DEPRECATED usage of old 'chapter' archetype found, remove 'chapter=true' and add 'archetype=\"chapter\"' to your frontmatter and remove the leading h3 and h1 headings; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#500" $page.File.Filename }}
|
|
||||||
<article class="chapter deprecated">
|
|
||||||
<header class="headline">
|
|
||||||
{{- partial "content-header.html" . }}
|
|
||||||
</header>
|
|
||||||
|
|
||||||
{{ $content | safeHTML }}
|
|
||||||
<footer class="footline">
|
|
||||||
{{- partial "content-footer.html" . }}
|
|
||||||
</footer>
|
|
||||||
</article>
|
|
||||||
{{- end }}
|
|
|
@ -1 +0,0 @@
|
||||||
chapter narrow
|
|
|
@ -1,15 +0,0 @@
|
||||||
{{- $page := .page }}
|
|
||||||
{{- $content := .content }}
|
|
||||||
{{- with $page }}
|
|
||||||
{{- warnf "%q: DEPRECATED usage of old 'home' archetype found, add 'archetype=\"home\"' to your frontmatter and remove the leading h1 heading; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#500" $page.File.Filename }}
|
|
||||||
<article class="home deprecated">
|
|
||||||
<header class="headline">
|
|
||||||
{{- partial "content-header.html" . }}
|
|
||||||
</header>
|
|
||||||
|
|
||||||
{{ $content | safeHTML }}
|
|
||||||
<footer class="footline">
|
|
||||||
{{- partial "content-footer.html" . }}
|
|
||||||
</footer>
|
|
||||||
</article>
|
|
||||||
{{- end }}
|
|
|
@ -1 +0,0 @@
|
||||||
home
|
|
|
@ -1 +0,0 @@
|
||||||
home
|
|
|
@ -1,4 +0,0 @@
|
||||||
{{- $page := .page }}
|
|
||||||
{{- $content := .content }}
|
|
||||||
{{- $hook := "article" }}
|
|
||||||
{{- partialCached "archetype.hugo" (dict "hook" $hook "page" $page "parameter" (dict "page" $page "content" $content)) $page.RelPermalink $hook }}
|
|
|
@ -1,3 +0,0 @@
|
||||||
{{- $page := .page }}
|
|
||||||
{{- $content := .content }}
|
|
||||||
{{- partial "single-article.hugo" (dict "page" $page "content" $content) }}
|
|
|
@ -1,3 +0,0 @@
|
||||||
{{- $page := .page }}
|
|
||||||
{{- $content := .content }}
|
|
||||||
{{- partial "nested-article.hugo" (dict "page" $page) }}
|
|
2
layouts/partials/bodys/page-single.html
Normal file
2
layouts/partials/bodys/page-single.html
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
{{- .Store.Set "relearnIsNested" false }}
|
||||||
|
{{- .Render "views/article" }}
|
|
@ -1,5 +1,5 @@
|
||||||
{{- .page.Page.Store.Set "relearnIsNested" true }}
|
{{- .Store.Set "relearnIsNested" true }}
|
||||||
{{- template "section-tree-print" dict "sect" .page "currentnode" .page }}
|
{{- template "section-tree-print" dict "sect" . "currentnode" . }}
|
||||||
{{- define "section-tree-print" }}
|
{{- define "section-tree-print" }}
|
||||||
{{- $currentNode := .currentnode }}
|
{{- $currentNode := .currentnode }}
|
||||||
{{- $currentFileRelPermalink := .currentnode.RelPermalink }}
|
{{- $currentFileRelPermalink := .currentnode.RelPermalink }}
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
{{- $currentNode := .currentnode }}
|
{{- $currentNode := .currentnode }}
|
||||||
{{- with .sect }}
|
{{- with .sect }}
|
||||||
{{- $page := . }}
|
{{- $page := . }}
|
||||||
{{- partialCached "nested-content.hugo" (dict "page" $page) $page.RelPermalink }}
|
{{- partialCached "nested-content.hugo" $page $page.RelPermalink }}
|
||||||
{{- range $page.Site.Params.relearn.dependencies }}
|
{{- range $page.Site.Params.relearn.dependencies }}
|
||||||
{{- $has := printf "has%s" .name }}
|
{{- $has := printf "has%s" .name }}
|
||||||
{{- $hasnested := printf "relearnHasNested%s" .name }}
|
{{- $hasnested := printf "relearnHasNested%s" .name }}
|
30
layouts/partials/bodys/taxonomy.html
Normal file
30
layouts/partials/bodys/taxonomy.html
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
|
||||||
|
<article>
|
||||||
|
<header class="headline">
|
||||||
|
</header>
|
||||||
|
|
||||||
|
{{- $title := partial "pageHelper/title.hugo" (dict "page" .) }}
|
||||||
|
<h1 id="{{ $title | plainify | anchorize }}">{{ $title }}</h1>
|
||||||
|
{{- .Content }}
|
||||||
|
{{- $lastCapital := "" }}
|
||||||
|
{{- $pages := partialCached "partials/pageHelper/taxonomyPages.html" . . }}
|
||||||
|
{{- range $pages }}
|
||||||
|
{{- $capital := substr .Title 0 1 | upper }}
|
||||||
|
{{- if ne $lastCapital $capital }}
|
||||||
|
{{- if ne $lastCapital "" }}
|
||||||
|
</ul>
|
||||||
|
{{- end }}
|
||||||
|
<h2 id="{{ $capital | plainify | anchorize }}">{{ $capital }}</h2>
|
||||||
|
<ul class="columnize">
|
||||||
|
{{- end }}
|
||||||
|
{{- /* display terms of a taxonomy */}}
|
||||||
|
<li><a href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .Page) }}">{{ .Title }}</a> ({{ .Count }})</li>
|
||||||
|
{{- $lastCapital = $capital }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if ne $lastCapital "" }}
|
||||||
|
</ul>
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
<footer class="footline">
|
||||||
|
</footer>
|
||||||
|
</article>
|
34
layouts/partials/bodys/term.html
Normal file
34
layouts/partials/bodys/term.html
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
|
||||||
|
<article>
|
||||||
|
<header class="headline">
|
||||||
|
</header>
|
||||||
|
|
||||||
|
{{- $title := partial "pageHelper/title.hugo" (dict "page" .) }}
|
||||||
|
<h1 id="{{ $title | plainify | anchorize }}">{{ $title }}</h1>
|
||||||
|
{{- .Content }}
|
||||||
|
{{- $lastCapital := "" }}
|
||||||
|
{{- $pages := partialCached "partials/pageHelper/termPages.html" . . }}
|
||||||
|
{{- range $pages }}
|
||||||
|
{{- $capital := substr .Title 0 1 | upper }}
|
||||||
|
{{- if ne $lastCapital $capital }}
|
||||||
|
{{- if ne $lastCapital "" }}
|
||||||
|
</ul>
|
||||||
|
{{- end }}
|
||||||
|
<h2 id="{{ $capital | plainify | anchorize }}">{{ $capital }}</h2>
|
||||||
|
<ul class="columnize">
|
||||||
|
{{- end }}
|
||||||
|
{{- /* display pages of a term */}}
|
||||||
|
{{- $breadcrumb := "" }}
|
||||||
|
{{- if (ne .Page.Site.Params.disableTermBreadcrumbs true) }}
|
||||||
|
{{- $breadcrumb = trim (partial "breadcrumbs.html" (dict "page" .Page "dirOnly" true) | plainify | htmlUnescape) "\n\r\t " }}
|
||||||
|
{{- end }}
|
||||||
|
<li><a href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .Page) }}">{{ .Title }}</a>{{ with $breadcrumb }}<div class="breadcrumbs highlightable" title="{{ . }}">{{ . }}</div>{{ end }}</li>
|
||||||
|
{{- $lastCapital = $capital }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if ne $lastCapital "" }}
|
||||||
|
</ul>
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
<footer class="footline">
|
||||||
|
</footer>
|
||||||
|
</article>
|
|
@ -1 +1,4 @@
|
||||||
{{- .Content }}
|
{{- /* the following check avoids to print out content of headless bundles if called from nested-content.html */}}
|
||||||
|
{{- if partial "relLangPrettyUglyURL.hugo" (dict "to" .) }}
|
||||||
|
{{- .Content }}
|
||||||
|
{{- end }}
|
|
@ -1,13 +0,0 @@
|
||||||
</div>
|
|
||||||
</main><!-- #R-body-inner -->
|
|
||||||
{{- partial "custom-comments.html" . }}
|
|
||||||
</div><!-- #R-body -->
|
|
||||||
{{- partial "output-partial.hugo" (dict "base" "menu" "page" . "parameter" .) }}
|
|
||||||
{{- $assetBusting := partialCached "assetbusting.hugo" . }}
|
|
||||||
<script src="{{"js/clipboard.min.js" | relURL}}{{ $assetBusting }}" defer></script>
|
|
||||||
<script src="{{"js/perfect-scrollbar.min.js" | relURL}}{{ $assetBusting }}" defer></script>
|
|
||||||
{{- partial "dependencies.html" (dict "page" . "location" "footer") }}
|
|
||||||
<script src="{{"js/theme.js" | relURL}}{{ $assetBusting }}" defer></script>
|
|
||||||
{{- partial "custom-footer.html" . }}
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,44 +0,0 @@
|
||||||
{{/*
|
|
||||||
https://discourse.gohugo.io/t/question-about-printf-v/22923/4
|
|
||||||
|
|
||||||
GetCurrentOutput
|
|
||||||
Retrieves the OuputFormat of the page, from a list of predefined outputs
|
|
||||||
|
|
||||||
@author @regisphilibert with modification by @McShelby
|
|
||||||
|
|
||||||
@context Page (.)
|
|
||||||
|
|
||||||
@access public
|
|
||||||
|
|
||||||
@return A String among the predefined list
|
|
||||||
|
|
||||||
@example - Go Template
|
|
||||||
{{ $currentOutputFormat := partial "func/GetCurrentOutput" . }}
|
|
||||||
|
|
||||||
@warning This partial cannot be cached.
|
|
||||||
*/}}
|
|
||||||
|
|
||||||
{{/* We create a slice listing the concerned output formats */}}
|
|
||||||
{{- $outputs := slice }}
|
|
||||||
{{- range .OutputFormats }}
|
|
||||||
{{- $outputs = $outputs | append .Name }}
|
|
||||||
{{- end }}
|
|
||||||
{{- $alt := slice }}
|
|
||||||
{{/* We range on the page's Alternative Output Formats which returns all output formats
|
|
||||||
except the current one. */}}
|
|
||||||
{{- range .AlternativeOutputFormats }}
|
|
||||||
{{/* If an output format matches one in the concerned list, we add it to our slice of outputs */}}
|
|
||||||
{{- if in $outputs .Name }}
|
|
||||||
{{- $alt = $alt | append .Name }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
{{- $current := "default" }}
|
|
||||||
{{/* If any alternate output formats part of the "concerned" ones have been found, we range on them. */}}
|
|
||||||
{{- range $outputs }}
|
|
||||||
{{/* If the output format is not listed as an "alternate", it means it is the current one. */}}
|
|
||||||
{{- if not (in $alt .) }}
|
|
||||||
{{- $current = . }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{- return .OutputFormats.Get $current }}
|
|
|
@ -1,12 +1,3 @@
|
||||||
{{- $page := .page }}
|
{{- if .Title }}
|
||||||
{{- $content := "" }}
|
{{- .Render "views/article" }}
|
||||||
{{- $url := partial "relLangPrettyUglyURL.hugo" (dict "to" $page) }}
|
|
||||||
{{- if $url }}
|
|
||||||
{{- /* if we have a relative link in a print page, our print URL is one level to deep; so we are making it absolute to our page by prepending the page's permalink */}}
|
|
||||||
{{- $link_prefix := strings.TrimRight "/" $page.RelPermalink }}
|
|
||||||
{{- $content = partial "output-partial.hugo" (dict "base" "content" "page" $page "parameter" $page) }}
|
|
||||||
{{- $content = replaceRE "((?:src|href)\\s*=(?:\\s*[\"']\\s*)?)(\\.[^\"'\\s>]*|[\\w]+[^\"'\\s>:]*)([\"'\\s>])" (printf "${1}%s/${2}${3}" $link_prefix) $content }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if $page.Title }}
|
|
||||||
{{- partial "output-partial.hugo" (dict "base" "article" "page" $page "parameter" (dict "page" $page "content" $content)) }}
|
|
||||||
{{- end }}
|
{{- end }}
|
|
@ -1,13 +0,0 @@
|
||||||
{{- $page := . }}
|
|
||||||
{{- $format := "" }}
|
|
||||||
{{- if reflect.IsMap $page }}
|
|
||||||
{{- $format = $page.format }}
|
|
||||||
{{- $page = $page.page }}
|
|
||||||
{{- else }}
|
|
||||||
{{- $format = partial "get-format.hugo" $page }}
|
|
||||||
{{- end }}
|
|
||||||
{{- $ret := "default" }}
|
|
||||||
{{- if $format }}
|
|
||||||
{{ $ret = $format.Name | lower }}
|
|
||||||
{{- end }}
|
|
||||||
{{- return $ret }}
|
|
|
@ -1,17 +0,0 @@
|
||||||
{{- $base := .base }}
|
|
||||||
{{- $page := .page }}
|
|
||||||
{{- $parameter := .parameter }}
|
|
||||||
{{- $outputFormat := .outputFormat }}
|
|
||||||
{{- if not $outputFormat }}
|
|
||||||
{{- $outputFormat = partial "output-format.hugo" $page }}
|
|
||||||
{{- end }}
|
|
||||||
{{- $suffix := partialCached "output-suffix.hugo" $page $page.RelPermalink $outputFormat }}
|
|
||||||
{{- $f := printf "/layouts/partials/%s.%s.%s" $base $outputFormat $suffix }}
|
|
||||||
{{- if or (not $outputFormat) (not (partialCached "fileExists.hugo" $f $f)) }}
|
|
||||||
{{- $f = printf "/layouts/partials/%s.%s" $base $suffix }}
|
|
||||||
{{- if partialCached "fileExists.hugo" $f $f }}
|
|
||||||
{{- partial (printf "%s.%s" $base $suffix) $parameter }}
|
|
||||||
{{- end }}
|
|
||||||
{{- else }}
|
|
||||||
{{- partial (printf "%s.%s.%s" $base $outputFormat $suffix) $parameter }}
|
|
||||||
{{- end }}
|
|
|
@ -1,8 +0,0 @@
|
||||||
{{- $format := partial "get-format.hugo" . }}
|
|
||||||
{{- $ret := "html" }}
|
|
||||||
{{- if $format }}
|
|
||||||
{{- range first 1 $format.MediaType.Suffixes }}
|
|
||||||
{{- $ret = . }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
{{- return $ret }}
|
|
|
@ -1,3 +1,13 @@
|
||||||
|
<!--
|
||||||
|
@@@
|
||||||
|
lang: {{- .Site.LanguagePrefix }}
|
||||||
|
path: {{- .Path }}
|
||||||
|
kind: {{- .Kind }} ["home" "page" "section" "taxonomy" "term"]
|
||||||
|
layout: {{- .Layout }}
|
||||||
|
type: {{- .Type }} [frontmatter:type section "page"]
|
||||||
|
section: {{- .Section }}
|
||||||
|
@@@
|
||||||
|
-->
|
||||||
{{- $currentNode := . }}
|
{{- $currentNode := . }}
|
||||||
{{- $forceContent := $currentNode.WordCount }}
|
{{- $forceContent := $currentNode.WordCount }}
|
||||||
{{- $currentNode.Scratch.Delete "relearnIsSelfFound" }}
|
{{- $currentNode.Scratch.Delete "relearnIsSelfFound" }}
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
{{- $page := .page }}
|
|
||||||
{{- $content := .content }}
|
|
||||||
{{- $page.Page.Store.Set "relearnIsNested" false }}
|
|
||||||
{{- partial "output-partial.hugo" (dict "base" "article" "page" $page "parameter" (dict "page" $page "content" $content)) }}
|
|
|
@ -1,4 +1,9 @@
|
||||||
{{- $outputFormat := partial "output-format.hugo" . }}
|
{{- $outputFormat := "html" }}
|
||||||
|
{{- with .Store.Get "relearnOutputFormat" }}
|
||||||
|
{{- $outputFormat = . }}
|
||||||
|
{{- else }}
|
||||||
|
{{- warnf "WARNING no key `relearnOutputFormat` found in page store, set one by providing the file `layouts/_default/view/storeOutputFormat.<MYOUTPUTFORMAT>.html` for your self-defined output format; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#600" }}
|
||||||
|
{{- end }}
|
||||||
{{- $assetBusting := partialCached "assetbusting.hugo" . }}
|
{{- $assetBusting := partialCached "assetbusting.hugo" . }}
|
||||||
{{- /* https://github.com/filamentgroup/loadCSS/blob/master/README.md#how-to-use */}}
|
{{- /* https://github.com/filamentgroup/loadCSS/blob/master/README.md#how-to-use */}}
|
||||||
<link href="{{"css/fontawesome-all.min.css" | relURL}}{{ $assetBusting }}" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="{{"css/fontawesome-all.min.css" | relURL}}{{ $assetBusting }}" rel="stylesheet"></noscript>
|
<link href="{{"css/fontawesome-all.min.css" | relURL}}{{ $assetBusting }}" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="{{"css/fontawesome-all.min.css" | relURL}}{{ $assetBusting }}" rel="stylesheet"></noscript>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $taxonomy_title := partial "pageHelper/title.hugo" (dict "page" $taxonomy_page) }}
|
{{- $taxonomy_title := partial "pageHelper/title.hugo" (dict "page" $taxonomy_page) }}
|
||||||
{{- with $term_pages }}
|
{{- with $term_pages }}
|
||||||
<div class=" taxonomy-{{ $taxonomy }} term-list cstyle {{ $style }} {{ $class }}" title="{{ $taxonomy_title }}"{{ if $color }}{{ printf " style=\"--VARIABLE-TAGS-BG-color: %s;\"" $color | safeHTMLAttr }}{{ end }}>
|
<div class="R-taxonomy taxonomy-{{ $taxonomy }} cstyle{{ with $style }} {{ . }}{{ end }}{{ with $class }} {{ . }}{{ end }}" title="{{ $taxonomy_title }}"{{ if $color }}{{ printf " style=\"--VARIABLE-TAGS-BG-color: %s;\"" $color | safeHTMLAttr }}{{ end }}>
|
||||||
{{- if $icon }}
|
{{- if $icon }}
|
||||||
<i class="{{ $icon }}"></i>
|
<i class="{{ $icon }}"></i>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -324,16 +324,16 @@ dd {
|
||||||
margin: 1.5rem 1rem 1rem 1rem;
|
margin: 1.5rem 1rem 1rem 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tags{
|
article .R-taxonomy.tags {
|
||||||
margin-left: 1rem;
|
margin-left: 1rem;
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tags.term-list ul > li ~ li:before {
|
article .R-taxonomy.tags ul > li ~ li:before {
|
||||||
content: " "
|
content: " "
|
||||||
}
|
}
|
||||||
|
|
||||||
#R-body .tags a.term-link {
|
article .R-taxonomy.tags a.term-link {
|
||||||
border-bottom-right-radius: 3px;
|
border-bottom-right-radius: 3px;
|
||||||
border-top-right-radius: 3px;
|
border-top-right-radius: 3px;
|
||||||
box-shadow: 0 1px 2px rgba( 0, 0, 0, .2 );
|
box-shadow: 0 1px 2px rgba( 0, 0, 0, .2 );
|
||||||
|
@ -347,7 +347,7 @@ dd {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
#R-body .tags a.term-link:before {
|
article .R-taxonomy.tags a.term-link:before {
|
||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-width: 1em 1em 1em 0;
|
border-width: 1em 1em 1em 0;
|
||||||
|
@ -359,7 +359,7 @@ dd {
|
||||||
width: 0;
|
width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#R-body .tags a.term-link:after {
|
article .R-taxonomy.tags a.term-link:after {
|
||||||
border-radius: 100%;
|
border-radius: 100%;
|
||||||
content: "";
|
content: "";
|
||||||
left: 1px;
|
left: 1px;
|
||||||
|
@ -369,7 +369,7 @@ dd {
|
||||||
width: 5px;
|
width: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#R-body .tags a.term-link:hover:after {
|
article .R-taxonomy.tags a.term-link:hover:after {
|
||||||
width: 5px;
|
width: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -526,52 +526,51 @@ article a:focus > img:only-child:empty{
|
||||||
max-width: calc( var(--INTERNAL-MAIN-WIDTH-MAX) - var(--INTERNAL-MENU-WIDTH-L) - 2 * 3.25rem );
|
max-width: calc( var(--INTERNAL-MAIN-WIDTH-MAX) - var(--INTERNAL-MENU-WIDTH-L) - 2 * 3.25rem );
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
body:not(.print) #R-body .narrow .flex-block-wrapper {
|
body:not(.print) #R-body .flex-block-wrapper:has(> article.narrow ) {
|
||||||
max-width: calc( var(--INTERNAL-MAIN-WIDTH-MAX) - var(--INTERNAL-MENU-WIDTH-L) - 2 * 9.75rem );
|
max-width: calc( var(--INTERNAL-MAIN-WIDTH-MAX) - var(--INTERNAL-MENU-WIDTH-L) - 2 * 9.75rem );
|
||||||
}
|
}
|
||||||
/* we limit width if we have large screens */
|
/* we limit width if we have large screens */
|
||||||
body.main-width-max #R-body .flex-block-wrapper {
|
body.main-width-max #R-body .flex-block-wrapper {
|
||||||
width: calc( var(--INTERNAL-MAIN-WIDTH-MAX) - var(--INTERNAL-MENU-WIDTH-L) - 2 * 3.25rem );
|
width: calc( var(--INTERNAL-MAIN-WIDTH-MAX) - var(--INTERNAL-MENU-WIDTH-L) - 2 * 3.25rem );
|
||||||
}
|
}
|
||||||
body.main-width-max:not(.print) #R-body .narrow .flex-block-wrapper {
|
body.main-width-max:not(.print) #R-body .flex-block-wrapper:has(> article.narrow ) {
|
||||||
width: calc( var(--INTERNAL-MAIN-WIDTH-MAX) - var(--INTERNAL-MENU-WIDTH-L) - 2 * 9.75rem );
|
width: calc( var(--INTERNAL-MAIN-WIDTH-MAX) - var(--INTERNAL-MENU-WIDTH-L) - 2 * 9.75rem );
|
||||||
}
|
}
|
||||||
|
|
||||||
body:not(.print) #R-body-inner.narrow {
|
body:not(.print) #R-body-inner:has(> .flex-block-wrapper > article.narrow ) {
|
||||||
padding: 0 9.75rem 2rem 9.75rem;
|
padding: 0 9.75rem 2rem 9.75rem;
|
||||||
}
|
}
|
||||||
@media screen and (max-width: 59.999rem) {
|
@media screen and (max-width: 59.999rem) {
|
||||||
body:not(.print) #R-body-inner.narrow {
|
body:not(.print) #R-body-inner:has(> .flex-block-wrapper > article.narrow ) {
|
||||||
padding: 0 6.5rem 1rem 6.5rem;
|
padding: 0 6.5rem 1rem 6.5rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media screen and (max-width: 47.999rem) {
|
@media screen and (max-width: 47.999rem) {
|
||||||
body:not(.print) #R-body-inner.narrow {
|
body:not(.print) #R-body-inner:has(> .flex-block-wrapper > article.narrow ) {
|
||||||
padding: 0 3.25rem .375rem 3.25rem;
|
padding: 0 3.25rem .375rem 3.25rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#R-body-inner div.article-subheading,
|
#R-body-inner > .flex-block-wrapper > article > .article-subheading {
|
||||||
#R-body-inner .chapter.deprecated h3:first-of-type {
|
|
||||||
font-weight: 200;
|
font-weight: 200;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
body:not(.print) #R-body-inner.narrow div.article-subheading{
|
body:not(.print) #R-body-inner > .flex-block-wrapper > article.narrow > .article-subheading {
|
||||||
margin-top: 2rem;
|
margin-top: 2rem;
|
||||||
}
|
}
|
||||||
@media screen and (max-width: 59.999rem) {
|
@media screen and (max-width: 59.999rem) {
|
||||||
body:not(.print) #R-body-inner.narrow div.article-subheading{
|
body:not(.print) #R-body-inner > .flex-block-wrapper > article.narrow > .article-subheading {
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media screen and (max-width: 47.999rem) {
|
@media screen and (max-width: 47.999rem) {
|
||||||
body:not(.print) #R-body-inner.narrow div.article-subheading{
|
body:not(.print) #R-body-inner > .flex-block-wrapper > article.narrow > .article-subheading {
|
||||||
margin-top: .375rem;
|
margin-top: .375rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
body:not(.print) #R-body-inner.narrow p {
|
body:not(.print) #R-body-inner > .flex-block-wrapper > article.narrow p {
|
||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
}
|
}
|
||||||
|
@ -618,17 +617,17 @@ h1 {
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
body:not(.print) #R-body-inner.narrow h1 {
|
body:not(.print) #R-body-inner > .flex-block-wrapper > article.narrow h1 {
|
||||||
border-bottom: 4px solid rgba( 134, 134, 134, .125 );
|
border-bottom: 4px solid rgba( 134, 134, 134, .125 );
|
||||||
font-size: 3.5rem;
|
font-size: 3.5rem;
|
||||||
}
|
}
|
||||||
@media only screen and (min-width: 48rem) and (max-width: 59.999rem) {
|
@media only screen and (min-width: 48rem) and (max-width: 59.999rem) {
|
||||||
body:not(.print) #R-body-inner.narrow h1 {
|
body:not(.print) #R-body-inner > .flex-block-wrapper > article.narrow h1 {
|
||||||
font-size: 2.8rem;
|
font-size: 2.8rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media only screen and (max-width: 47.999rem) {
|
@media only screen and (max-width: 47.999rem) {
|
||||||
body:not(.print) #R-body-inner.narrow h1 {
|
body:not(.print) #R-body-inner > .flex-block-wrapper > article.narrow h1 {
|
||||||
font-size: 2.5rem;
|
font-size: 2.5rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2382,16 +2381,16 @@ html[dir="rtl"] #R-sidebar ul.collapsible-menu > li > label > i.fa-chevron-right
|
||||||
padding-top: 1rem;
|
padding-top: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.term-list ul,
|
article .R-taxonomy ul,
|
||||||
.term-list li {
|
article .R-taxonomy li {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
display: inline;
|
display: inline;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
.term-list i ~ ul > li:before{
|
article .R-taxonomy i ~ ul > li:before{
|
||||||
content: " "
|
content: " "
|
||||||
}
|
}
|
||||||
.term-list ul > li ~ li:before {
|
article .R-taxonomy ul > li ~ li:before {
|
||||||
content: " | "
|
content: " | "
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue