My bad
This commit is contained in:
@ -1,55 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{.Site.LanguageCode}}">
|
||||
<head>
|
||||
{{- if .Site.Params.googleTagManager -}}{{- partial "googleTagManager_head.html" . -}}{{- end -}}
|
||||
{{- partial "analytics.html" . -}}
|
||||
{{- partial "site-meta.html" -}}
|
||||
{{ $author := (.Params.author | default .Site.Params.author.name) -}}
|
||||
<meta name="author" content="{{ $author }}">
|
||||
{{ with .Site.Params.themeColor -}}
|
||||
<meta name="theme-color" content="{{.}}">
|
||||
<meta name="msapplication-TileColor" content="{{.}}">
|
||||
<link rel="mask-icon" href="{{"safari-pinned-tab.svg" | relURL}}" color="{{.}}">
|
||||
{{- end -}}
|
||||
{{- with .Page.Params.description | default .Site.Params.description -}}<meta name="description" content="{{.}}">{{- end -}}
|
||||
{{- partial "structured-data.html" . -}}
|
||||
<title>{{.Title}}</title>
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Title | safeHTML }}
|
||||
{{ end -}}
|
||||
{{ $style := resources.Get "scss/style.scss" | resources.ExecuteAsTemplate "css/style.css" . | toCSS | minify | fingerprint -}}
|
||||
<link rel="stylesheet dns-prefetch preconnect preload prefetch" as="style" href="{{ $style.Permalink }}" {{ printf "integrity=%q" $style.Data.Integrity | safeHTMLAttr }} crossorigin="anonymous">
|
||||
{{- range .Params.custom_css -}}
|
||||
{{ $c_css := resources.Get . | resources.ExecuteAsTemplate "css/style.css" . | toCSS | minify | fingerprint -}}
|
||||
<link rel="stylesheet preload prefetch" as="style" href="{{ $c_css.Permalink }}" {{ printf "integrity=%q" $c_css.Data.Integrity | safeHTMLAttr }} crossorigin="anonymous">
|
||||
{{- end -}}
|
||||
{{- block "head" . -}}{{- end -}}
|
||||
{{- if templates.Exists "partials/extra-head.html" -}}{{- partial "extra-head.html" . -}}{{- end -}}</head>
|
||||
<body id="page">
|
||||
{{- if .Site.Params.googleTagManager -}}{{- partial "googleTagManager_body.html" . -}}{{- end -}}
|
||||
{{- block "header" . -}}{{ end -}}
|
||||
{{- block "main" . -}}{{ end -}}
|
||||
{{- block "footer" . -}}{{ end }}
|
||||
{{- partial "scroll-to-top.html" . }}
|
||||
{{- $main := resources.Get "js/main.js" -}}
|
||||
{{- if .Site.Params.code_copy_button | default true -}}
|
||||
{{ $codeCopy := resources.Get "js/code-copy.js" -}}
|
||||
{{ $script := slice $main $codeCopy | resources.Concat "js/bundle.js" | minify | fingerprint -}}
|
||||
<script async src="{{ $script.Permalink }}" {{ printf "integrity=%q" $script.Data.Integrity | safeHTMLAttr }} crossorigin="anonymous"></script>
|
||||
{{- else -}}
|
||||
{{ $script := $main | minify | fingerprint -}}
|
||||
<script async src="{{ $script.Permalink }}" {{ printf "integrity=%q" $script.Data.Integrity | safeHTMLAttr }} crossorigin="anonymous"></script>
|
||||
{{- end -}}
|
||||
{{- if and (not (eq .Site.Params.shareSocial nil)) (.Site.Params.shareSocial) -}}
|
||||
{{ $linkshare := resources.Get "js/link-share.js" | minify | fingerprint -}}
|
||||
<script async src="{{ $linkshare.Permalink }}" {{ printf "integrity=%q" $linkshare.Data.Integrity | safeHTMLAttr }} crossorigin="anonymous"></script>
|
||||
{{- end -}}
|
||||
{{- range .Params.custom_js -}}
|
||||
{{ $c_js := resources.Get . | minify | fingerprint -}}
|
||||
<script defer src="{{ $c_js.Permalink }}" {{ printf "integrity=%q" $c_js.Data.Integrity | safeHTMLAttr }} crossorigin="anonymous"></script>
|
||||
{{- end }}
|
||||
{{- partial "mathjax.html" . -}}
|
||||
{{- if templates.Exists "partials/extra-foot.html" -}}{{- partial "extra-foot.html" . -}}{{- end }}
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,33 +0,0 @@
|
||||
{{ define "header" }}
|
||||
{{ partialCached "header.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
<main class="site-main section-inner thin animated fadeIn faster">
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{- if .Content }}
|
||||
<div class="content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{- end }}
|
||||
{{- range .Data.Pages.GroupByDate "2006" }}
|
||||
<div class="posts-group">
|
||||
<div class="post-year" id="{{ .Key }}">{{ .Key }}</div>
|
||||
<ul class="posts-list">
|
||||
{{- range .Pages }}
|
||||
<li class="post-item">
|
||||
<a href="{{.Permalink}}">
|
||||
<span class="post-title">{{.Title}}</span>
|
||||
<span class="post-day">{{ .Date.Format .Site.Params.dateformShort }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{- end }}
|
||||
</main>
|
||||
{{ end }}
|
||||
|
||||
{{ define "footer" }}
|
||||
{{ partialCached "footer.html" . }}
|
||||
{{ end }}
|
@ -1,34 +0,0 @@
|
||||
{{ define "head" }}
|
||||
{{ if .Params.featuredImg -}}
|
||||
<style>.bg-img {background-image: url('{{.Params.featuredImg}}');}</style>
|
||||
{{- else if .Params.images -}}
|
||||
{{- range first 1 .Params.images -}}
|
||||
<style>.bg-img {background-image: url('{{. | absURL}}');}</style>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
|
||||
{{ define "header" }}
|
||||
{{ partial "header.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
{{- if (or .Params.images .Params.featuredImg) }}
|
||||
<div class="bg-img"></div>
|
||||
{{- end }}
|
||||
<main class="site-main section-inner thin animated fadeIn faster">
|
||||
<h1>{{ .Title }}</h1>
|
||||
<div class="content">
|
||||
{{ .Content | replaceRE "(<h[1-6] id=\"([^\"]+)\".+)(</h[1-6]+>)" `${1}<a href="#${2}" class="anchor" aria-hidden="true"><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"><path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path><line x1="8" y1="12" x2="16" y2="12"></line></svg></a>${3}` | safeHTML }}
|
||||
</div>
|
||||
{{- if .Params.comments }}
|
||||
<div id="comments" class="thin">
|
||||
{{ partial "comments.html" . }}
|
||||
</div>
|
||||
{{- end }}
|
||||
</main>
|
||||
{{ end }}
|
||||
|
||||
{{ define "footer" }}
|
||||
{{ partialCached "footer.html" . }}
|
||||
{{ end }}
|
Reference in New Issue
Block a user