mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
theme: remove comment quirk in templates
This commit is contained in:
parent
4f4def25bc
commit
b2a91ca5cc
10 changed files with 13 additions and 13 deletions
|
@ -149,4 +149,4 @@
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{ $c | safeHTML }}
|
{{- $c | safeHTML }}
|
|
@ -19,7 +19,7 @@
|
||||||
<h2 id="{{ $capital | plainify | anchorize }}">{{ $capital }}</h2>
|
<h2 id="{{ $capital | plainify | anchorize }}">{{ $capital }}</h2>
|
||||||
<ul class="columnize">
|
<ul class="columnize">
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $c:=""}}{{/* display terms of a taxonomy */}}
|
{{- /* display terms of a taxonomy */}}
|
||||||
<li><a href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .Page) }}">{{ .Title }}</a> ({{ .Count }})</li>
|
<li><a href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .Page) }}">{{ .Title }}</a> ({{ .Count }})</li>
|
||||||
{{- $lastCapital = $capital }}
|
{{- $lastCapital = $capital }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<h2 id="{{ $capital | plainify | anchorize }}">{{ $capital }}</h2>
|
<h2 id="{{ $capital | plainify | anchorize }}">{{ $capital }}</h2>
|
||||||
<ul class="columnize">
|
<ul class="columnize">
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $c:=""}}{{/* display pages of a term */}}
|
{{- /* display pages of a term */}}
|
||||||
{{- $breadcrumb := "" }}
|
{{- $breadcrumb := "" }}
|
||||||
{{- if (ne .Page.Site.Params.disableTermBreadcrumbs true) }}
|
{{- if (ne .Page.Site.Params.disableTermBreadcrumbs true) }}
|
||||||
{{- $breadcrumb = (trim ((partial "breadcrumbs.html" (dict "page" .Page "dirOnly" true)) | plainify | htmlUnescape) "\n\r\t ") }}
|
{{- $breadcrumb = (trim ((partial "breadcrumbs.html" (dict "page" .Page "dirOnly" true)) | plainify | htmlUnescape) "\n\r\t ") }}
|
||||||
|
|
|
@ -8,15 +8,15 @@
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $url = replace $url "//" "/" }}
|
{{- $url = replace $url "//" "/" }}
|
||||||
{{- with site.Home.GetPage $url }}
|
{{- with site.Home.GetPage $url }}
|
||||||
{{- $c := "" }}{{/* if defaultContentLanguageInSubdir=false we are ending here for home page of the default language */}}
|
{{- /* if defaultContentLanguageInSubdir=false we are ending here for home page of the default language */}}
|
||||||
{{- $url = partial "relLangPrettyUglyURL.hugo" (dict "to" .) }}
|
{{- $url = partial "relLangPrettyUglyURL.hugo" (dict "to" .) }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{- $url_alt := replaceRE "^/[^/]*(/.*)" "${1}" $url }}
|
{{- $url_alt := replaceRE "^/[^/]*(/.*)" "${1}" $url }}
|
||||||
{{- with site.Home.GetPage $url_alt }}
|
{{- with site.Home.GetPage $url_alt }}
|
||||||
{{- $c := "" }}{{/* if defaultContentLanguageInSubdir=true we are ending here for home page */}}
|
{{- /* if defaultContentLanguageInSubdir=true we are ending here for home page */}}
|
||||||
{{- $url = partial "relLangPrettyUglyURL.hugo" (dict "to" .) }}
|
{{- $url = partial "relLangPrettyUglyURL.hugo" (dict "to" .) }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{- $c := "" }}{{/* for regular aliases we are ending here with no original page found */}}
|
{{- /* for regular aliases we are ending here with no original page found */}}
|
||||||
{{- $url = partial "relLangPrettyUglyURL.hugo" (dict "link" $url) }}
|
{{- $url = partial "relLangPrettyUglyURL.hugo" (dict "link" $url) }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
{{- $c:=""}}{{/* to avoid that user swiping to the left leaves a gap on the right side, we set minimum-scale, even if not advised to */}}
|
{{- /* to avoid that user swiping to the left leaves a gap on the right side, we set minimum-scale, even if not advised to */}}
|
||||||
<meta name="viewport" content="height=device-height, width=device-width, initial-scale=1.0, minimum-scale=1.0">
|
<meta name="viewport" content="height=device-height, width=device-width, initial-scale=1.0, minimum-scale=1.0">
|
||||||
{{- if (ne .Site.Params.disableGeneratorVersion true) }}
|
{{- if (ne .Site.Params.disableGeneratorVersion true) }}
|
||||||
{{- $gen := hugo.Generator }}
|
{{- $gen := hugo.Generator }}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
{{- $content := "" }}
|
{{- $content := "" }}
|
||||||
{{- $url := partial "relLangPrettyUglyURL.hugo" (dict "to" $page) }}
|
{{- $url := partial "relLangPrettyUglyURL.hugo" (dict "to" $page) }}
|
||||||
{{- if $url }}
|
{{- if $url }}
|
||||||
{{- $c:=""}}{{/* 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 */}}
|
{{- /* 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 }}
|
{{- $link_prefix := strings.TrimRight "/" $page.RelPermalink }}
|
||||||
{{- $content = partial "output-partial.hugo" (dict "base" "content" "page" $page "parameter" $page "outputFormat" $outputFormat) }}
|
{{- $content = partial "output-partial.hugo" (dict "base" "content" "page" $page "parameter" $page "outputFormat" $outputFormat) }}
|
||||||
{{- $content = replaceRE "((?:src|href)\\s*=(?:\\s*[\"']\\s*)?)(\\.[^\"'\\s>]*|[\\w]+[^\"'\\s>:]*)([\"'\\s>])" (printf "${1}%s/${2}${3}" $link_prefix) $content }}
|
{{- $content = replaceRE "((?:src|href)\\s*=(?:\\s*[\"']\\s*)?)(\\.[^\"'\\s>]*|[\\w]+[^\"'\\s>:]*)([\"'\\s>])" (printf "${1}%s/${2}${3}" $link_prefix) $content }}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{{- range .Data.Terms }}
|
{{- range .Data.Terms }}
|
||||||
{{- $count := 0 }}
|
{{- $count := 0 }}
|
||||||
{{- range .Pages }}
|
{{- range .Pages }}
|
||||||
{{- $c:=""}}{{/* count pages of term */}}
|
{{- /* count pages of term */}}
|
||||||
{{- if and .Title .RelPermalink (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableTagHiddenPages true) ) }}
|
{{- if and .Title .RelPermalink (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableTagHiddenPages true) ) }}
|
||||||
{{- $count = add $count 1 }}
|
{{- $count = add $count 1 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
{{- $fileLink = strings.TrimPrefix "content/" $fileLink }}
|
{{- $fileLink = strings.TrimPrefix "content/" $fileLink }}
|
||||||
{{- $filesName := printf "%s.files" .File.BaseFileName }}
|
{{- $filesName := printf "%s.files" .File.BaseFileName }}
|
||||||
{{- if and (eq .File.BaseFileName "index") (fileExists (printf "%sfiles" $fileDir)) }}
|
{{- if and (eq .File.BaseFileName "index") (fileExists (printf "%sfiles" $fileDir)) }}
|
||||||
{{- $c := "" }}{{/* backward compat to < 5.9.0 behavior */}}
|
{{- /* backward compat to < 5.9.0 behavior */}}
|
||||||
{{- $filesName = "files" }}
|
{{- $filesName = "files" }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $dir := printf "%s%s" $fileDir $filesName }}
|
{{- $dir := printf "%s%s" $fileDir $filesName }}
|
||||||
|
@ -71,7 +71,7 @@
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $unitsymbol := $unit | T }}
|
{{- $unitsymbol := $unit | T }}
|
||||||
{{- $link := (printf "%s%s/%s" $fileLink $filesName .Name) | relLangURL }}
|
{{- $link := (printf "%s%s/%s" $fileLink $filesName .Name) | relLangURL }}
|
||||||
{{- $c := "" }}{{/* Hugo stores the attachments always in the default language subdirectory */}}
|
{{- /* Hugo stores the attachments always in the default language subdirectory */}}
|
||||||
{{- $link = replace $link $urlPrefix $defaultUrlPrefix 1 }}
|
{{- $link = replace $link $urlPrefix $defaultUrlPrefix 1 }}
|
||||||
<li><a href="{{ $link }}">{{.Name}}</a> ({{$size}} {{$unitsymbol}})</li>
|
<li><a href="{{ $link }}">{{.Name}}</a> ({{$size}} {{$unitsymbol}})</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with $page }}
|
{{- with $page }}
|
||||||
{{- $assetBusting := not .Site.Params.disableAssetsBusting }}
|
{{- $assetBusting := not .Site.Params.disableAssetsBusting }}
|
||||||
{{ "<!-- https://github.com/filamentgroup/loadCSS/blob/master/README.md#how-to-use -->" | safeHTML }}
|
{{- /* https://github.com/filamentgroup/loadCSS/blob/master/README.md#how-to-use */}}
|
||||||
<link href="{{"css/fontawesome-all.min.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="{{"css/fontawesome-all.min.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet"></noscript>
|
<link href="{{"css/fontawesome-all.min.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="{{"css/fontawesome-all.min.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet"></noscript>
|
||||||
<link href="{{"css/nucleus.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
|
<link href="{{"css/nucleus.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
|
||||||
<link href="{{"css/auto-complete.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="{{"css/auto-complete.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet"></noscript>
|
<link href="{{"css/auto-complete.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="{{"css/auto-complete.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet"></noscript>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
{{- if .Parent }}
|
{{- if .Parent }}
|
||||||
{{- $.Parent.Scratch.Set "tabs" $tabs }}
|
{{- $.Parent.Scratch.Set "tabs" $tabs }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{- $c:=""}}{{/* if no containing tabs shortcode is present, we display this tab as single */}}
|
{{- /* if no containing tabs shortcode is present, we display this tab as single */}}
|
||||||
{{- partial "shortcodes/tabs.html" (dict
|
{{- partial "shortcodes/tabs.html" (dict
|
||||||
"page" .Page
|
"page" .Page
|
||||||
"color" ""
|
"color" ""
|
||||||
|
|
Loading…
Reference in a new issue