mirror of
				https://github.com/Wonderfall/hugo-WonderMod.git
				synced 2025-10-31 03:45:24 +01:00 
			
		
		
		
	Fix Spacing in overall repo
This commit is contained in:
		| @@ -1,3 +1,3 @@ | |||||||
| {{ define "main" }} | {{- define "main" }} | ||||||
| <div class="not-found">404</div> | <div class="not-found">404</div> | ||||||
| {{ end  }}{{/* end main */}} | {{- end }}{{/* end main */ -}} | ||||||
|   | |||||||
| @@ -20,7 +20,7 @@ | |||||||
|   <div class="archive-month"> |   <div class="archive-month"> | ||||||
|     <h3 class="archive-month-header">{{- .Key }}<sup class="archive-count">  {{ len .Pages }}</sup></h3> |     <h3 class="archive-month-header">{{- .Key }}<sup class="archive-count">  {{ len .Pages }}</sup></h3> | ||||||
|     <div class="archive-posts"> |     <div class="archive-posts"> | ||||||
|       {{- range .Pages  }} |       {{- range .Pages }} | ||||||
|       {{- if eq .Kind "page" }} |       {{- if eq .Kind "page" }} | ||||||
|       <div class="archive-entry"> |       <div class="archive-entry"> | ||||||
|         <h3 class="archive-entry-title"> |         <h3 class="archive-entry-title"> | ||||||
| @@ -40,4 +40,4 @@ | |||||||
| {{- end }} | {{- end }} | ||||||
| {{- end }} | {{- end }} | ||||||
|  |  | ||||||
| {{- end  }}{{/* end main */}} | {{- end }}{{/* end main */}} | ||||||
|   | |||||||
| @@ -13,12 +13,11 @@ | |||||||
| {{- print " dark" }} | {{- print " dark" }} | ||||||
| {{- end -}} | {{- end -}} | ||||||
| " id="top"> | " id="top"> | ||||||
|     {{- partialCached "header.html" . .Page}} |     {{- partialCached "header.html" . .Page -}} | ||||||
|     <main class="main"> |     <main class="main"> | ||||||
|         {{- block "main" . }} |         {{- block "main" . }}{{ end }} | ||||||
|         {{- end }} |  | ||||||
|     </main> |     </main> | ||||||
|     {{- partialCached "footer.html" . .Type .Layout .Params }} |     {{ partialCached "footer.html" . .Type .Layout .Params -}} | ||||||
| </body> | </body> | ||||||
|  |  | ||||||
| </html> | </html> | ||||||
|   | |||||||
| @@ -20,15 +20,15 @@ | |||||||
|  |  | ||||||
| {{- if .IsHome }} | {{- if .IsHome }} | ||||||
| {{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }} | {{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }} | ||||||
| {{- end}} | {{- end }} | ||||||
|  |  | ||||||
| {{ $paginator := .Paginate $pages }} | {{- $paginator := .Paginate $pages }} | ||||||
|  |  | ||||||
| {{- if and .IsHome .Site.Params.homeInfoParams (eq $paginator.PageNumber 1) }} | {{- if and .IsHome .Site.Params.homeInfoParams (eq $paginator.PageNumber 1) }} | ||||||
| {{- partial "home_info.html" . }} | {{- partial "home_info.html" . }} | ||||||
| {{- end }} | {{- end }} | ||||||
|  |  | ||||||
| {{ $term := .Data.Term}} | {{- $term := .Data.Term }} | ||||||
| {{- range $index, $page := $paginator.Pages }} | {{- range $index, $page := $paginator.Pages }} | ||||||
|  |  | ||||||
| {{- $class := "post-entry" }} | {{- $class := "post-entry" }} | ||||||
| @@ -41,17 +41,17 @@ | |||||||
| {{- end }} | {{- end }} | ||||||
|  |  | ||||||
| <article class="{{ $class }}"> | <article class="{{ $class }}"> | ||||||
|   {{- $isHidden := (.Site.Params.cover.hidden | default .Site.Params.cover.hiddenInList)}} |   {{- $isHidden := (.Site.Params.cover.hidden | default .Site.Params.cover.hiddenInList) }} | ||||||
|   {{- partial "cover.html" (dict "cxt" . "IsHome" true "isHidden" $isHidden) }} |   {{- partial "cover.html" (dict "cxt" . "IsHome" true "isHidden" $isHidden) }} | ||||||
|   <header class="entry-header"> |   <header class="entry-header"> | ||||||
|     <h2> |     <h2> | ||||||
|       {{ .Title }} |       {{- .Title }} | ||||||
|       {{- if .Draft }}<div class="entry-isdraft"><sup>  [draft]</sup></div>{{- end }} |       {{- if .Draft }}<div class="entry-isdraft"><sup>  [draft]</sup></div>{{ end -}} | ||||||
|     </h2> |     </h2> | ||||||
|   </header> |   </header> | ||||||
|   {{- if (ne (.Param "hideSummary") true)}} |   {{- if (ne (.Param "hideSummary") true) }} | ||||||
|   <section class="entry-content"> |   <section class="entry-content"> | ||||||
|     <p>{{ .Summary | plainify | htmlUnescape }}{{- if .Truncated }}...{{- end -}}</p> |     <p>{{ .Summary | plainify | htmlUnescape }}{{ if .Truncated }}...{{ end }}</p> | ||||||
|   </section> |   </section> | ||||||
|   {{- end }} |   {{- end }} | ||||||
|   {{- if not (.Param "hideMeta") }} |   {{- if not (.Param "hideMeta") }} | ||||||
| @@ -75,5 +75,7 @@ | |||||||
|   </nav> |   </nav> | ||||||
| </footer> | </footer> | ||||||
| {{- end }} | {{- end }} | ||||||
| {{end}}{{/* end profileMode */}} |  | ||||||
|  | {{- end }}{{/* end profileMode */}} | ||||||
|  |  | ||||||
| {{- end }}{{- /* end main */ -}} | {{- end }}{{- /* end main */ -}} | ||||||
|   | |||||||
| @@ -17,11 +17,11 @@ | |||||||
|     <div class="post-meta"> |     <div class="post-meta"> | ||||||
|         {{- partial "translation_list.html" . -}} |         {{- partial "translation_list.html" . -}} | ||||||
|     </div> |     </div> | ||||||
|     {{- end}} |     {{- end }} | ||||||
| </header> | </header> | ||||||
|  |  | ||||||
| <div id="searchbox"> | <div id="searchbox"> | ||||||
|     <input id="searchInput" autofocus placeholder="{{.Title}} ↵" aria-label="search" type="search"> |     <input id="searchInput" autofocus placeholder="{{ .Title }} ↵" aria-label="search" type="search"> | ||||||
|     <ul id="searchResults" aria-label="search results"></ul> |     <ul id="searchResults" aria-label="search results"></ul> | ||||||
| </div> | </div> | ||||||
|  |  | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
| <article class="post-single"> | <article class="post-single"> | ||||||
|   <header class="post-header"> |   <header class="post-header"> | ||||||
|     {{- partial "breadcrumbs.html" . }} |     {{ partial "breadcrumbs.html" . }} | ||||||
|     <h1 class="post-title"> |     <h1 class="post-title"> | ||||||
|       {{ .Title }} |       {{ .Title }} | ||||||
|       {{- if .Draft }}<div class="entry-isdraft"><sup>  [draft]</sup></div>{{- end }} |       {{- if .Draft }}<div class="entry-isdraft"><sup>  [draft]</sup></div>{{- end }} | ||||||
| @@ -14,13 +14,13 @@ | |||||||
|     {{- end }} |     {{- end }} | ||||||
|     {{- if not (.Param "hideMeta") }} |     {{- if not (.Param "hideMeta") }} | ||||||
|     <div class="post-meta"> |     <div class="post-meta"> | ||||||
|       {{- partial "post_meta.html" .  -}} |       {{- partial "post_meta.html" . -}} | ||||||
|       {{- partial "translation_list.html" . -}} |       {{- partial "translation_list.html" . -}} | ||||||
|       {{- partial "edit_post.html" . -}} |       {{- partial "edit_post.html" . -}} | ||||||
|     </div> |     </div> | ||||||
|     {{- end}} |     {{- end }} | ||||||
|   </header> |   </header> | ||||||
|   {{- $isHidden := .Params.cover.hidden | default .Site.Params.cover.hiddenInSingle | default .Site.Params.cover.hidden}} |   {{- $isHidden := .Params.cover.hidden | default .Site.Params.cover.hiddenInSingle | default .Site.Params.cover.hidden }} | ||||||
|   {{- partial "cover.html" (dict "cxt" . "IsHome" false "isHidden" $isHidden) }} |   {{- partial "cover.html" (dict "cxt" . "IsHome" false "isHidden" $isHidden) }} | ||||||
|   {{- if (.Param "ShowToc") }} |   {{- if (.Param "ShowToc") }} | ||||||
|   {{- partial "toc.html" . }} |   {{- partial "toc.html" . }} | ||||||
| @@ -41,24 +41,24 @@ | |||||||
|     {{- if and (gt (len $pages) 1) (in $pages . ) }} |     {{- if and (gt (len $pages) 1) (in $pages . ) }} | ||||||
|     <nav class="paginav"> |     <nav class="paginav"> | ||||||
|       {{- with $pages.Next . }} |       {{- with $pages.Next . }} | ||||||
|       <a class="prev" href="{{.Permalink}}"> |       <a class="prev" href="{{ .Permalink }}"> | ||||||
|         <span class="title">« {{ i18n "prev_page" }}</span> |         <span class="title">« {{ i18n "prev_page" }}</span> | ||||||
|         <br> |         <br> | ||||||
|         <span>{{- .Name -}}</span> |         <span>{{- .Name -}}</span> | ||||||
|       </a> |       </a> | ||||||
|       {{- end}} |       {{- end }} | ||||||
|       {{- with $pages.Prev . }} |       {{- with $pages.Prev . }} | ||||||
|       <a class="next" href="{{.Permalink}}"> |       <a class="next" href="{{ .Permalink }}"> | ||||||
|         <span class="title">{{ i18n "next_page" }} »</span> |         <span class="title">{{ i18n "next_page" }} »</span> | ||||||
|         <br> |         <br> | ||||||
|         <span>{{- .Name -}}</span> |         <span>{{- .Name -}}</span> | ||||||
|       </a> |       </a> | ||||||
|       {{- end}} |       {{- end }} | ||||||
|     </nav> |     </nav> | ||||||
|     {{- end }} |     {{- end }} | ||||||
|     {{- end }} |     {{- end }} | ||||||
|     {{- if (and .Site.Params.ShowShareButtons (ne .Params.disableShare true) ) }} |     {{- if (and .Site.Params.ShowShareButtons (ne .Params.disableShare true)) }} | ||||||
|     {{- partial "share_icons.html" . }} |     {{- partial "share_icons.html" . -}} | ||||||
|     {{- end }} |     {{- end }} | ||||||
|   </footer> |   </footer> | ||||||
|  |  | ||||||
| @@ -67,4 +67,4 @@ | |||||||
|   {{- end }} |   {{- end }} | ||||||
| </article> | </article> | ||||||
|  |  | ||||||
| {{- end  }}{{/* end main */}} | {{- end }}{{/* end main */}} | ||||||
|   | |||||||
| @@ -1,4 +1,4 @@ | |||||||
| {{ define "main" }} | {{- define "main" }} | ||||||
|  |  | ||||||
| {{- if .Title }} | {{- if .Title }} | ||||||
| <header class="page-header"> | <header class="page-header"> | ||||||
| @@ -24,4 +24,4 @@ | |||||||
|     {{- end }} |     {{- end }} | ||||||
| </ul> | </ul> | ||||||
|  |  | ||||||
| {{ end  }}{{/* end main */}} | {{- end }}{{/* end main */ -}} | ||||||
|   | |||||||
| @@ -1,2 +1,2 @@ | |||||||
| <!-- formats .Content headings by adding an anchor --> | {{- /* formats .Content headings by adding an anchor */ -}} | ||||||
| {{ . | replaceRE "(<h[1-6] id=\"([^\"]+)\".+)(</h[1-6]+>)" "${1}<a hidden class=\"anchor\" aria-hidden=\"true\" href=\"#${2}\">#</a>${3}" | safeHTML }} | {{ . | replaceRE "(<h[1-6] id=\"([^\"]+)\".+)(</h[1-6]+>)" "${1}<a hidden class=\"anchor\" aria-hidden=\"true\" href=\"#${2}\">#</a>${3}" | safeHTML }} | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| {{- if or .Params.author .Site.Params.author }} | {{- if or .Params.author .Site.Params.author }} | ||||||
| {{- $author := (.Params.author | default .Site.Params.author)}} | {{- $author := (.Params.author | default .Site.Params.author) }} | ||||||
| {{- $author_type := (printf "%T" $author) }} | {{- $author_type := (printf "%T" $author) }} | ||||||
| {{- if (or (eq $author_type "[]string") (eq $author_type "[]interface {}") ) }} | {{- if (or (eq $author_type "[]string") (eq $author_type "[]interface {}")) }} | ||||||
| {{- (delimit $author ", " ) }} | {{- (delimit $author ", " ) }} | ||||||
| {{- else }} | {{- else }} | ||||||
| {{- $author }} | {{- $author }} | ||||||
|   | |||||||
| @@ -1,9 +1,9 @@ | |||||||
| {{- if (.Param "ShowBreadCrumbs")}} | {{- if (.Param "ShowBreadCrumbs") -}} | ||||||
| <div class="breadcrumbs"> | <div class="breadcrumbs"> | ||||||
|     {{- $url := replace .Parent.Permalink ( printf "%s" .Site.BaseURL) "" }} |     {{- $url := replace .Parent.Permalink (printf "%s" .Site.BaseURL) "" }} | ||||||
|     {{- $lang_url := strings.TrimPrefix ( printf "%s/" .Lang) $url }} |     {{- $lang_url := strings.TrimPrefix (printf "%s/" .Lang) $url -}} | ||||||
|  |  | ||||||
|     <a href="{{ "" | absLangURL }}">{{ i18n "home" | default "Home"}}</a> |     <a href="{{ "" | absLangURL }}">{{ i18n "home" | default "Home" }}</a> | ||||||
|     {{- $scratch := newScratch }} |     {{- $scratch := newScratch }} | ||||||
|     {{- range $index, $element := split $lang_url "/" }} |     {{- range $index, $element := split $lang_url "/" }} | ||||||
|  |  | ||||||
| @@ -14,6 +14,6 @@ | |||||||
|     {{- print " » " | safeHTML -}}<a href="{{ $bc_pg.Permalink }}">{{ $bc_pg.Name }}</a> |     {{- print " » " | safeHTML -}}<a href="{{ $bc_pg.Permalink }}">{{ $bc_pg.Name }}</a> | ||||||
|     {{- end }} |     {{- end }} | ||||||
|  |  | ||||||
|     {{- end }} |     {{- end -}} | ||||||
| </div> | </div> | ||||||
| {{- end }} | {{- end -}} | ||||||
|   | |||||||
| @@ -1,5 +1,3 @@ | |||||||
| <!-- Comments area start --> | {{- /* Comments area start */ -}} | ||||||
| <!-- | {{- /* to add comments read => https://gohugo.io/content-management/comments/ */ -}} | ||||||
| to add comments read => https://gohugo.io/content-management/comments/ | {{- /* Comments area end */ -}} | ||||||
| --> |  | ||||||
| <!-- Comments area end --> |  | ||||||
|   | |||||||
| @@ -32,4 +32,4 @@ | |||||||
|     {{- end }} |     {{- end }} | ||||||
| </figure> | </figure> | ||||||
| {{- end }}{{/* End image */}} | {{- end }}{{/* End image */}} | ||||||
| {{- end -}}{{/* End context */}} | {{- end -}}{{/* End context */ -}} | ||||||
|   | |||||||
| @@ -1,7 +1,8 @@ | |||||||
| {{- if or .Params.editPost.URL .Site.Params.editPost.URL -}} | {{- if or .Params.editPost.URL .Site.Params.editPost.URL -}} | ||||||
| {{- $fileUrlPath := path.Join .File.Path }} | {{- $fileUrlPath := path.Join .File.Path }} | ||||||
| {{- if or .Params.author $.Site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated }}| {{- end -}} |  | ||||||
|  | {{- if or .Params.author $.Site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated }} | {{- end -}} | ||||||
| <a href="{{ .Params.editPost.URL | default .Site.Params.editPost.URL }}{{ if .Params.editPost.appendFilePath | default ( .Site.Params.editPost.appendFilePath | default false ) }}/{{ $fileUrlPath }}{{ end }}" rel="noopener noreferrer" target="_blank"> | <a href="{{ .Params.editPost.URL | default .Site.Params.editPost.URL }}{{ if .Params.editPost.appendFilePath | default ( .Site.Params.editPost.appendFilePath | default false ) }}/{{ $fileUrlPath }}{{ end }}" rel="noopener noreferrer" target="_blank"> | ||||||
|     {{- .Params.editPost.Text | default (.Site.Params.editPost.Text | default (i18n "edit_post" | default "Edit") ) -}} |     {{- .Params.editPost.Text | default (.Site.Params.editPost.Text | default (i18n "edit_post" | default "Edit")) -}} | ||||||
| </a> | </a> | ||||||
| {{- end }} | {{- end }} | ||||||
|   | |||||||
| @@ -1,5 +1,3 @@ | |||||||
| <!-- Footer custom content area start --> | {{- /* Footer custom content area start */ -}} | ||||||
| <!-- | {{- /*     Insert any custom code web-analytics, resources, etc. here */ -}} | ||||||
| Insert any custom code web-analytics, resources, etc. here | {{- /* Footer custom content area end */ -}} | ||||||
| --> |  | ||||||
| <!-- Footer custom content area end --> |  | ||||||
|   | |||||||
| @@ -1,5 +1,4 @@ | |||||||
| <!-- Head custom content area start --> | {{- /* Head custom content area start */ -}} | ||||||
| <!-- | {{- /*     Insert any custom code (web-analytics, resources, etc.) - it will appear in the <head></head> section of every page. */ -}} | ||||||
| Insert any custom code (web-analytics, resources, etc.) - it will appear in the <head></head> section of every page. Can be overwritten by partial with the same name in the global layouts. | {{- /*     Can be overwritten by partial with the same name in the global layouts. */ -}} | ||||||
| --> | {{- /* Head custom content area end */ -}} | ||||||
| <!-- Head custom content area end --> |  | ||||||
|   | |||||||
| @@ -9,6 +9,7 @@ | |||||||
|     <span>·</span> |     <span>·</span> | ||||||
|     <span>Theme <a href="https://git.io/hugopapermod" rel="noopener" target="_blank">PaperMod</a></span> |     <span>Theme <a href="https://git.io/hugopapermod" rel="noopener" target="_blank">PaperMod</a></span> | ||||||
| </footer> | </footer> | ||||||
|  |  | ||||||
| {{- if (not .Site.Params.disableScrollToTop) }} | {{- if (not .Site.Params.disableScrollToTop) }} | ||||||
| <a href="#top" aria-label="go to top" title="Go to Top (Alt + G)"> | <a href="#top" aria-label="go to top" title="Go to Top (Alt + G)"> | ||||||
|     <button class="top-link" id="top-link" type="button" accesskey="g"> |     <button class="top-link" id="top-link" type="button" accesskey="g"> | ||||||
| @@ -18,18 +19,21 @@ | |||||||
|     </button> |     </button> | ||||||
| </a> | </a> | ||||||
| {{- end }} | {{- end }} | ||||||
|  |  | ||||||
| {{- partial "extend_footer.html" . -}} | {{- partial "extend_footer.html" . -}} | ||||||
|  |  | ||||||
| {{- $isHLJSdisabled := (.Site.Params.assets.disableHLJS | default .Params.disableHLJS ) }} | {{- $isHLJSdisabled := (.Site.Params.assets.disableHLJS | default .Params.disableHLJS ) }} | ||||||
| {{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (not $isHLJSdisabled)) }} | {{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (not $isHLJSdisabled)) }} | ||||||
| {{- if not .Site.Params.assets.disableFingerprinting }} | {{- if not .Site.Params.assets.disableFingerprinting }} | ||||||
| {{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify | fingerprint }} | {{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify | fingerprint }} | ||||||
| <script defer src="{{ $highlight.RelPermalink }}" integrity="{{ $highlight.Data.Integrity }}" | <script defer src="{{ $highlight.RelPermalink }}" integrity="{{ $highlight.Data.Integrity }}" | ||||||
|     onload="hljs.initHighlightingOnLoad();"></script> |     onload="hljs.initHighlightingOnLoad();"></script> | ||||||
| {{- else}} | {{- else }} | ||||||
| {{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify }} | {{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify }} | ||||||
| <script defer src="{{ $highlight.RelPermalink }}" onload="hljs.initHighlightingOnLoad();"></script> | <script defer src="{{ $highlight.RelPermalink }}" onload="hljs.initHighlightingOnLoad();"></script> | ||||||
| {{- end}} |  | ||||||
| {{- end }} | {{- end }} | ||||||
|  | {{- end }} | ||||||
|  |  | ||||||
| <script> | <script> | ||||||
|     window.onload = function () { |     window.onload = function () { | ||||||
|         if (localStorage.getItem("menu-scroll-position")) { |         if (localStorage.getItem("menu-scroll-position")) { | ||||||
|   | |||||||
| @@ -4,11 +4,13 @@ | |||||||
| {{- if hugo.IsProduction | or (eq .Site.Params.env "production") }} | {{- if hugo.IsProduction | or (eq .Site.Params.env "production") }} | ||||||
| <meta name="robots" content="index, follow"> | <meta name="robots" content="index, follow"> | ||||||
| {{- else }} | {{- else }} | ||||||
| <meta name=" robots" content="noindex, nofollow"> | <meta name="robots" content="noindex, nofollow"> | ||||||
| {{- end -}} | {{- end }} | ||||||
| <!-- Title --> |  | ||||||
| <title>{{ if .IsHome }}{{else}}{{ if .Title }}{{ .Title }} | {{ end }}{{end}}{{ .Site.Title }}</title> | {{- /* Title */}} | ||||||
| <!-- Meta --> | <title>{{ if .IsHome }}{{ else }}{{ if .Title }}{{ .Title }} | {{ end }}{{ end }}{{ .Site.Title }}</title> | ||||||
|  |  | ||||||
|  | {{- /* Meta */}} | ||||||
| <meta name="keywords" content="{{ if .Params.keywords -}} | <meta name="keywords" content="{{ if .Params.keywords -}} | ||||||
|     {{- range $i, $e := .Params.keywords }}{{ if $i }}, {{ end }}{{ $e }}{{ end }} {{- else }} |     {{- range $i, $e := .Params.keywords }}{{ if $i }}, {{ end }}{{ $e }}{{ end }} {{- else }} | ||||||
|     {{- range $i, $e := .Params.tags }}{{ if $i }}, {{ end }}{{ $e }}{{ end }} {{- end -}}" /> |     {{- range $i, $e := .Params.tags }}{{ if $i }}, {{ end }}{{ $e }}{{ end }} {{- end -}}" /> | ||||||
| @@ -19,14 +21,15 @@ | |||||||
| <link rel="canonical" href="{{ if .Params.canonicalURL -}} {{ trim .Params.canonicalURL " " }} {{- else -}} {{ .Permalink }} {{- end }}" /> | <link rel="canonical" href="{{ if .Params.canonicalURL -}} {{ trim .Params.canonicalURL " " }} {{- else -}} {{ .Permalink }} {{- end }}" /> | ||||||
| {{- if .Site.Params.analytics.google.SiteVerificationTag }} | {{- if .Site.Params.analytics.google.SiteVerificationTag }} | ||||||
| <meta name="google-site-verification" content="{{ .Site.Params.analytics.google.SiteVerificationTag }}" /> | <meta name="google-site-verification" content="{{ .Site.Params.analytics.google.SiteVerificationTag }}" /> | ||||||
| {{- end}} | {{- end }} | ||||||
| {{- if .Site.Params.analytics.yandex.SiteVerificationTag }} | {{- if .Site.Params.analytics.yandex.SiteVerificationTag }} | ||||||
| <meta name="yandex-verification" content="{{ .Site.Params.analytics.yandex.SiteVerificationTag }}" /> | <meta name="yandex-verification" content="{{ .Site.Params.analytics.yandex.SiteVerificationTag }}" /> | ||||||
| {{- end}} | {{- end }} | ||||||
| {{- if .Site.Params.analytics.bing.SiteVerificationTag }} | {{- if .Site.Params.analytics.bing.SiteVerificationTag }} | ||||||
| <meta name="msvalidate.01" content="{{ .Site.Params.analytics.bing.SiteVerificationTag }}" /> | <meta name="msvalidate.01" content="{{ .Site.Params.analytics.bing.SiteVerificationTag }}" /> | ||||||
| {{- end}} | {{- end }} | ||||||
| <!-- Styles --> |  | ||||||
|  | {{- /* Styles */}} | ||||||
| {{- $theme_vars := (resources.Get "css/core/theme-vars.css") }} | {{- $theme_vars := (resources.Get "css/core/theme-vars.css") }} | ||||||
| {{- $reset := (resources.Get "css/core/reset.css") }} | {{- $reset := (resources.Get "css/core/reset.css") }} | ||||||
| {{- $media := (resources.Get "css/core/zmedia.css") }} | {{- $media := (resources.Get "css/core/zmedia.css") }} | ||||||
| @@ -39,18 +42,19 @@ | |||||||
| {{- /* order is important */}} | {{- /* order is important */}} | ||||||
| {{- $core := (slice $theme_vars $reset $common $hljs $media) | resources.Concat "assets/css/core.css" }} | {{- $core := (slice $theme_vars $reset $common $hljs $media) | resources.Concat "assets/css/core.css" }} | ||||||
| {{- $extended := (resources.Match "css/extended/*.css") | resources.Concat "assets/css/extended.css" }} | {{- $extended := (resources.Match "css/extended/*.css") | resources.Concat "assets/css/extended.css" }} | ||||||
| {{- /*  bundle all required css  */}} |  | ||||||
| {{- /*  Add extended css after theme style */ -}} | {{- /* bundle all required css */}} | ||||||
|  | {{- /* Add extended css after theme style */ -}} | ||||||
| {{- $stylesheet := (slice $core $extended) | resources.Concat "assets/css/stylesheet.css" | minify }} | {{- $stylesheet := (slice $core $extended) | resources.Concat "assets/css/stylesheet.css" | minify }} | ||||||
|  |  | ||||||
| {{- if not .Site.Params.assets.disableFingerprinting }} | {{- if not .Site.Params.assets.disableFingerprinting }} | ||||||
| {{- $stylesheet := $stylesheet | fingerprint -}} | {{- $stylesheet := $stylesheet | fingerprint }} | ||||||
| <link href="{{ $stylesheet.RelPermalink }}" integrity="{{ $stylesheet.Data.Integrity }}" rel="preload stylesheet" | <link href="{{ $stylesheet.RelPermalink }}" integrity="{{ $stylesheet.Data.Integrity }}" rel="preload stylesheet" as="style"> | ||||||
|     as="style"> | {{- else }} | ||||||
| {{- else}} |  | ||||||
| <link href="{{ $stylesheet.RelPermalink }}" rel="preload stylesheet" as="style"> | <link href="{{ $stylesheet.RelPermalink }}" rel="preload stylesheet" as="style"> | ||||||
| {{- end}} | {{- end }} | ||||||
| <!-- Search --> |  | ||||||
|  | {{- /* Search */}} | ||||||
| {{- if (eq .Layout `search`) -}} | {{- if (eq .Layout `search`) -}} | ||||||
| <link rel="preload" as="fetch" href="../index.json" crossOrigin="anonymous"> | <link rel="preload" as="fetch" href="../index.json" crossOrigin="anonymous"> | ||||||
| {{- $fastsearch := resources.Get "js/fastsearch.js" | resources.ExecuteAsTemplate "js/fastsearch.js" .Site.Params.fuseOpts }} | {{- $fastsearch := resources.Get "js/fastsearch.js" | resources.ExecuteAsTemplate "js/fastsearch.js" .Site.Params.fuseOpts }} | ||||||
| @@ -58,38 +62,38 @@ | |||||||
| {{- if not .Site.Params.assets.disableFingerprinting }} | {{- if not .Site.Params.assets.disableFingerprinting }} | ||||||
| {{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify | fingerprint }} | {{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify | fingerprint }} | ||||||
| <script defer src="{{ $search.RelPermalink }}" onload="loadSearch();" integrity="{{ $search.Data.Integrity }}"></script> | <script defer src="{{ $search.RelPermalink }}" onload="loadSearch();" integrity="{{ $search.Data.Integrity }}"></script> | ||||||
| {{- else}} | {{- else }} | ||||||
| {{ $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify }} | {{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify }} | ||||||
| <script defer src="{{ $search.RelPermalink }}" onload="loadSearch();"></script> | <script defer src="{{ $search.RelPermalink }}" onload="loadSearch();"></script> | ||||||
| {{- end}} | {{- end }} | ||||||
| {{- end -}} | {{- end -}} | ||||||
|  |  | ||||||
| <!-- Favicons --> | {{- /* Favicons */}} | ||||||
| <link rel="icon" href="{{- .Site.Params.assets.favicon | default "favicon.ico" | absURL -}}"> | <link rel="icon" href="{{ .Site.Params.assets.favicon | default "favicon.ico" | absURL }}"> | ||||||
| <link rel="icon" type="image/png" sizes="16x16" href=" | <link rel="icon" type="image/png" sizes="16x16" href="{{ .Site.Params.assets.favicon16x16 | default "favicon-16x16.png" | absURL }}"> | ||||||
|     {{- .Site.Params.assets.favicon16x16 | default "favicon-16x16.png" | absURL -}}"> | <link rel="icon" type="image/png" sizes="32x32" href="{{ .Site.Params.assets.favicon32x32 | default "favicon-32x32.png" | absURL }}"> | ||||||
| <link rel="icon" type="image/png" sizes="32x32" href=" | <link rel="apple-touch-icon" href="{{ .Site.Params.assets.apple_touch_icon | default "apple-touch-icon.png" | absURL }}"> | ||||||
|     {{- .Site.Params.assets.favicon32x32 | default "favicon-32x32.png" | absURL -}}"> | <link rel="mask-icon" href="{{ .Site.Params.assets.safari_pinned_tab | default "safari-pinned-tab.svg" | absURL }}"> | ||||||
| <link rel="apple-touch-icon" href=" |  | ||||||
|     {{- .Site.Params.assets.apple_touch_icon | default "apple-touch-icon.png" | absURL -}}"> |  | ||||||
| <link rel="mask-icon" href="{{- .Site.Params.assets.safari_pinned_tab | default "safari-pinned-tab.svg" | absURL -}}"> |  | ||||||
| <meta name="theme-color" content="#2e2e33"> | <meta name="theme-color" content="#2e2e33"> | ||||||
| <meta name="msapplication-TileColor" content="#2e2e33"> | <meta name="msapplication-TileColor" content="#2e2e33"> | ||||||
| <!-- Generator --> |  | ||||||
| {{- hugo.Generator }} | {{- /* Generator */}} | ||||||
| <!-- RSS --> | {{ hugo.Generator }} | ||||||
| {{- range .AlternativeOutputFormats -}} |  | ||||||
|  | {{- /* RSS */}} | ||||||
|  | {{ range .AlternativeOutputFormats -}} | ||||||
| <link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}"> | <link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}"> | ||||||
| {{ end -}} | {{ end -}} | ||||||
| {{- range .AllTranslations -}} | {{- range .AllTranslations -}} | ||||||
| <link rel="alternate" hreflang="{{- .Lang -}}" href="{{- .Permalink -}}" /> | <link rel="alternate" hreflang="{{ .Lang }}" href="{{ .Permalink }}" /> | ||||||
| {{ end }} | {{ end }} | ||||||
| {{- partial "extend_head.html" . -}} | {{- partial "extend_head.html" . -}} | ||||||
| <!-- Misc --> |  | ||||||
|  | {{- /* Misc */}} | ||||||
| {{- if hugo.IsProduction | or (eq .Site.Params.env "production") }} | {{- if hugo.IsProduction | or (eq .Site.Params.env "production") }} | ||||||
| {{- template "_internal/google_analytics_async.html" . }} | {{- template "_internal/google_analytics_async.html" . }} | ||||||
| {{- template "_internal/google_news.html" . }} | {{- template "_internal/google_news.html" . }} | ||||||
| {{- template "partials/templates/opengraph.html" . }} | {{- template "partials/templates/opengraph.html" . }} | ||||||
| {{- template "partials/templates/twitter_cards.html" . }} | {{- template "partials/templates/twitter_cards.html" . }} | ||||||
| {{- template "partials/templates/schema_json.html" . }} | {{- template "partials/templates/schema_json.html" . }} | ||||||
| {{- end }} | {{- end -}} | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| {{- /*  theme-toggle is enabled  */}} | {{- /* theme-toggle is enabled */}} | ||||||
| {{- if (not .Site.Params.disableThemeToggle) }} | {{- if (not .Site.Params.disableThemeToggle) }} | ||||||
| {{- /*  theme is light  */}} | {{- /* theme is light */}} | ||||||
| {{- if (eq .Site.Params.defaultTheme "light") }} | {{- if (eq .Site.Params.defaultTheme "light") }} | ||||||
| <script> | <script> | ||||||
|     if (localStorage.getItem("pref-theme") === "dark") { |     if (localStorage.getItem("pref-theme") === "dark") { | ||||||
| @@ -8,7 +8,7 @@ | |||||||
|     } |     } | ||||||
|  |  | ||||||
| </script> | </script> | ||||||
| {{- /*  theme is dark  */}} | {{- /* theme is dark */}} | ||||||
| {{- else if (eq .Site.Params.defaultTheme "dark") }} | {{- else if (eq .Site.Params.defaultTheme "dark") }} | ||||||
| <script> | <script> | ||||||
|     if (localStorage.getItem("pref-theme") === "light") { |     if (localStorage.getItem("pref-theme") === "light") { | ||||||
| @@ -17,7 +17,7 @@ | |||||||
|  |  | ||||||
| </script> | </script> | ||||||
| {{- else }} | {{- else }} | ||||||
| {{- /*  theme is auto  */}} | {{- /* theme is auto */}} | ||||||
| <script> | <script> | ||||||
|     if (localStorage.getItem("pref-theme") === "dark") { |     if (localStorage.getItem("pref-theme") === "dark") { | ||||||
|         document.body.classList.add('dark'); |         document.body.classList.add('dark'); | ||||||
| @@ -29,7 +29,7 @@ | |||||||
|  |  | ||||||
| </script> | </script> | ||||||
| {{- end }} | {{- end }} | ||||||
| {{- /*  theme-toggle is disabled and theme is auto  */}} | {{- /* theme-toggle is disabled and theme is auto */}} | ||||||
| {{- else if (and (ne .Site.Params.defaultTheme "light") (ne .Site.Params.defaultTheme "dark"))}} | {{- else if (and (ne .Site.Params.defaultTheme "light") (ne .Site.Params.defaultTheme "dark"))}} | ||||||
| <script> | <script> | ||||||
|     if (window.matchMedia('(prefers-color-scheme: dark)').matches) { |     if (window.matchMedia('(prefers-color-scheme: dark)').matches) { | ||||||
| @@ -73,10 +73,11 @@ | |||||||
|                 border-color: var(--theme); |                 border-color: var(--theme); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  |  | ||||||
|     </style> |     </style> | ||||||
|     {{- end }} |     {{- end }} | ||||||
|  |  | ||||||
| </noscript> | </noscript> | ||||||
|  |  | ||||||
| <header class="header"> | <header class="header"> | ||||||
|     <nav class="nav"> |     <nav class="nav"> | ||||||
|         <div class="logo"> |         <div class="logo"> | ||||||
| @@ -85,7 +86,7 @@ | |||||||
|             <a href="{{ "" | absLangURL }}" accesskey="h" title="{{ $label_text }} (Alt + H)"> |             <a href="{{ "" | absLangURL }}" accesskey="h" title="{{ $label_text }} (Alt + H)"> | ||||||
|                 {{- if .Site.Params.label.icon }} |                 {{- if .Site.Params.label.icon }} | ||||||
|                 <img src="{{- .Site.Params.label.icon -}}" alt="logo" aria-label="logo" |                 <img src="{{- .Site.Params.label.icon -}}" alt="logo" aria-label="logo" | ||||||
|                     height="{{- .Site.Params.label.iconHeight | default "30px" -}}"> |                     height="{{- .Site.Params.label.iconHeight | default " 30px" -}}"> | ||||||
|                 {{- end -}} |                 {{- end -}} | ||||||
|                 {{- $label_text -}} |                 {{- $label_text -}} | ||||||
|             </a> |             </a> | ||||||
| @@ -112,11 +113,11 @@ | |||||||
|                         <line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line> |                         <line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line> | ||||||
|                     </svg> |                     </svg> | ||||||
|                 </button> |                 </button> | ||||||
|                 {{- end}} |                 {{- end }} | ||||||
|                 {{ $lang := .Lang}} |  | ||||||
|                 {{ $separator := or $label_text (not .Site.Params.disableThemeToggle)}} |  | ||||||
|                 {{- with $.Site.Home.AllTranslations }} |  | ||||||
|  |  | ||||||
|  |                 {{- $lang := .Lang}} | ||||||
|  |                 {{- $separator := or $label_text (not .Site.Params.disableThemeToggle)}} | ||||||
|  |                 {{- with $.Site.Home.AllTranslations }} | ||||||
|                 <ul class="lang-switch"> |                 <ul class="lang-switch"> | ||||||
|                     {{- if $separator }}<li>|</li>{{ end }} |                     {{- if $separator }}<li>|</li>{{ end }} | ||||||
|                     {{- range . -}} |                     {{- range . -}} | ||||||
| @@ -141,7 +142,7 @@ | |||||||
|         <ul id="menu" onscroll="menu_on_scroll()"> |         <ul id="menu" onscroll="menu_on_scroll()"> | ||||||
|             {{- range .Site.Menus.main }} |             {{- range .Site.Menus.main }} | ||||||
|             {{- $menu_item_url := (cond (strings.HasSuffix .URL "/") .URL (printf "%s/" .URL) ) | absLangURL }} |             {{- $menu_item_url := (cond (strings.HasSuffix .URL "/") .URL (printf "%s/" .URL) ) | absLangURL }} | ||||||
|             {{- $page_url:= $currentPage.Permalink  | absLangURL }} |             {{- $page_url:= $currentPage.Permalink | absLangURL }} | ||||||
|             {{- $is_search := eq ($.Site.GetPage .KeyName).Layout `search` }} |             {{- $is_search := eq ($.Site.GetPage .KeyName).Layout `search` }} | ||||||
|             <li> |             <li> | ||||||
|                 <a href="{{ .URL | absLangURL }}" title="{{ .Title | default .Name }} {{- cond $is_search (" (Alt + /)" | safeHTMLAttr) ("" | safeHTMLAttr ) }}" |                 <a href="{{ .URL | absLangURL }}" title="{{ .Title | default .Name }} {{- cond $is_search (" (Alt + /)" | safeHTMLAttr) ("" | safeHTMLAttr ) }}" | ||||||
| @@ -151,7 +152,7 @@ | |||||||
|                     </span> |                     </span> | ||||||
|                 </a> |                 </a> | ||||||
|             </li> |             </li> | ||||||
|             {{- end -}} |             {{- end }} | ||||||
|         </ul> |         </ul> | ||||||
|     </nav> |     </nav> | ||||||
| </header> | </header> | ||||||
|   | |||||||
| @@ -1,13 +1,13 @@ | |||||||
| {{- with $.Site.Params.homeInfoParams }} | {{- with $.Site.Params.homeInfoParams }} | ||||||
| <article class="first-entry home-info"> | <article class="first-entry home-info"> | ||||||
|     <header class="entry-header"> |     <header class="entry-header"> | ||||||
|         <h1>{{- .Title | markdownify }}</h1> |         <h1>{{ .Title | markdownify }}</h1> | ||||||
|     </header> |     </header> | ||||||
|     <section class="entry-content"> |     <section class="entry-content"> | ||||||
|         <p>{{- .Content | markdownify }}</p> |         <p>{{ .Content | markdownify }}</p> | ||||||
|     </section> |     </section> | ||||||
|     <footer class="entry-footer"> |     <footer class="entry-footer"> | ||||||
|         {{- partial "social_icons.html" $.Site.Params.socialIcons -}} |         {{ partial "social_icons.html" $.Site.Params.socialIcons }} | ||||||
|     </footer> |     </footer> | ||||||
| </article> | </article> | ||||||
| {{- end}} | {{- end -}} | ||||||
|   | |||||||
| @@ -1,19 +1,21 @@ | |||||||
| <div class="profile"> | <div class="profile"> | ||||||
|     {{- with .Site.Params.profileMode }} |     {{- with .Site.Params.profileMode }} | ||||||
|     <div class="profile_inner"> |     <div class="profile_inner"> | ||||||
|         {{- if .imageUrl}}<img src="{{ .imageUrl}}" alt="{{ .imageTitle | default "profile image" }}" |         {{- if .imageUrl -}} | ||||||
|             height="{{- .imageHeight | default 150 -}}" width="{{- .imageWidth | default 150 -}}" />{{- end}} |         <img src="{{ .imageUrl }}" alt="{{ .imageTitle | default "profile image" }}" | ||||||
|         <h1>{{- .title | default $.Site.Title | markdownify -}}</h1> |             height="{{ .imageHeight | default 150 }}" width="{{ .imageWidth | default 150 }}" /> | ||||||
|         <span>{{- .subtitle | markdownify -}}</span> |         {{- end }} | ||||||
|  |         <h1>{{ .title | default $.Site.Title | markdownify }}</h1> | ||||||
|  |         <span>{{ .subtitle | markdownify }}</span> | ||||||
|         {{- partial "social_icons.html" $.Site.Params.socialIcons -}} |         {{- partial "social_icons.html" $.Site.Params.socialIcons -}} | ||||||
|  |  | ||||||
|         {{- with .buttons }} |         {{- with .buttons }} | ||||||
|         <div class="buttons"> |         <div class="buttons"> | ||||||
|             {{- range . -}} |             {{- range . }} | ||||||
|             <a class="button" href="{{ trim .url " " }}" rel="noopener" title="{{ .name | humanize }}"> |             <a class="button" href="{{ trim .url " " }}" rel="noopener" title="{{ .name | humanize }}"> | ||||||
|                 <span class="button-inner">{{ .name }}</span> |                 <span class="button-inner">{{ .name }}</span> | ||||||
|             </a> |             </a> | ||||||
|             {{- end -}} |             {{- end }} | ||||||
|         </div> |         </div> | ||||||
|         {{- end }} |         {{- end }} | ||||||
|     </div> |     </div> | ||||||
|   | |||||||
| @@ -1,17 +1,17 @@ | |||||||
| {{- $scratch := newScratch}} | {{- $scratch := newScratch }} | ||||||
|  |  | ||||||
| {{- if not .Date.IsZero -}} | {{- if not .Date.IsZero -}} | ||||||
| {{- $scratch.Add "meta" (slice (.Date.Format (default "January 2, 2006" .Site.Params.DateFormat))) }} | {{- $scratch.Add "meta" (slice (.Date.Format (default "January 2, 2006" .Site.Params.DateFormat))) }} | ||||||
| {{- end -}} | {{- end }} | ||||||
|  |  | ||||||
| {{- if (.Param "ShowReadingTime") -}} | {{- if (.Param "ShowReadingTime") -}} | ||||||
| {{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%s min" .ReadingTime))) }} | {{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%s min" .ReadingTime))) }} | ||||||
| {{- end -}} |  | ||||||
|  |  | ||||||
| {{ with (partial "author.html" . ) }} |  | ||||||
| {{ $scratch.Add "meta" (slice .)}} |  | ||||||
| {{end}} |  | ||||||
|  |  | ||||||
| {{- with ($scratch.Get "meta")}} |  | ||||||
| {{- delimit . " · "}} |  | ||||||
| {{- end }} | {{- end }} | ||||||
|  |  | ||||||
|  | {{- with (partial "author.html" .) }} | ||||||
|  | {{- $scratch.Add "meta" (slice .) }} | ||||||
|  | {{- end }} | ||||||
|  |  | ||||||
|  | {{- with ($scratch.Get "meta") }} | ||||||
|  | {{- delimit . " · " -}} | ||||||
|  | {{- end -}} | ||||||
|   | |||||||
| @@ -1,13 +1,13 @@ | |||||||
| {{- $pageurl := .Permalink }} | {{- $pageurl := .Permalink }} | ||||||
| {{- $title := .Title }} | {{- $title := .Title }} | ||||||
|  |  | ||||||
| {{ $.Scratch.Set "tags" ""}} | {{- $.Scratch.Set "tags" ""}} | ||||||
|  |  | ||||||
| {{- with .Params.Tags }} | {{- with .Params.Tags }} | ||||||
| {{ $hashtags := newScratch}} | {{ $hashtags := newScratch}} | ||||||
| {{ range . }}{{ $hashtags.Add "tags" (slice (replaceRE "(\\s)" "" . ))}}{{end}} | {{- range . }}{{ $hashtags.Add "tags" (slice (replaceRE "(\\s)" "" . ))}}{{end}} | ||||||
| {{ $.Scratch.Set "tags" (delimit ($hashtags.Get "tags") ",")  }} | {{- $.Scratch.Set "tags" (delimit ($hashtags.Get "tags") ",") }} | ||||||
| {{- end }} | {{- end -}} | ||||||
|  |  | ||||||
| <div class="share-buttons"> | <div class="share-buttons"> | ||||||
|     <a target="_blank" rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on twitter" |     <a target="_blank" rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on twitter" | ||||||
|   | |||||||
| @@ -1,6 +1,7 @@ | |||||||
| <div class="social-icons"> | <div class="social-icons"> | ||||||
|     {{- range . -}} |     {{- range . }} | ||||||
|     <a href="{{ trim .url " " }}" target="_blank" rel="noopener noreferrer me" |     <a href="{{ trim .url " " }}" target="_blank" rel="noopener noreferrer me" title="{{ .name | humanize }}"> | ||||||
|         title="{{ .name | humanize }}">{{ partial "svg.html" . }}</a> |         {{ partial "svg.html" . }} | ||||||
|     {{- end -}} |     </a> | ||||||
|  |     {{- end }} | ||||||
| </div> | </div> | ||||||
|   | |||||||
| @@ -1,4 +1,4 @@ | |||||||
| {{ $icon_name := ( trim .name " " | lower )}} | {{- $icon_name := ( trim .name " " | lower )}} | ||||||
| {{- if (eq $icon_name "123rf") -}} | {{- if (eq $icon_name "123rf") -}} | ||||||
| <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" | ||||||
|     stroke-linecap="round" stroke-linejoin="round"> |     stroke-linecap="round" stroke-linejoin="round"> | ||||||
|   | |||||||
| @@ -114,6 +114,6 @@ | |||||||
|   } |   } | ||||||
| } | } | ||||||
| </script> | </script> | ||||||
| {{ end }}{{/* .IsPage end */}} | {{- end }}{{/* .IsPage end */}} | ||||||
|  |  | ||||||
| {{ end }} | {{- end -}} | ||||||
|   | |||||||
| @@ -66,28 +66,28 @@ | |||||||
|                 {{- end -}} |                 {{- end -}} | ||||||
|                 {{- end -}} |                 {{- end -}} | ||||||
|                 {{- end -}} |                 {{- end -}} | ||||||
|                 {{- end -}} |                 {{- end }} | ||||||
|                 <li> |                 <li> | ||||||
|                     <a href="#{{- $cleanedID  -}}" aria-label="{{- $header | plainify -}}">{{- $header | safeHTML -}}</a> |                     <a href="#{{- $cleanedID  -}}" aria-label="{{- $header | plainify -}}">{{- $header | safeHTML -}}</a> | ||||||
|                     {{- else -}} |                     {{- else }} | ||||||
|                 <li> |                 <li> | ||||||
|                     <a href="#{{- $cleanedID -}}" aria-label="{{- $header | plainify -}}">{{- $header | safeHTML -}}</a> |                     <a href="#{{- $cleanedID -}}" aria-label="{{- $header | plainify -}}">{{- $header | safeHTML -}}</a> | ||||||
|                     {{- end -}} |                     {{- end -}} | ||||||
|                     {{- end -}} |                     {{- end -}} | ||||||
|                     <!-- {{- $firstHeaderLevel := len (seq (index (findRE "[1-6]" (index $headers 0) 1) 0)) -}} --> |                     <!-- {{- $firstHeaderLevel := len (seq (index (findRE "[1-6]" (index $headers 0) 1) 0)) -}} --> | ||||||
|                     {{- $firstHeaderLevel := $largest }} |                     {{- $firstHeaderLevel := $largest }} | ||||||
|                     {{- $lastHeaderLevel := len (seq (index (findRE "[1-6]" (index $headers (sub (len $headers) 1)) 1) 0)) -}} |                     {{- $lastHeaderLevel := len (seq (index (findRE "[1-6]" (index $headers (sub (len $headers) 1)) 1) 0)) }} | ||||||
|                 </li> |                 </li> | ||||||
|                 {{- range seq (sub $lastHeaderLevel $firstHeaderLevel) -}} |                 {{- range seq (sub $lastHeaderLevel $firstHeaderLevel) -}} | ||||||
|                 {{- if in ($.Scratch.Get "bareul") (add . $firstHeaderLevel) -}} |                 {{- if in ($.Scratch.Get "bareul") (add . $firstHeaderLevel) }} | ||||||
|             </ul> |             </ul> | ||||||
|             {{- else -}} |             {{- else }} | ||||||
|             </ul> |             </ul> | ||||||
|             </li> |             </li> | ||||||
|             {{- end -}} |             {{- end -}} | ||||||
|             {{- end -}} |             {{- end }} | ||||||
|             </ul> |             </ul> | ||||||
|             {{- end -}} |             {{- end }} | ||||||
|         </div> |         </div> | ||||||
|     </details> |     </details> | ||||||
| </div> | </div> | ||||||
| @@ -1,9 +1,9 @@ | |||||||
| {{- if .IsTranslated -}} | {{- if .IsTranslated -}} | ||||||
| {{- if (ne .Layout "search")}} | {{- if (ne .Layout "search") }} | ||||||
| {{- if or .Params.author $.Site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) }} | {{- end -}} | {{- if or .Params.author $.Site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) }} | {{- end -}} | ||||||
| {{- end }} | {{- end }} | ||||||
| <ul class="i18n_list"> | <ul class="i18n_list"> | ||||||
|     {{- i18n "translations" | default "Translations"}}: |     {{- i18n "translations" | default "Translations" }}: | ||||||
|     {{- range .Translations }} |     {{- range .Translations }} | ||||||
|     <li> |     <li> | ||||||
|         <a href="{{ .Permalink }}"> |         <a href="{{ .Permalink }}"> | ||||||
| @@ -16,4 +16,4 @@ | |||||||
|     </li> |     </li> | ||||||
|     {{- end }} |     {{- end }} | ||||||
| </ul> | </ul> | ||||||
| {{- end }} | {{- end -}} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Aditya Telange
					Aditya Telange