redesign 2023

This commit is contained in:
m3tam3re
2023-10-12 14:01:05 +02:00
commit 19bfc7311a
3053 changed files with 76380 additions and 0 deletions

View File

@ -0,0 +1,48 @@
{{- $cdn := .Scratch.Get "cdn" | default dict -}}
{{- $fingerprint := .Scratch.Get "fingerprint" -}}
{{- if not .Site.Params.app.noFavicon -}}
{{- with .Site.Params.app.svgFavicon -}}
<link rel="icon" href="{{ . }}">
{{- else -}}
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
{{- end -}}
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
{{- with .Site.Params.app.iconColor -}}
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="{{ . }}">
{{- end -}}
{{- if eq .Site.Params.enablePWA true -}}
<link rel="manifest" href="/site.webmanifest">
{{- end -}}
{{- end -}}
<link rel="canonical" href="{{ .Permalink }}" />
{{- if .PrevInSection -}}
<link rel="prev" href="{{ .PrevInSection.Permalink }}" />
{{- end -}}
{{- if .NextInSection -}}
<link rel="next" href="{{ .NextInSection.Permalink }}" />
{{- end -}}
{{- with .OutputFormats.Get "RSS" -}}
<link rel="alternate" href="{{ .RelPermalink }}" type="application/rss+xml" title="{{ $.Site.Title }}">
<link rel="feed" href="{{ .RelPermalink }}" type="application/rss+xml" title="{{ $.Site.Title }}">
{{- end -}}
{{- /* style.min.css */ -}}
{{- $style := dict "Source" "css/style.scss" "Fingerprint" $fingerprint -}}
{{- $options := dict "targetPath" "css/style.min.css" "enableSourceMap" true -}}
{{- $style = dict "Context" . "ToCSS" $options | merge $style -}}
{{- partial "plugin/style.html" $style -}}
{{- /* Font Awesome */ -}}
{{- $source := $cdn.fontawesomeFreeCSS | default "lib/fontawesome-free/all.min.css" -}}
{{- $style := dict "Source" $source "Fingerprint" $fingerprint -}}
{{- partial "plugin/style.html" $style -}}
{{- /* Animate.css */ -}}
{{- $source := $cdn.animateCSS | default "lib/animate/animate.min.css" -}}
{{- $style := dict "Source" $source "Fingerprint" $fingerprint -}}
{{- partial "plugin/style.html" $style -}}

View File

@ -0,0 +1,56 @@
{{- $params := .Scratch.Get "params" -}}
<meta name="author" content="{{ .Site.Author.name }}">
<meta name="author-link" content="{{ .Site.Author.link }}">
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ if .IsPage | and .Summary }}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
{{- $keywords := .Keywords -}}
{{- if not $keywords -}}
{{- if .IsPage | and .Params.tags -}}
{{- $keywords = .Params.tags -}}
{{- else -}}
{{- $keywords = .Site.Params.keywords -}}
{{- end -}}
{{- end -}}
{{- with $keywords -}}
<meta name="keywords" content='{{ delimit . ", " }}' />
{{- end -}}
{{- template "_internal/schema.html" . -}}
{{- template "_internal/opengraph.html" . -}}
{{- template "_internal/twitter_cards.html" . -}}
<meta name="application-name" content="{{ .Site.Params.app.title | default .Site.Title }}">
<meta name="apple-mobile-web-app-title" content="{{ .Site.Params.app.title | default .Site.Title }}">
{{- with .Site.Params.app.themeColor -}}
{{- $color := . -}}
{{- if ne (len $color) 2 -}}
{{- $color = dict "light" . "dark" . -}}
{{- end -}}
<meta name="theme-color" data-light="{{ $color.light }}" data-dark="{{ $color.dark }}" content="{{ $color.light }}">
{{- end -}}
{{- with .Site.Params.app.tileColor -}}
<meta name="msapplication-TileColor" content="{{ . }}">
{{- end -}}
<script type="text/javascript">
/** This section is only needed once per page if manually copying **/
if (typeof MauticSDKLoaded == 'undefined') {
var MauticSDKLoaded = true;
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://ma.m3tam3re.com/media/js/mautic-form.js?vfad3b6d1';
script.onload = function() {
MauticSDK.onLoad();
};
head.appendChild(script);
var MauticDomain = 'https://ma.m3tam3re.com';
var MauticLang = {
'submittingMessage': "Please wait..."
}
}else if (typeof MauticSDK != 'undefined') {
MauticSDK.onLoad();
}
</script>

View File

@ -0,0 +1,167 @@
{{- $params := .Scratch.Get "params" -}}
{{- with .Site.Params.verification.google -}}
<meta name="google-site-verification" content="{{ . }}" />
{{- end -}}
{{- with .Site.Params.verification.bing -}}
<meta name="msvalidate.01" content="{{ . }}" />
{{- end -}}
{{- with .Site.Params.verification.yandex -}}
<meta name="yandex-verification" content="{{ . }}" />
{{- end -}}
{{- with .Site.Params.verification.pinterest -}}
<meta name="p:domain_verify" content="{{ . }}" />
{{- end -}}
{{- with .Site.Params.verification.baidu -}}
<meta name="baidu-site-verification" content="{{ . }}" />
{{- end -}}
{{- with .Site.Params.verification.so -}}
<meta name="360-site-verification" content="{{ . }}" />
{{- end -}}
{{- with .Site.Params.verification.sogou -}}
<meta name="sogou_site_verification" content="{{ . }}" />
{{- end -}}
{{- /* Home SEO */ -}}
{{- if .IsHome -}}
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"url": "{{ .Permalink }}",
{{- with .Site.LanguageCode -}}
"inLanguage": "{{ . }}",
{{- end -}}
{{- with .Site.Author.name -}}
"author": {
"@type": "Person",
"name": {{ . | safeHTML }}
},
{{- end -}}
{{- with .Site.Params.description -}}
"description": {{ . | safeHTML }},
{{- end -}}
{{- $image := .Site.Params.seo.image -}}
{{- with dict "Path" $image "Resources" .Resources | partial "function/resource.html" -}}
"image": {
"@type": "ImageObject",
"url": "{{ .Permalink }}",
"width": {{ .Width }},
"height": {{ .Height }}
},
{{- else -}}
{{- with $image -}}
"image": "{{ . | absURL }}",
{{- end -}}
{{- end -}}
{{- with .Site.Params.seo.thumbnailUrl -}}
{{- with dict "Path" . "Resources" $.Resources | partial "function/resource.html" -}}
"thumbnailUrl": "{{ .Permalink }}",
{{- else -}}
"thumbnailUrl": "{{ . | absURL }}",
{{- end -}}
{{- end -}}
{{- with .Site.Copyright -}}
"license": "{{ . | safeHTML }}",
{{- end -}}
"name": {{ .Site.Title | safeHTML }}
}
</script>
{{- /* Page SEO */ -}}
{{- else if .IsPage -}}
{{- $authorName := .Site.Author.name | default (T "single.author") -}}
{{- with .Params.author -}}
{{- if reflect.IsMap . -}}
{{- $authorName = cond (isset . "name") .name $authorName -}}
{{- else -}}
{{- $authorName = . -}}
{{- end -}}
{{- end -}}
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "BlogPosting",
"headline": {{ .Title | safeHTML }},
"inLanguage": "{{ .Site.LanguageCode }}",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "{{ .Permalink }}"
},
{{- $images := $params.seo.images | default slice -}}
{{- if not $images -}}
{{- with .Resources.GetMatch "featured-image-preview" -}}
{{- $images = slice "featured-image-preview" -}}
{{- end -}}
{{- with .Resources.GetMatch "featured-image" -}}
{{- $images = slice "featured-image" -}}
{{- end -}}
{{- end -}}
{{- with .Site.Params.seo.image -}}
{{- $images = $images | default (slice .) -}}
{{- end -}}
{{- with $images -}}
"image": [
{{- range $index, $value := . -}}
{{- if gt $index 0 }},{{ end -}}
{{- with dict "Path" $value "Resources" $.Resources | partial "function/resource.html" -}}
{
"@type": "ImageObject",
"url": "{{ .Permalink }}",
"width": {{ .Width }},
"height": {{ .Height }}
}
{{- else -}}
{{- with $value -}}
"{{ . | absURL }}"
{{- end -}}
{{- end -}}
{{- end -}}
],
{{- end -}}
"genre": "{{ .Type }}",
{{- with .Params.tags -}}
"keywords": "{{ delimit . ", " }}",
{{- end -}}
"wordcount": {{ .WordCount }},
"url": "{{ .Permalink }}",
{{- if not .PublishDate.IsZero -}}
"datePublished": {{ .PublishDate.Format "2006-01-02T15:04:05-07:00" | safeHTML }},
{{- else if not .Date.IsZero -}}
"datePublished": {{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }},
{{- end -}}
{{- with .Lastmod -}}
"dateModified": {{ .Format "2006-01-02T15:04:05-07:00" | safeHTML }},
{{- end -}}
{{- with .Site.Copyright -}}
"license": {{ . | safeHTML }},
{{- end -}}
{{- $publisher := $authorName | dict "name" -}}
{{- $publisher = $params.seo.publisher | default dict | merge $publisher -}}
"publisher": {
"@type": "Organization",
"name": {{ $publisher.name | safeHTML }}
{{- $logo := $publisher.logoUrl -}}
{{- with dict "Path" $logo "Resources" .Resources | partial "function/resource.html" -}}
,"logo": {
"@type": "ImageObject",
"url": "{{ .Permalink }}",
"width": {{ .Width }},
"height": {{ .Height }}
}
{{- else -}}
{{- with $logo -}}
,"logo": "{{ . | absURL }}"
{{- end -}}
{{- end -}}
},
{{- with $authorName -}}
"author": {
"@type": "Person",
"name": {{ . | safeHTML }}
},
{{- end -}}
"description": {{ .Description | safeHTML }}
}
</script>
{{- end -}}