mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-11-22 02:21:37 +01:00
(lint) remove unnecessary whitespace
created by hugo's {{ }}
This commit is contained in:
parent
2cb5c9dad5
commit
016dd6e9fa
@ -1,39 +1,41 @@
|
|||||||
{{ define "main" }}
|
{{- define "main" }}
|
||||||
|
|
||||||
<header class="page-header">
|
<header class="page-header">
|
||||||
<h1>{{ .Title }}</h1>
|
<h1>{{ .Title }}</h1>
|
||||||
</header>
|
</header>
|
||||||
{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
|
|
||||||
{{ range $pages.GroupByPublishDate "2006" }}
|
{{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
|
||||||
{{ if ne .Key "0001" }}
|
{{- range $pages.GroupByPublishDate "2006" }}
|
||||||
|
{{- if ne .Key "0001" }}
|
||||||
<div class="archive-year">
|
<div class="archive-year">
|
||||||
<h2 class="archive-year-header">{{ replace .Key "0001" "" }}</h2>
|
<h2 class="archive-year-header">{{- replace .Key "0001" "" }}</h2>
|
||||||
{{ range .Pages.GroupByDate "January" }}
|
{{- range .Pages.GroupByDate "January" }}
|
||||||
<div class="archive-month">
|
<div class="archive-month">
|
||||||
<h3 class="archive-month-header">{{ .Key }}</h3>
|
<h3 class="archive-month-header">{{- .Key }}</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">
|
||||||
{{ .Title | markdownify }}
|
{{- .Title | markdownify }}
|
||||||
</h3>
|
</h3>
|
||||||
<div class="archive-meta">
|
<div class="archive-meta">
|
||||||
{{- if or .Params.author .Site.Params.author }}{{- .Params.author | default .Site.Params.author }} ·
|
{{- if or .Params.author .Site.Params.author }}
|
||||||
{{ end }}
|
{{- .Params.author | default .Site.Params.author }} ·
|
||||||
{{ if $.Site.Params.ShowReadingTime }}{{ .ReadingTime }}{{ i18n "read_time" | default "min read" }}
|
{{- end }}
|
||||||
· {{ end }}
|
{{- if $.Site.Params.ShowReadingTime }}
|
||||||
|
{{ .ReadingTime }}{{ i18n "read_time" | default "min read" }} · {{ end }}
|
||||||
{{- .Date.Format "January 2, 2006" -}}
|
{{- .Date.Format "January 2, 2006" -}}
|
||||||
</div>
|
</div>
|
||||||
<a class="entry-link" aria-label="post link to {{ .Title | plainify }}" href="{{ .Permalink }}"></a>
|
<a class="entry-link" aria-label="post link to {{ .Title | plainify }}" href="{{ .Permalink }}"></a>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{- end }}
|
||||||
{{ end }}
|
{{- end }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{- end }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{- end }}
|
||||||
{{ end }}
|
{{- end }}
|
||||||
|
|
||||||
{{ end }}{{/* end main */}}
|
{{- end }}{{/* end main */}}
|
@ -5,13 +5,12 @@
|
|||||||
{{- partial "head.html" . }}
|
{{- partial "head.html" . }}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body
|
<body class="{{ if (and (eq .Kind `page` ) (ne .Layout `archives`)) }}single{{ else }}list
|
||||||
class="{{ if (and (eq .Kind `page` ) (ne .Layout `archives`)) }}single{{ else }}list{{ if .IsHome }} home {{ end }}{{ end }}{{ if eq $.Site.Params.defaultTheme `dark` }} dark {{ end }}"
|
{{- if .IsHome }} home{{ end }}{{ end }}{{- if eq $.Site.Params.defaultTheme `dark` }} dark{{ 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 }}
|
{{- partialCached "footer.html" . .Type }}
|
||||||
</body>
|
</body>
|
||||||
|
@ -1,21 +1,20 @@
|
|||||||
{{ define "main" }}
|
{{- define "main" }}
|
||||||
|
|
||||||
{{ if (and .Site.Params.profileMode.enabled .IsHome) }}
|
{{- if (and .Site.Params.profileMode.enabled .IsHome) }}
|
||||||
{{- partial "indexProfile.html" . }}
|
{{- partial "indexProfile.html" . }}
|
||||||
{{else}} {{/* if not profileMode */}}
|
{{- else }} {{/* if not profileMode */}}
|
||||||
|
|
||||||
{{- if not .IsHome | and .Title }}
|
{{- if not .IsHome | and .Title }}
|
||||||
<header class="page-header">
|
<header class="page-header">
|
||||||
<h1>{{ .Title }}</h1>
|
<h1>{{ .Title }}</h1>
|
||||||
</header>
|
</header>
|
||||||
{{ end }}
|
{{- end }}
|
||||||
|
|
||||||
|
{{- $pages := .RegularPages }}
|
||||||
|
|
||||||
{{ $pages := .RegularPages }}
|
{{- if .IsHome }}
|
||||||
|
{{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
|
||||||
{{ if .IsHome }}
|
{{- end}}
|
||||||
{{ $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
{{ $paginator := .Paginate $pages }}
|
{{ $paginator := .Paginate $pages }}
|
||||||
|
|
||||||
@ -25,29 +24,29 @@
|
|||||||
{{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0)) }}
|
{{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0)) }}
|
||||||
{{- if .Site.Params.homeInfoParams | or .Site.Params.disableSpecial1stPost}}
|
{{- if .Site.Params.homeInfoParams | or .Site.Params.disableSpecial1stPost}}
|
||||||
{{- partial "homeInfo.html" . }}
|
{{- partial "homeInfo.html" . }}
|
||||||
{{else}}
|
{{- else}}
|
||||||
{{- $class = "first-entry" }}
|
{{- $class = "first-entry" }}
|
||||||
{{ end }}
|
{{- end }}
|
||||||
{{- else if .Data.Term }}
|
{{- else if .Data.Term }}
|
||||||
{{- $class = "post-entry tag-entry" }}
|
{{- $class = "post-entry tag-entry" }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<article class="{{ $class }}">
|
<article class="{{ $class }}">
|
||||||
{{ if .Params.cover }}
|
{{- if .Params.cover }}
|
||||||
<figure class="entry-cover">
|
<figure class="entry-cover">
|
||||||
<img src="{{ .Params.cover | absURL }}" alt="cover image for {{ .Title }}">
|
<img src="{{ .Params.cover | absURL }}" alt="cover image for {{ .Title }}">
|
||||||
</figure>
|
</figure>
|
||||||
{{ end }}
|
{{- end }}
|
||||||
<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 .Site.Params.hideSummary true)}}
|
{{- if (ne .Site.Params.hideSummary true)}}
|
||||||
<section class="entry-content">
|
<section class="entry-content">
|
||||||
<p>{{ .Summary | plainify | htmlUnescape }}...</p>
|
<p>{{ .Summary | plainify | htmlUnescape }}...</p>
|
||||||
</section>
|
</section>
|
||||||
{{ end }}
|
{{- end }}
|
||||||
<footer class="entry-footer">
|
<footer class="entry-footer">
|
||||||
<time>{{ .Date.Format "January 2, 2006" }}</time>
|
<time>{{ .Date.Format "January 2, 2006" }}</time>
|
||||||
{{- if $.Site.Params.ShowReadingTime }} .
|
{{- if $.Site.Params.ShowReadingTime }} .
|
||||||
@ -72,4 +71,4 @@
|
|||||||
</footer>
|
</footer>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{end}}{{/* end profileMode */}}
|
{{end}}{{/* end profileMode */}}
|
||||||
{{ end }}{{/* end main */}}
|
{{- end }}{{- /* end main */ -}}
|
@ -1,4 +1,4 @@
|
|||||||
{{ define "main" }}
|
{{- define "main" }}
|
||||||
|
|
||||||
<article class="post-single">
|
<article class="post-single">
|
||||||
<header class="post-header">
|
<header class="post-header">
|
||||||
@ -6,7 +6,7 @@
|
|||||||
{{ .Title }}
|
{{ .Title }}
|
||||||
{{- if .Draft }}<div class="entry-isdraft"><sup> [draft]</sup></div>{{- end }}
|
{{- if .Draft }}<div class="entry-isdraft"><sup> [draft]</sup></div>{{- end }}
|
||||||
</h1>
|
</h1>
|
||||||
{{ if .Params.hideMeta }}{{ else }}
|
{{- if .Params.hideMeta }}{{ else }}
|
||||||
<div class="post-meta">
|
<div class="post-meta">
|
||||||
<time>{{ .Date.Format "January 2, 2006" }}</time>
|
<time>{{ .Date.Format "January 2, 2006" }}</time>
|
||||||
{{- if $.Site.Params.ShowReadingTime -}} .
|
{{- if $.Site.Params.ShowReadingTime -}} .
|
||||||
@ -15,34 +15,34 @@
|
|||||||
{{- if or .Params.author .Site.Params.author }} . {{- .Params.author | default .Site.Params.author }}{{ end }}
|
{{- if or .Params.author .Site.Params.author }} . {{- .Params.author | default .Site.Params.author }}{{ end }}
|
||||||
{{- if .IsTranslated -}} |
|
{{- if .IsTranslated -}} |
|
||||||
<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 }}">{{ .Language.LanguageName }}</a>
|
<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{- end }}
|
||||||
</ul>
|
</ul>
|
||||||
{{ end }}
|
{{- end }}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{- end}}
|
||||||
</header>
|
</header>
|
||||||
{{ if .Params.cover }}
|
{{- if .Params.cover }}
|
||||||
<figure class="entry-cover">
|
<figure class="entry-cover">
|
||||||
<img src="{{ .Params.cover | absURL }}" alt="cover image for {{ .Title | plainify }}">
|
<img src="{{ .Params.cover | absURL }}" alt="cover image for {{ .Title | plainify }}">
|
||||||
</figure>
|
</figure>
|
||||||
{{ end }}
|
{{- end }}
|
||||||
{{ if .Params.ShowToc }}
|
{{- if .Params.ShowToc }}
|
||||||
<div class="toc">
|
<div class="toc">
|
||||||
<details {{if .Params.TocOpen }} open{{ end }}>
|
<details {{if .Params.TocOpen }} open{{ end }}>
|
||||||
<summary>
|
<summary>
|
||||||
<div class="details">{{ i18n "toc" | default "Table of Contents" }}</div>
|
<div class="details">{{- i18n "toc" | default "Table of Contents" }}</div>
|
||||||
</summary>
|
</summary>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
{{ partial "toc.html" . }}
|
{{- partial "toc.html" . }}
|
||||||
</blockquote>
|
</blockquote>
|
||||||
</details>
|
</details>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{- end }}
|
||||||
<div class="post-content">{{ .Content }}</div>
|
<div class="post-content">{{ .Content }}</div>
|
||||||
<footer class="post-footer">
|
<footer class="post-footer">
|
||||||
{{- if .Params.tags }}
|
{{- if .Params.tags }}
|
||||||
@ -53,9 +53,9 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
</ul>
|
</ul>
|
||||||
{{- 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>
|
||||||
|
|
||||||
{{- if $.Site.Params.comments }}
|
{{- if $.Site.Params.comments }}
|
||||||
@ -63,4 +63,4 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
{{ end }}{{/* end main */}}
|
{{- end }}{{/* end main */}}
|
@ -1,21 +1,22 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
|
|
||||||
{{- if .Title }}
|
{{- if .Title }}
|
||||||
<header class="page-header">
|
<header class="page-header">
|
||||||
<h1>{{ .Title }}</h1>
|
<h1>{{ .Title }}</h1>
|
||||||
</header>
|
</header>
|
||||||
{{ end }}
|
{{- end }}
|
||||||
|
|
||||||
<ul class="terms-tags">
|
<ul class="terms-tags">
|
||||||
{{ $type := .Type }}
|
{{- $type := .Type }}
|
||||||
{{ range $key, $value := .Data.Terms.Alphabetical }}
|
{{- range $key, $value := .Data.Terms.Alphabetical }}
|
||||||
{{ $name := .Name }}
|
{{- $name := .Name }}
|
||||||
{{ $count := .Count }}
|
{{- $count := .Count }}
|
||||||
{{ with $.Site.GetPage (printf "/%s/%s" $type $name) }}
|
{{- with $.Site.GetPage (printf "/%s/%s" $type $name) }}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ .Permalink }}">{{ .Name }} <sup><strong><sup>{{ $count }}</sup></strong></sup> </a>
|
<a href="{{ .Permalink }}">{{ .Name }} <sup><strong><sup>{{ $count }}</sup></strong></sup> </a>
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{- end }}
|
||||||
{{ end }}
|
{{- end }}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
{{ end }}{{/* end main */}}
|
{{ end }}{{/* end main */}}
|
@ -11,11 +11,11 @@
|
|||||||
<path d="M12 6H0l6-6z" /></svg>
|
<path d="M12 6H0l6-6z" /></svg>
|
||||||
</button>
|
</button>
|
||||||
</a>
|
</a>
|
||||||
{{if in site.Params.mainSections .Type }}
|
{{- if in site.Params.mainSections .Type }}
|
||||||
{{ $highlight := resources.Get "js/highlight.min.js" | minify | fingerprint}}
|
{{- $highlight := resources.Get "js/highlight.min.js" | minify | fingerprint}}
|
||||||
<script src="{{ $highlight.Permalink }}" integrity="{{ $highlight.Data.Integrity }}"></script>
|
<script src="{{ $highlight.Permalink }}" integrity="{{ $highlight.Data.Integrity }}"></script>
|
||||||
<script>hljs.initHighlightingOnLoad();</script>
|
<script>hljs.initHighlightingOnLoad();</script>
|
||||||
{{end }}
|
{{- end }}
|
||||||
<script>
|
<script>
|
||||||
window.onload = function () {
|
window.onload = function () {
|
||||||
if (localStorage.getItem("menu-scroll-position")) {
|
if (localStorage.getItem("menu-scroll-position")) {
|
||||||
|
@ -12,39 +12,39 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
<meta name="author" content="{{ .Params.author | default .Site.Params.author }}">
|
<meta name="author" content="{{ .Params.author | default .Site.Params.author }}">
|
||||||
<link rel="canonical" href="{{ .Permalink }}" />
|
<link rel="canonical" href="{{ .Permalink }}" />
|
||||||
{{ 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}}
|
||||||
<!-- Styles -->
|
<!-- Styles -->
|
||||||
{{ $anoldhope := resources.Get "css/an-old-hope.min.css" | minify }}
|
{{- $anoldhope := resources.Get "css/an-old-hope.min.css" | minify }}
|
||||||
{{ $theme := resources.Get "css/theme-vars.css" | minify }}
|
{{- $theme := resources.Get "css/theme-vars.css" | minify }}
|
||||||
{{ $reset := resources.Get "css/reset.css" | minify }}
|
{{- $reset := resources.Get "css/reset.css" | minify }}
|
||||||
{{ $header := resources.Get "css/header.css" | minify }}
|
{{- $header := resources.Get "css/header.css" | minify }}
|
||||||
{{ $main := resources.Get "css/main.css" | minify }}
|
{{- $main := resources.Get "css/main.css" | minify }}
|
||||||
{{ $postentry := resources.Get "css/post-entry.css" | minify }}
|
{{- $postentry := resources.Get "css/post-entry.css" | minify }}
|
||||||
{{ $postsingle := resources.Get "css/post-single.css" | minify }}
|
{{- $postsingle := resources.Get "css/post-single.css" | minify }}
|
||||||
{{ $terms := resources.Get "css/terms.css" | minify }}
|
{{- $terms := resources.Get "css/terms.css" | minify }}
|
||||||
{{ $archive := resources.Get "css/archive.css" | minify }}
|
{{- $archive := resources.Get "css/archive.css" | minify }}
|
||||||
{{ $footer := resources.Get "css/footer.css" | minify }}
|
{{- $footer := resources.Get "css/footer.css" | minify }}
|
||||||
{{ $404 := resources.Get "css/404.css" | minify }}
|
{{- $404 := resources.Get "css/404.css" | minify }}
|
||||||
{{ $style := slice $theme $reset $header $main $postentry $postsingle $terms $archive $footer $404 | resources.Concat "stylesheet.css" | minify }}
|
{{- $style := slice $theme $reset $header $main $postentry $postsingle $terms $archive $footer $404 | resources.Concat "stylesheet.css" | minify }}
|
||||||
{{ $stylesheet := slice $anoldhope $style | resources.Concat "css/stylesheet.css" | minify | fingerprint }}
|
{{- $stylesheet := slice $anoldhope $style | resources.Concat "css/stylesheet.css" | minify | fingerprint }}
|
||||||
<link href="{{ $stylesheet.Permalink }}" integrity="{{ $stylesheet.Data.Integrity }}" rel="preload stylesheet"
|
<link href="{{ $stylesheet.Permalink }}" integrity="{{ $stylesheet.Data.Integrity }}" rel="preload stylesheet"
|
||||||
as="style">
|
as="style">
|
||||||
{{ if (and (.Site.Params.profileMode.enabled) (.IsHome)) }}
|
{{- if (and (.Site.Params.profileMode.enabled) (.IsHome)) }}
|
||||||
{{ $profileMode := resources.Get "css/profileMode.css" | minify | fingerprint }}
|
{{- $profileMode := resources.Get "css/profileMode.css" | minify | fingerprint }}
|
||||||
<link href="{{ $profileMode.Permalink }}" integrity="{{ $profileMode.Data.Integrity }}" rel="preload stylesheet"
|
<link href="{{ $profileMode.Permalink }}" integrity="{{ $profileMode.Data.Integrity }}" rel="preload stylesheet"
|
||||||
as="style">
|
as="style">
|
||||||
{{end}}
|
{{- end }}
|
||||||
<!-- Favicons -->
|
<!-- Favicons -->
|
||||||
<link rel="apple-touch-icon" href="{{ "apple-touch-icon.png" | absURL }}">
|
<link rel="apple-touch-icon" href="{{ "apple-touch-icon.png" | absURL }}">
|
||||||
<link rel="icon" href="{{ "favicon.ico" | absURL }}">
|
<link rel="icon" href="{{ "favicon.ico" | absURL }}">
|
||||||
<!-- Generator -->
|
<!-- Generator -->
|
||||||
{{- hugo.Generator }}
|
{{- hugo.Generator }}
|
||||||
<!-- RSS -->
|
<!-- RSS -->
|
||||||
{{ range .AlternativeOutputFormats -}}
|
{{- range .AlternativeOutputFormats -}}
|
||||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
{{- printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||||
{{ end -}}
|
{{- end -}}
|
||||||
<!-- Misc -->
|
<!-- Misc -->
|
||||||
{{- if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
|
{{- if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
|
||||||
{{- template "_internal/google_analytics_async.html" . }}
|
{{- template "_internal/google_analytics_async.html" . }}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
{{ if eq .Site.Params.defaultTheme "auto" }}
|
{{- if eq .Site.Params.defaultTheme "auto" }}
|
||||||
<script>
|
<script>
|
||||||
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||||
document.body.classList.add('dark');
|
document.body.classList.add('dark');
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
{{ end }}
|
{{- end }}
|
||||||
<header class="header">
|
<header class="header">
|
||||||
<nav class="nav">
|
<nav class="nav">
|
||||||
{{- if .IsHome }}
|
{{- if .IsHome }}
|
||||||
@ -12,16 +12,17 @@
|
|||||||
{{- else }}
|
{{- else }}
|
||||||
<p class="logo"><a href="{{ "" | absLangURL }}">{{ .Site.Title }}</a></p>
|
<p class="logo"><a href="{{ "" | absLangURL }}">{{ .Site.Title }}</a></p>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{ $currentPage := . }}
|
{{- $currentPage := . }}
|
||||||
<ul class="menu" id="menu" onscroll="menu_on_scroll()">
|
<ul class="menu" id="menu" onscroll="menu_on_scroll()">
|
||||||
{{- range .Site.Menus.main }}
|
{{- range .Site.Menus.main }}
|
||||||
{{ $menu_item_url := .URL | relLangURL }}
|
{{- $menu_item_url := .URL | relLangURL }}
|
||||||
{{ $page_url:= $currentPage.RelPermalink | relLangURL }}
|
{{- $page_url:= $currentPage.RelPermalink | relLangURL }}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ .URL | absLangURL }}">
|
<a href="{{ .URL | absLangURL }}">
|
||||||
<span {{ if eq $menu_item_url $page_url }}
|
<span {{- if eq $menu_item_url $page_url }}
|
||||||
{{/* the menu item links to the current page (with relLangURL) */}} class="active"
|
{{- /* the menu item links to the current page (with relLangURL) */}} class="active" {{- end }}>
|
||||||
{{ end }}>{{ .Name }}</span>
|
{{ .Name }}
|
||||||
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
{{ with $.Site.Params.homeInfoParams }}
|
{{- with $.Site.Params.homeInfoParams }}
|
||||||
<article class="first-entry">
|
<article class="first-entry">
|
||||||
<header class="entry-header">
|
<header class="entry-header">
|
||||||
<h2>{{ .Title }}</h2>
|
<h2>{{- .Title }}</h2>
|
||||||
</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">
|
||||||
{{- with $.Site.Params.socialIcons }}
|
{{- with $.Site.Params.socialIcons }}
|
||||||
<div class="social-icons">
|
<div class="social-icons">
|
||||||
{{ partial "social-icons.html" . }}
|
{{- partial "social-icons.html" . }}
|
||||||
</div>
|
</div>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</footer>
|
</footer>
|
||||||
</article>
|
</article>
|
||||||
{{end}}
|
{{- end}}
|
@ -1,7 +1,7 @@
|
|||||||
<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" }}" />{{end}}
|
{{- if .imageUrl}}<img src="{{ .imageUrl}}" alt="{{ .imageTitle | default "profile image" }}" />{{- end}}
|
||||||
<h1>{{ .title | default $.Site.Title }}</h1>
|
<h1>{{ .title | default $.Site.Title }}</h1>
|
||||||
{{- with $.Site.Params.socialIcons }}
|
{{- with $.Site.Params.socialIcons }}
|
||||||
<div class="social-icons">
|
<div class="social-icons">
|
||||||
@ -10,9 +10,9 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .buttons }}
|
{{- with .buttons }}
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
{{ partial "indexProfileButtons.html" . }}
|
{{- partial "indexProfileButtons.html" . }}
|
||||||
</div>
|
</div>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{- end}}
|
||||||
</div>
|
</div>
|
@ -1,4 +1,4 @@
|
|||||||
{{ range . -}}
|
{{- range . -}}
|
||||||
<a class="button" href="{{ .url }}" rel="noopener" title="{{ .name | humanize }}">
|
<a class="button" href="{{ .url }}" rel="noopener" title="{{ .name | humanize }}">
|
||||||
<span class="button-inner">{{ .name }}</span>
|
<span class="button-inner">{{ .name }}</span>
|
||||||
</a>
|
</a>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{{ $pageurl := .Permalink }}
|
{{- $pageurl := .Permalink }}
|
||||||
{{ $title := .Title }}
|
{{- $title := .Title }}
|
||||||
<div class="share-buttons">
|
<div class="share-buttons">
|
||||||
<p>Share On</p>
|
<p>Share On</p>
|
||||||
<a class="share-button-single" target="_blank" rel="noopener noreferrer"
|
<a class="share-button-single" target="_blank" rel="noopener noreferrer"
|
||||||
@ -56,5 +56,4 @@
|
|||||||
d="M26.49,29.86H5.5a3.37,3.37,0,0,1-2.47-1,3.35,3.35,0,0,1-1-2.47V5.48A3.36,3.36,0,0,1,3,3,3.37,3.37,0,0,1,5.5,2h21A3.38,3.38,0,0,1,29,3a3.36,3.36,0,0,1,1,2.46V26.37a3.35,3.35,0,0,1-1,2.47A3.38,3.38,0,0,1,26.49,29.86Zm-5.38-6.71a.79.79,0,0,0,.85-.66L24.73,9.24a.55.55,0,0,0-.18-.46.62.62,0,0,0-.41-.17q-.08,0-16.53,6.11a.59.59,0,0,0-.41.59.57.57,0,0,0,.43.52l4,1.24,1.61,4.83a.62.62,0,0,0,.63.43.56.56,0,0,0,.4-.17L16.54,20l4.09,3A.9.9,0,0,0,21.11,23.15ZM13.8,20.71l-1.21-4q8.72-5.55,8.78-5.55c.15,0,.23,0,.23.16a.18.18,0,0,1,0,.06s-2.51,2.3-7.52,6.8Z" />
|
d="M26.49,29.86H5.5a3.37,3.37,0,0,1-2.47-1,3.35,3.35,0,0,1-1-2.47V5.48A3.36,3.36,0,0,1,3,3,3.37,3.37,0,0,1,5.5,2h21A3.38,3.38,0,0,1,29,3a3.36,3.36,0,0,1,1,2.46V26.37a3.35,3.35,0,0,1-1,2.47A3.38,3.38,0,0,1,26.49,29.86Zm-5.38-6.71a.79.79,0,0,0,.85-.66L24.73,9.24a.55.55,0,0,0-.18-.46.62.62,0,0,0-.41-.17q-.08,0-16.53,6.11a.59.59,0,0,0-.41.59.57.57,0,0,0,.43.52l4,1.24,1.61,4.83a.62.62,0,0,0,.63.43.56.56,0,0,0,.4-.17L16.54,20l4.09,3A.9.9,0,0,0,21.11,23.15ZM13.8,20.71l-1.21-4q8.72-5.55,8.78-5.55c.15,0,.23,0,.23.16a.18.18,0,0,1,0,.06s-2.51,2.3-7.52,6.8Z" />
|
||||||
</svg>
|
</svg>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
</div>
|
</div>
|
@ -1,3 +1,4 @@
|
|||||||
{{ range . -}}
|
{{- range . -}}
|
||||||
<a href="{{ .url }}" target="_blank" rel="noopener noreferrer" title="{{ .name | humanize }}" >{{ partial "svg.html" . }}</a>
|
<a href="{{ .url }}" target="_blank" rel="noopener noreferrer"
|
||||||
|
title="{{ .name | humanize }}">{{ partial "svg.html" . }}</a>
|
||||||
{{- end -}}
|
{{- end -}}
|
@ -24,10 +24,10 @@
|
|||||||
{{- $headerLevel := len (seq $headerLevel) -}}
|
{{- $headerLevel := len (seq $headerLevel) -}}
|
||||||
|
|
||||||
{{/* get id="xyz" */}}
|
{{/* get id="xyz" */}}
|
||||||
{{ $id := index (findRE "(id=\"(.*?)\")" $header 9) 0 }}
|
{{- $id := index (findRE "(id=\"(.*?)\")" $header 9) 0 }}
|
||||||
|
|
||||||
{{/* strip id="" to leave xyz (no way to get regex capturing groups in hugo :( */}}
|
{{- /* strip id="" to leave xyz, no way to get regex capturing groups in hugo */ -}}
|
||||||
{{ $cleanedID := replace (replace $id "id=\"" "") "\"" "" }}
|
{{- $cleanedID := replace (replace $id "id=\"" "") "\"" "" }}
|
||||||
{{- $header := replaceRE "<h[1-4].*?>((.|\n])+?)</h[1-4]>" "$1" $header -}}
|
{{- $header := replaceRE "<h[1-4].*?>((.|\n])+?)</h[1-4]>" "$1" $header -}}
|
||||||
|
|
||||||
{{- if ne $i 0 -}}
|
{{- if ne $i 0 -}}
|
||||||
@ -69,7 +69,7 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
<!-- {{- $firstHeaderLevel := len (seq (index (findRE "[1-4]" (index $headers 0) 1) 0)) -}} -->
|
<!-- {{- $firstHeaderLevel := len (seq (index (findRE "[1-4]" (index $headers 0) 1) 0)) -}} -->
|
||||||
{{ $firstHeaderLevel := $largest }}
|
{{- $firstHeaderLevel := $largest }}
|
||||||
{{- $lastHeaderLevel := len (seq (index (findRE "[1-4]" (index $headers (sub (len $headers) 1)) 1) 0)) -}}
|
{{- $lastHeaderLevel := len (seq (index (findRE "[1-4]" (index $headers (sub (len $headers) 1)) 1) 0)) -}}
|
||||||
</li>
|
</li>
|
||||||
{{- range seq (sub $lastHeaderLevel $firstHeaderLevel) -}}
|
{{- range seq (sub $lastHeaderLevel $firstHeaderLevel) -}}
|
||||||
|
Loading…
Reference in New Issue
Block a user