mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2023-12-21 10:22:58 +01:00
Fix Spacing in overall repo
This commit is contained in:
parent
dae7f2b8a1
commit
196b82645e
@ -1,3 +1,3 @@
|
||||
{{ define "main" }}
|
||||
{{- define "main" }}
|
||||
<div class="not-found">404</div>
|
||||
{{ end }}{{/* end main */}}
|
||||
{{- end }}{{/* end main */ -}}
|
||||
|
@ -13,12 +13,11 @@
|
||||
{{- print " dark" }}
|
||||
{{- end -}}
|
||||
" id="top">
|
||||
{{- partialCached "header.html" . .Page}}
|
||||
{{- partialCached "header.html" . .Page -}}
|
||||
<main class="main">
|
||||
{{- block "main" . }}
|
||||
{{- end }}
|
||||
{{- block "main" . }}{{ end }}
|
||||
</main>
|
||||
{{- partialCached "footer.html" . .Type .Layout .Params }}
|
||||
{{ partialCached "footer.html" . .Type .Layout .Params -}}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@ -22,13 +22,13 @@
|
||||
{{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
|
||||
{{- end }}
|
||||
|
||||
{{ $paginator := .Paginate $pages }}
|
||||
{{- $paginator := .Paginate $pages }}
|
||||
|
||||
{{- if and .IsHome .Site.Params.homeInfoParams (eq $paginator.PageNumber 1) }}
|
||||
{{- partial "home_info.html" . }}
|
||||
{{- end }}
|
||||
|
||||
{{ $term := .Data.Term}}
|
||||
{{- $term := .Data.Term }}
|
||||
{{- range $index, $page := $paginator.Pages }}
|
||||
|
||||
{{- $class := "post-entry" }}
|
||||
@ -45,13 +45,13 @@
|
||||
{{- partial "cover.html" (dict "cxt" . "IsHome" true "isHidden" $isHidden) }}
|
||||
<header class="entry-header">
|
||||
<h2>
|
||||
{{ .Title }}
|
||||
{{- if .Draft }}<div class="entry-isdraft"><sup> [draft]</sup></div>{{- end }}
|
||||
{{- .Title }}
|
||||
{{- if .Draft }}<div class="entry-isdraft"><sup> [draft]</sup></div>{{ end -}}
|
||||
</h2>
|
||||
</header>
|
||||
{{- if (ne (.Param "hideSummary") true) }}
|
||||
<section class="entry-content">
|
||||
<p>{{ .Summary | plainify | htmlUnescape }}{{- if .Truncated }}...{{- end -}}</p>
|
||||
<p>{{ .Summary | plainify | htmlUnescape }}{{ if .Truncated }}...{{ end }}</p>
|
||||
</section>
|
||||
{{- end }}
|
||||
{{- if not (.Param "hideMeta") }}
|
||||
@ -75,5 +75,7 @@
|
||||
</nav>
|
||||
</footer>
|
||||
{{- end }}
|
||||
{{end}}{{/* end profileMode */}}
|
||||
|
||||
{{- end }}{{/* end profileMode */}}
|
||||
|
||||
{{- end }}{{- /* end main */ -}}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
<article class="post-single">
|
||||
<header class="post-header">
|
||||
{{- partial "breadcrumbs.html" . }}
|
||||
{{ partial "breadcrumbs.html" . }}
|
||||
<h1 class="post-title">
|
||||
{{ .Title }}
|
||||
{{- if .Draft }}<div class="entry-isdraft"><sup> [draft]</sup></div>{{- end }}
|
||||
@ -58,7 +58,7 @@
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if (and .Site.Params.ShowShareButtons (ne .Params.disableShare true)) }}
|
||||
{{- partial "share_icons.html" . }}
|
||||
{{- partial "share_icons.html" . -}}
|
||||
{{- end }}
|
||||
</footer>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{{ define "main" }}
|
||||
{{- define "main" }}
|
||||
|
||||
{{- if .Title }}
|
||||
<header class="page-header">
|
||||
@ -24,4 +24,4 @@
|
||||
{{- end }}
|
||||
</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 }}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{{- if (.Param "ShowBreadCrumbs")}}
|
||||
{{- if (.Param "ShowBreadCrumbs") -}}
|
||||
<div class="breadcrumbs">
|
||||
{{- $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>
|
||||
{{- $scratch := newScratch }}
|
||||
@ -14,6 +14,6 @@
|
||||
{{- print " » " | safeHTML -}}<a href="{{ $bc_pg.Permalink }}">{{ $bc_pg.Name }}</a>
|
||||
{{- end }}
|
||||
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
@ -1,5 +1,3 @@
|
||||
<!-- Comments area start -->
|
||||
<!--
|
||||
to add comments read => https://gohugo.io/content-management/comments/
|
||||
-->
|
||||
<!-- Comments area end -->
|
||||
{{- /* Comments area start */ -}}
|
||||
{{- /* to add comments read => https://gohugo.io/content-management/comments/ */ -}}
|
||||
{{- /* Comments area end */ -}}
|
||||
|
@ -32,4 +32,4 @@
|
||||
{{- end }}
|
||||
</figure>
|
||||
{{- end }}{{/* End image */}}
|
||||
{{- end -}}{{/* End context */}}
|
||||
{{- end -}}{{/* End context */ -}}
|
||||
|
@ -1,6 +1,7 @@
|
||||
{{- if or .Params.editPost.URL .Site.Params.editPost.URL -}}
|
||||
{{- $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">
|
||||
{{- .Params.editPost.Text | default (.Site.Params.editPost.Text | default (i18n "edit_post" | default "Edit")) -}}
|
||||
</a>
|
||||
|
@ -1,5 +1,3 @@
|
||||
<!-- Footer custom content area start -->
|
||||
<!--
|
||||
Insert any custom code web-analytics, resources, etc. here
|
||||
-->
|
||||
<!-- Footer custom content area end -->
|
||||
{{- /* Footer custom content area start */ -}}
|
||||
{{- /* Insert any custom code web-analytics, resources, etc. here */ -}}
|
||||
{{- /* Footer custom content area end */ -}}
|
||||
|
@ -1,5 +1,4 @@
|
||||
<!-- Head custom content area start -->
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<!-- Head custom content area end -->
|
||||
{{- /* Head custom content area start */ -}}
|
||||
{{- /* 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. */ -}}
|
||||
{{- /* Head custom content area end */ -}}
|
||||
|
@ -9,6 +9,7 @@
|
||||
<span>·</span>
|
||||
<span>Theme <a href="https://git.io/hugopapermod" rel="noopener" target="_blank">PaperMod</a></span>
|
||||
</footer>
|
||||
|
||||
{{- if (not .Site.Params.disableScrollToTop) }}
|
||||
<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">
|
||||
@ -18,7 +19,9 @@
|
||||
</button>
|
||||
</a>
|
||||
{{- end }}
|
||||
|
||||
{{- partial "extend_footer.html" . -}}
|
||||
|
||||
{{- $isHLJSdisabled := (.Site.Params.assets.disableHLJS | default .Params.disableHLJS ) }}
|
||||
{{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (not $isHLJSdisabled)) }}
|
||||
{{- if not .Site.Params.assets.disableFingerprinting }}
|
||||
@ -30,6 +33,7 @@
|
||||
<script defer src="{{ $highlight.RelPermalink }}" onload="hljs.initHighlightingOnLoad();"></script>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
<script>
|
||||
window.onload = function () {
|
||||
if (localStorage.getItem("menu-scroll-position")) {
|
||||
|
@ -5,10 +5,12 @@
|
||||
<meta name="robots" content="index, follow">
|
||||
{{- else }}
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
{{- end -}}
|
||||
<!-- Title -->
|
||||
{{- end }}
|
||||
|
||||
{{- /* Title */}}
|
||||
<title>{{ if .IsHome }}{{ else }}{{ if .Title }}{{ .Title }} | {{ end }}{{ end }}{{ .Site.Title }}</title>
|
||||
<!-- Meta -->
|
||||
|
||||
{{- /* Meta */}}
|
||||
<meta name="keywords" content="{{ if .Params.keywords -}}
|
||||
{{- range $i, $e := .Params.keywords }}{{ if $i }}, {{ end }}{{ $e }}{{ end }} {{- else }}
|
||||
{{- range $i, $e := .Params.tags }}{{ if $i }}, {{ end }}{{ $e }}{{ end }} {{- end -}}" />
|
||||
@ -26,7 +28,8 @@
|
||||
{{- if .Site.Params.analytics.bing.SiteVerificationTag }}
|
||||
<meta name="msvalidate.01" content="{{ .Site.Params.analytics.bing.SiteVerificationTag }}" />
|
||||
{{- end }}
|
||||
<!-- Styles -->
|
||||
|
||||
{{- /* Styles */}}
|
||||
{{- $theme_vars := (resources.Get "css/core/theme-vars.css") }}
|
||||
{{- $reset := (resources.Get "css/core/reset.css") }}
|
||||
{{- $media := (resources.Get "css/core/zmedia.css") }}
|
||||
@ -39,18 +42,19 @@
|
||||
{{- /* order is important */}}
|
||||
{{- $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" }}
|
||||
|
||||
{{- /* bundle all required css */}}
|
||||
{{- /* Add extended css after theme style */ -}}
|
||||
{{- $stylesheet := (slice $core $extended) | resources.Concat "assets/css/stylesheet.css" | minify }}
|
||||
|
||||
{{- if not .Site.Params.assets.disableFingerprinting }}
|
||||
{{- $stylesheet := $stylesheet | fingerprint -}}
|
||||
<link href="{{ $stylesheet.RelPermalink }}" integrity="{{ $stylesheet.Data.Integrity }}" rel="preload stylesheet"
|
||||
as="style">
|
||||
{{- $stylesheet := $stylesheet | fingerprint }}
|
||||
<link href="{{ $stylesheet.RelPermalink }}" integrity="{{ $stylesheet.Data.Integrity }}" rel="preload stylesheet" as="style">
|
||||
{{- else }}
|
||||
<link href="{{ $stylesheet.RelPermalink }}" rel="preload stylesheet" as="style">
|
||||
{{- end }}
|
||||
<!-- Search -->
|
||||
|
||||
{{- /* Search */}}
|
||||
{{- if (eq .Layout `search`) -}}
|
||||
<link rel="preload" as="fetch" href="../index.json" crossOrigin="anonymous">
|
||||
{{- $fastsearch := resources.Get "js/fastsearch.js" | resources.ExecuteAsTemplate "js/fastsearch.js" .Site.Params.fuseOpts }}
|
||||
@ -59,37 +63,37 @@
|
||||
{{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify | fingerprint }}
|
||||
<script defer src="{{ $search.RelPermalink }}" onload="loadSearch();" integrity="{{ $search.Data.Integrity }}"></script>
|
||||
{{- 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>
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
<!-- Favicons -->
|
||||
<link rel="icon" href="{{- .Site.Params.assets.favicon | default "favicon.ico" | absURL -}}">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="
|
||||
{{- .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="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 -}}">
|
||||
{{- /* Favicons */}}
|
||||
<link rel="icon" href="{{ .Site.Params.assets.favicon | default "favicon.ico" | absURL }}">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{{ .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="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="msapplication-TileColor" content="#2e2e33">
|
||||
<!-- Generator -->
|
||||
{{- hugo.Generator }}
|
||||
<!-- RSS -->
|
||||
{{- range .AlternativeOutputFormats -}}
|
||||
|
||||
{{- /* Generator */}}
|
||||
{{ hugo.Generator }}
|
||||
|
||||
{{- /* RSS */}}
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
|
||||
{{ end -}}
|
||||
{{- range .AllTranslations -}}
|
||||
<link rel="alternate" hreflang="{{- .Lang -}}" href="{{- .Permalink -}}" />
|
||||
<link rel="alternate" hreflang="{{ .Lang }}" href="{{ .Permalink }}" />
|
||||
{{ end }}
|
||||
{{- partial "extend_head.html" . -}}
|
||||
<!-- Misc -->
|
||||
|
||||
{{- /* Misc */}}
|
||||
{{- if hugo.IsProduction | or (eq .Site.Params.env "production") }}
|
||||
{{- template "_internal/google_analytics_async.html" . }}
|
||||
{{- template "_internal/google_news.html" . }}
|
||||
{{- template "partials/templates/opengraph.html" . }}
|
||||
{{- template "partials/templates/twitter_cards.html" . }}
|
||||
{{- template "partials/templates/schema_json.html" . }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
@ -73,10 +73,11 @@
|
||||
border-color: var(--theme);
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
{{- end }}
|
||||
|
||||
</noscript>
|
||||
|
||||
<header class="header">
|
||||
<nav class="nav">
|
||||
<div class="logo">
|
||||
@ -113,10 +114,10 @@
|
||||
</svg>
|
||||
</button>
|
||||
{{- 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">
|
||||
{{- if $separator }}<li>|</li>{{ end }}
|
||||
{{- range . -}}
|
||||
@ -151,7 +152,7 @@
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
|
@ -1,13 +1,13 @@
|
||||
{{- with $.Site.Params.homeInfoParams }}
|
||||
<article class="first-entry home-info">
|
||||
<header class="entry-header">
|
||||
<h1>{{- .Title | markdownify }}</h1>
|
||||
<h1>{{ .Title | markdownify }}</h1>
|
||||
</header>
|
||||
<section class="entry-content">
|
||||
<p>{{- .Content | markdownify }}</p>
|
||||
<p>{{ .Content | markdownify }}</p>
|
||||
</section>
|
||||
<footer class="entry-footer">
|
||||
{{- partial "social_icons.html" $.Site.Params.socialIcons -}}
|
||||
{{ partial "social_icons.html" $.Site.Params.socialIcons }}
|
||||
</footer>
|
||||
</article>
|
||||
{{- end}}
|
||||
{{- end -}}
|
||||
|
@ -1,19 +1,21 @@
|
||||
<div class="profile">
|
||||
{{- with .Site.Params.profileMode }}
|
||||
<div class="profile_inner">
|
||||
{{- if .imageUrl}}<img src="{{ .imageUrl}}" alt="{{ .imageTitle | default "profile image" }}"
|
||||
height="{{- .imageHeight | default 150 -}}" width="{{- .imageWidth | default 150 -}}" />{{- end}}
|
||||
<h1>{{- .title | default $.Site.Title | markdownify -}}</h1>
|
||||
<span>{{- .subtitle | markdownify -}}</span>
|
||||
{{- if .imageUrl -}}
|
||||
<img src="{{ .imageUrl }}" alt="{{ .imageTitle | default "profile image" }}"
|
||||
height="{{ .imageHeight | default 150 }}" width="{{ .imageWidth | default 150 }}" />
|
||||
{{- end }}
|
||||
<h1>{{ .title | default $.Site.Title | markdownify }}</h1>
|
||||
<span>{{ .subtitle | markdownify }}</span>
|
||||
{{- partial "social_icons.html" $.Site.Params.socialIcons -}}
|
||||
|
||||
{{- with .buttons }}
|
||||
<div class="buttons">
|
||||
{{- range . -}}
|
||||
{{- range . }}
|
||||
<a class="button" href="{{ trim .url " " }}" rel="noopener" title="{{ .name | humanize }}">
|
||||
<span class="button-inner">{{ .name }}</span>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
</div>
|
||||
{{- end }}
|
||||
</div>
|
||||
|
@ -2,16 +2,16 @@
|
||||
|
||||
{{- if not .Date.IsZero -}}
|
||||
{{- $scratch.Add "meta" (slice (.Date.Format (default "January 2, 2006" .Site.Params.DateFormat))) }}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
|
||||
{{- if (.Param "ShowReadingTime") -}}
|
||||
{{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%s min" .ReadingTime))) }}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
|
||||
{{ with (partial "author.html" . ) }}
|
||||
{{ $scratch.Add "meta" (slice .)}}
|
||||
{{end}}
|
||||
{{- with (partial "author.html" .) }}
|
||||
{{- $scratch.Add "meta" (slice .) }}
|
||||
{{- end }}
|
||||
|
||||
{{- with ($scratch.Get "meta") }}
|
||||
{{- delimit . " · "}}
|
||||
{{- end }}
|
||||
{{- delimit . " · " -}}
|
||||
{{- end -}}
|
||||
|
@ -1,13 +1,13 @@
|
||||
{{- $pageurl := .Permalink }}
|
||||
{{- $title := .Title }}
|
||||
|
||||
{{ $.Scratch.Set "tags" ""}}
|
||||
{{- $.Scratch.Set "tags" ""}}
|
||||
|
||||
{{- with .Params.Tags }}
|
||||
{{ $hashtags := newScratch}}
|
||||
{{ range . }}{{ $hashtags.Add "tags" (slice (replaceRE "(\\s)" "" . ))}}{{end}}
|
||||
{{ $.Scratch.Set "tags" (delimit ($hashtags.Get "tags") ",") }}
|
||||
{{- end }}
|
||||
{{- range . }}{{ $hashtags.Add "tags" (slice (replaceRE "(\\s)" "" . ))}}{{end}}
|
||||
{{- $.Scratch.Set "tags" (delimit ($hashtags.Get "tags") ",") }}
|
||||
{{- end -}}
|
||||
|
||||
<div class="share-buttons">
|
||||
<a target="_blank" rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on twitter"
|
||||
|
@ -1,6 +1,7 @@
|
||||
<div class="social-icons">
|
||||
{{- range . -}}
|
||||
<a href="{{ trim .url " " }}" target="_blank" rel="noopener noreferrer me"
|
||||
title="{{ .name | humanize }}">{{ partial "svg.html" . }}</a>
|
||||
{{- end -}}
|
||||
{{- range . }}
|
||||
<a href="{{ trim .url " " }}" target="_blank" rel="noopener noreferrer me" title="{{ .name | humanize }}">
|
||||
{{ partial "svg.html" . }}
|
||||
</a>
|
||||
{{- end }}
|
||||
</div>
|
||||
|
@ -1,4 +1,4 @@
|
||||
{{ $icon_name := ( trim .name " " | lower )}}
|
||||
{{- $icon_name := ( trim .name " " | lower )}}
|
||||
{{- 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"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
|
@ -114,6 +114,6 @@
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{{ end }}{{/* .IsPage end */}}
|
||||
{{- end }}{{/* .IsPage end */}}
|
||||
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
@ -66,28 +66,28 @@
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
<li>
|
||||
<a href="#{{- $cleanedID -}}" aria-label="{{- $header | plainify -}}">{{- $header | safeHTML -}}</a>
|
||||
{{- else -}}
|
||||
{{- else }}
|
||||
<li>
|
||||
<a href="#{{- $cleanedID -}}" aria-label="{{- $header | plainify -}}">{{- $header | safeHTML -}}</a>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
<!-- {{- $firstHeaderLevel := len (seq (index (findRE "[1-6]" (index $headers 0) 1) 0)) -}} -->
|
||||
{{- $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>
|
||||
{{- range seq (sub $lastHeaderLevel $firstHeaderLevel) -}}
|
||||
{{- if in ($.Scratch.Get "bareul") (add . $firstHeaderLevel) -}}
|
||||
{{- if in ($.Scratch.Get "bareul") (add . $firstHeaderLevel) }}
|
||||
</ul>
|
||||
{{- else -}}
|
||||
{{- else }}
|
||||
</ul>
|
||||
</li>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
@ -16,4 +16,4 @@
|
||||
</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
Loading…
Reference in New Issue
Block a user