Fix Spacing in overall repo

This commit is contained in:
Aditya Telange 2021-03-30 18:07:36 +05:30
parent dae7f2b8a1
commit 196b82645e
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77
27 changed files with 167 additions and 158 deletions

View File

@ -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 */ -}}

View File

@ -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>

View File

@ -22,13 +22,13 @@
{{- $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" }}
@ -45,13 +45,13 @@
{{- 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>&nbsp;&nbsp;[draft]</sup></div>{{- end }} {{- if .Draft }}<div class="entry-isdraft"><sup>&nbsp;&nbsp;[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 */ -}}

View File

@ -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>&nbsp;&nbsp;[draft]</sup></div>{{- end }} {{- if .Draft }}<div class="entry-isdraft"><sup>&nbsp;&nbsp;[draft]</sup></div>{{- end }}
@ -58,7 +58,7 @@
{{- 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>

View File

@ -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 */ -}}

View File

@ -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 }}

View File

@ -1,7 +1,7 @@
{{- 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 }}
@ -14,6 +14,6 @@
{{- print "&nbsp;»&nbsp;" | safeHTML -}}<a href="{{ $bc_pg.Permalink }}">{{ $bc_pg.Name }}</a> {{- print "&nbsp;»&nbsp;" | safeHTML -}}<a href="{{ $bc_pg.Permalink }}">{{ $bc_pg.Name }}</a>
{{- end }} {{- end }}
{{- end }} {{- end -}}
</div> </div>
{{- end }} {{- end -}}

View File

@ -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 -->

View File

@ -32,4 +32,4 @@
{{- end }} {{- end }}
</figure> </figure>
{{- end }}{{/* End image */}} {{- end }}{{/* End image */}}
{{- end -}}{{/* End context */}} {{- end -}}{{/* End context */ -}}

View File

@ -1,6 +1,7 @@
{{- 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 }}|&nbsp;{{- end -}}
{{- if or .Params.author $.Site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated }}&nbsp;|&nbsp;{{- 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>

View File

@ -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 -->

View File

@ -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 -->

View File

@ -9,6 +9,7 @@
<span>&middot;</span> <span>&middot;</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,7 +19,9 @@
</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 }}
@ -30,6 +33,7 @@
<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")) {

View File

@ -5,10 +5,12 @@
<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 */}}
<title>{{ if .IsHome }}{{ else }}{{ if .Title }}{{ .Title }} | {{ end }}{{ end }}{{ .Site.Title }}</title> <title>{{ if .IsHome }}{{ else }}{{ if .Title }}{{ .Title }} | {{ end }}{{ end }}{{ .Site.Title }}</title>
<!-- Meta -->
{{- /* 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 -}}" />
@ -26,7 +28,8 @@
{{- 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 */}} {{- /* bundle all required css */}}
{{- /* Add extended css after theme style */ -}} {{- /* 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 }}
@ -59,37 +63,37 @@
{{- $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 -}}

View File

@ -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">
@ -113,10 +114,10 @@
</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 . -}}
@ -151,7 +152,7 @@
</span> </span>
</a> </a>
</li> </li>
{{- end -}} {{- end }}
</ul> </ul>
</nav> </nav>
</header> </header>

View File

@ -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 -}}

View File

@ -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>

View File

@ -2,16 +2,16 @@
{{- 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 -}} {{- end }}
{{ with (partial "author.html" . ) }} {{- with (partial "author.html" .) }}
{{ $scratch.Add "meta" (slice .)}} {{- $scratch.Add "meta" (slice .) }}
{{end}} {{- end }}
{{- with ($scratch.Get "meta") }} {{- with ($scratch.Get "meta") }}
{{- delimit . "&nbsp;·&nbsp;"}} {{- delimit . "&nbsp;·&nbsp;" -}}
{{- end }} {{- end -}}

View File

@ -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"

View File

@ -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>

View File

@ -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">

View File

@ -114,6 +114,6 @@
} }
} }
</script> </script>
{{ end }}{{/* .IsPage end */}} {{- end }}{{/* .IsPage end */}}
{{ end }} {{- end -}}

View File

@ -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>

View File

@ -16,4 +16,4 @@
</li> </li>
{{- end }} {{- end }}
</ul> </ul>
{{- end }} {{- end -}}