theme: remove comment quirk in templates

This commit is contained in:
Sören Weber 2024-04-24 23:05:13 +02:00
parent 4f4def25bc
commit b2a91ca5cc
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
10 changed files with 13 additions and 13 deletions

View file

@ -149,4 +149,4 @@
{{- end }}
{{- end }}
{{- end }}
{{ $c | safeHTML }}
{{- $c | safeHTML }}

View file

@ -19,7 +19,7 @@
<h2 id="{{ $capital | plainify | anchorize }}">{{ $capital }}</h2>
<ul class="columnize">
{{- 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>
{{- $lastCapital = $capital }}
{{- end }}

View file

@ -19,7 +19,7 @@
<h2 id="{{ $capital | plainify | anchorize }}">{{ $capital }}</h2>
<ul class="columnize">
{{- end }}
{{- $c:=""}}{{/* display pages of a term */}}
{{- /* 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 ") }}

View file

@ -8,15 +8,15 @@
{{- end }}
{{- $url = replace $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" .) }}
{{- else }}
{{- $url_alt := replaceRE "^/[^/]*(/.*)" "${1}" $url }}
{{- 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" .) }}
{{- 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) }}
{{- end }}
{{- end }}

View file

@ -1,6 +1,6 @@
<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">
{{- if (ne .Site.Params.disableGeneratorVersion true) }}
{{- $gen := hugo.Generator }}

View file

@ -3,7 +3,7 @@
{{- $content := "" }}
{{- $url := partial "relLangPrettyUglyURL.hugo" (dict "to" $page) }}
{{- 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 }}
{{- $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 }}

View file

@ -2,7 +2,7 @@
{{- range .Data.Terms }}
{{- $count := 0 }}
{{- 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) ) }}
{{- $count = add $count 1 }}
{{- end }}

View file

@ -52,7 +52,7 @@
{{- $fileLink = strings.TrimPrefix "content/" $fileLink }}
{{- $filesName := printf "%s.files" .File.BaseFileName }}
{{- 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" }}
{{- end }}
{{- $dir := printf "%s%s" $fileDir $filesName }}
@ -71,7 +71,7 @@
{{- end }}
{{- $unitsymbol := $unit | T }}
{{- $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 }}
<li><a href="{{ $link }}">{{.Name}}</a> ({{$size}} {{$unitsymbol}})</li>
{{- end }}

View file

@ -6,7 +6,7 @@
{{- end }}
{{- with $page }}
{{- $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/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>

View file

@ -20,7 +20,7 @@
{{- if .Parent }}
{{- $.Parent.Scratch.Set "tabs" $tabs }}
{{- 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
"page" .Page
"color" ""