Add themes folder

This commit is contained in:
Markus 2025-06-07 23:02:15 +02:00
parent 78eab7dcac
commit 077da5b941
108 changed files with 6225 additions and 0 deletions

View file

@ -0,0 +1,4 @@
{{- $sidebarWidgets := site.Params.widgets.sidebar -}}
<aside class="sidebar">
{{- partial "widgets/widget_area" ( dict "Widgets" $sidebarWidgets "Scope" . ) -}}
</aside>

View file

@ -0,0 +1,10 @@
{{/* Cloak an e-mail address (first argument) */ -}}
{{- $address_parts := split . "@" -}}
{{- if (eq (len $address_parts) 2) -}}
{{- $user := index $address_parts 0 -}}
{{- $domain := index $address_parts 1 -}}
<span class="cloaked-e-mail" data-user="{{ range $index := seq (sub (len $user) 1) 0 }}{{ substr $user $index 1 }}{{ end }}" data-domain="{{ range $index := seq (sub (len $domain) 1) 0 }}{{ substr $domain $index 1 }}{{ end }}"></span>
{{- else -}}
<span>INVALID E-MAIL ADDRESS</span>
{{- end -}}
{{- /* Dummy comment to strip trailing newline */ -}}

View file

@ -0,0 +1,21 @@
{{ with site.GetPage "/" }}
{{ with .Params.cta }}
<section class="call-to-action bg-1 section-sm overly" style="background-image: url('{{ .bg_image | relURL }}');">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="block">
{{ with .title }}<h2>{{ . | markdownify }}</h2>{{ end }}
{{ with .content }}<p>{{ . | markdownify }}</p>{{ end }}
{{ with .button }}
{{ if .enable }}
<a class="btn btn-main btn-solid-border" href="{{ .link | relLangURL }}">{{ .label }}</a>
{{ end }}
{{ end }}
</div>
</div>
</div>
</div>
</section>
{{ end }}
{{ end }}

View file

@ -0,0 +1,16 @@
<footer class="footer">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="footer-menu">
<ul>
{{ range site.Menus.footer }}
<li><a href="{{ .URL | relLangURL }}">{{ .Name }}</a></li>
{{ end }}
</ul>
</div>
<p class="copyright">{{ site.Params.copyright | markdownify }}</p>
</div>
</div>
</div>
</footer>

View file

@ -0,0 +1,194 @@
<meta charset="utf-8">
<title>{{.Title | default site.Title}}</title>
<!-- base url -->
{{ if or (eq site.BaseURL "/") (eq site.BaseURL "http://localhost:1313/") (eq site.BaseURL "http://examplesite.org/") (eq site.BaseURL "https://examplesite.org/") (eq site.BaseURL "http://examplesite.com/") (eq site.BaseURL "https://examplesite.com/")}}{{else}}
<base href="{{ .Permalink }}">
{{ end }}
<!-- multilingual SEO optimizations -->
{{ if .IsTranslated }}
{{ range .AllTranslations }}
<link rel="alternate" hreflang="{{.Lang}}" href="{{ .RelPermalink | absLangURL }}">
{{ end }}
<link rel="alternate" hreflang="x-default" href="{{ .RelPermalink | absLangURL }}">
{{ end }}
<!-- mobile responsive meta -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5">
<meta name="description" content="{{ .Params.Description | default site.Params.description }}">
{{ with site.Params.author }}
<meta name="author" content="{{ . }}">{{ end }}
{{ hugo.Generator }}
<!-- theme meta -->
<meta name="theme-name" content="airspace-hugo" />
<!-- theme meta -->
<meta name="theme-name" content="airspace-hugo" />
<!-- google site verification -->
{{ with site.Params.site_verification.google }}
<meta name="google-site-verification" content="{{ . }}" />
{{ end }}
<!-- bing site verification -->
{{ with site.Params.site_verification.bing }}
<meta name="msvalidate.01" content="{{ . }}" />
{{ end }}
<!-- baidu site verification -->
{{ with site.Params.site_verification.baidu }}
<meta name="baidu-site-verification" content="{{ . }}" />
{{ end }}
<!-- favicon -->
{{ $favicon:= site.Params.favicon }}
{{ if $favicon }}
{{ if fileExists (add `assets/` $favicon) }}
{{ $favicon:= resources.Get $favicon }}
{{ $favicon_16:= $favicon.Resize "16x png"}}
{{ $favicon_32:= $favicon.Resize "32x png"}}
{{ $favicon_180:= $favicon.Resize "180x png"}}
<link rel="shortcut icon" href="{{$favicon_32.RelPermalink}}" type="image/x-icon">
<link rel="icon" href="{{$favicon_32.RelPermalink}}" type="image/x-icon">
<link rel="icon" type="image/png" sizes="16x16" href="{{$favicon_16.RelPermalink}}">
<link rel="icon" type="image/png" sizes="32x32" href="{{$favicon_32.RelPermalink}}">
<link rel="apple-touch-icon" sizes="180x180" href="{{$favicon_180.RelPermalink}}">
{{ end }}
{{ end }}
<link rel="manifest" href="{{`manifest.webmanifest` | relLangURL }}">
<meta name="msapplication-TileColor" content="{{site.Params.variables.color_primary | default `#da532c`}}">
<meta name="theme-color" content="{{site.Params.variables.body_color | default `#ffffff` }}">
<!-- Open Graph image and Twitter Card meta-data -->
{{ $image_path := .Params.image | default site.Params.image }}
{{ $image_path_local := printf "assets/%s" $image_path }}
{{ $image_ext := trim (path.Ext $image_path | lower) "." }}
{{ if fileExists $image_path_local }}
<meta property="og:image" content="{{ $image_path | absURL }}" />
<!-- If not SVG, read image aspect ratio and define Twitter Card and Open Graph width and height -->
{{ if ne $image_ext "svg" }}
{{ with (imageConfig $image_path_local) }}
{{ if (and (gt .Width 144) (gt .Height 144)) }}
<meta name="twitter:image" content="{{ $image_path | absURL }}" />
<meta name="twitter:card"
content="summary{{ if (and (gt .Width 300) (gt .Height 157) (not (eq .Width .Height))) }}_large_image{{ end }}">
{{ end }}
<meta property="og:image:width" content="{{ .Width }}">
<meta property="og:image:height" content="{{ .Height }}">
{{ end }}
{{ end }}
<meta property="og:image:type"
content="image/{{ if eq $image_ext `svg` }}svg+xml{{ else }}{{ replaceRE `^jpg$` `jpeg` $image_ext }}{{ end }}">
{{ end }}
<meta name="twitter:title" content="{{ with .Title }}{{ . }}{{ else }}{{ site.Title }}{{ end }}" />
<meta name="twitter:description"
content="{{ with .Description }}{{ . }}{{ else }}{{ if .IsPage }}{{ .Summary }}{{ else }}{{ with site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
{{ with Site.Params.Social.twitter }}
<meta name="twitter:site" content="@{{ . }}" />{{ end }}
{{ range Site.Params.Author }}
{{ with .twitter }}
<meta name="twitter:creator" content="@{{ . }}" />{{ end }}
{{ end }}
{{ template "_internal/opengraph.html" . }}
<!-- google analytics -->
{{ template "_internal/google_analytics.html" . }}
<!-- google tag manager -->
{{ with site.Params.google_tag_manager }}
<script>
var dataLayer = window.dataLayer = window.dataLayer || [];
dataLayer.push({
page: '{{ .Title }}',
categories: 'only examples about your dataLayer'
});
</script>
<script>
(function (w, d, s, l, i) {
w[l] = w[l] || [];
w[l].push({
'gtm.start': new Date().getTime(),
event: 'gtm.js'
});
var f = d.getElementsByTagName(s)[0],
j = d.createElement(s),
dl = l != 'dataLayer' ? '&l=' + l : '';
j.async = true;
j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
f.parentNode.insertBefore(j, f);
})(window, document, 'script', 'dataLayer', '{{ . }}');
</script>
{{ end }}
<!-- matomo analytics -->
{{ with site.Params.matomo }}
{{ if .enable }}
<script type="text/javascript">
var _paq = window._paq = window._paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function () {
var u = "{{.url|safeURL}}";
_paq.push(['setTrackerUrl', u + 'matomo.php']);
_paq.push(['setSiteId', '{{.id}}']);
var d = document,
g = d.createElement('script'),
s = d.getElementsByTagName('script')[0];
g.type = 'text/javascript';
g.async = true;
g.src = u + 'matomo.js';
s.parentNode.insertBefore(g, s);
})();
</script>
{{ end }}
{{ end }}
<!-- Baidu analytics -->
{{ if site.Params.baidu.enable }}
{{ with site.Params.baidu.analytics_id }}
<script>
var _hmt = _hmt || [];
(function () {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?{{ . }}";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
{{ end }}
{{ end }}
<!-- Plausible Analytics -->
{{ with site.Params.plausible }}
{{ if .enable }}
{{ with .domain }}
<script defer data-domain="{{ . }}" src="https://plausible.io/js/plausible.js"></script>
{{ end }}
{{ end }}
{{ end }}
<!-- Counter Analytics -->
{{ with site.Params.counter }}
{{ if .enable }}
{{ with .id }}
<script src="https://cdn.counter.dev/script.js" data-id="{{ . }}" data-utcoffset="{{ site.Params.counter.utc_offset | default "0" }}"></script>
{{ end }}
{{ end }}
{{ end }}
<!-- Google reCaptcha -->
{{ if site.Params.contact.form.use_recaptcha }}
<script src="https://www.google.com/recaptcha/api.js?render={{ site.Params.recaptcha_site_key }}"></script>
<script>
grecaptcha.ready(function() {
grecaptcha.execute('{{ site.Params.recaptcha_site_key }}', {action: 'homepage'})
.then(function(token) {
document.getElementById('captchaResponse').value = token;
});
});
</script>
{{ end }}

View file

@ -0,0 +1,83 @@
<!-- navigation -->
<header class="{{if site.Params.navbar_fixed}}sticky-top{{end}} navigation">
<div class="container-fluid">
<!-- navbar -->
<nav class="navbar">
<div class="navbar-header">
<!-- navbar toggler -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navigation" aria-expanded="true">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- navbar brand/logo -->
<a class="navbar-brand" href="{{ site.BaseURL | relLangURL }}">
{{ partial "logo.html" . }}
</a>
</div>
<div class="collapse navbar-collapse" id="navigation">
<ul class="nav navbar-nav navbar-right">
<!-- menu active -->
{{ $currentPage := . }}
{{ range site.Menus.main }}
{{ $menuURL := .URL | absLangURL }}
{{ $pageURL:= $currentPage.Permalink | absLangURL }}
{{ $active := eq $menuURL $pageURL }}
{{ if .HasChildren }}
<li class="nav-item dropdown
{{ range .Children }}
{{ $childURL := .URL | absLangURL }}
{{ $active := eq $childURL $pageURL }}
{{ if $active }}current{{ end }}
{{ end }}">
<a class="dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">
{{ .Name }} <span class="fas fa-angle-down"></span>
</a>
<ul class="dropdown-menu">
{{ range .Children }}
{{ $childURL := .URL | absLangURL }}
{{ $active := eq $childURL $pageURL }}
<li><a class="dropdown-item {{ if $active }}current{{ end }}" {{if findRE `^http` .URL}}target="_blank" rel="noopener" {{end}}
href="{{if findRE `^#` .URL}}{{if not $.IsHome}}{{site.BaseURL | relLangURL}}{{end}}{{.URL}}{{else}}{{.URL | relLangURL}}{{end}}">{{ .Name }}</a></li>
{{ end }}
</ul>
</li>
{{ else }}
<li class="nav-item">
<a class="nav-link {{ if $active }}current{{ end }}" {{if findRE `^http` .URL}}target="_blank" rel="noopener" {{end}}
href="{{if findRE `^#` .URL}}{{if not $.IsHome}}{{site.BaseURL | relLangURL}}{{end}}{{.URL}}{{else}}{{.URL | relLangURL}}{{end}}">{{.Name}}</a>
</li>
{{ end }}
{{ end }}
<li>
<!-- Language List -->
{{ if .IsTranslated }}
<select class="m-2 border-0" id="select-language" onchange="location = this.value;">
{{ $siteLanguages := site.Languages}}
{{ $pageLang := .Page.Lang}}
{{ range .Page.AllTranslations }}
{{ $translation := .}}
{{ range $siteLanguages }}
{{ if eq $translation.Lang .Lang }}
{{ $selected := false }}
{{ if eq $pageLang .Lang}}
<option id="{{ $translation.Language }}" value="{{ $translation.RelPermalink }}" selected>{{ .LanguageName }}
</option>
{{ else }}
<option id="{{ $translation.Language }}" value="{{ $translation.RelPermalink }}">{{ .LanguageName }}</option>
{{ end }}
{{ end }}
{{ end }}
{{ end }}
</select>
{{ end }}
</li>
</ul>
</div>
</nav>
</div>
</header>
<!-- /navigation -->

View file

@ -0,0 +1,50 @@
{{ $logoPath:= site.Params.logo }}
{{ $logoWidth:= replace site.Params.logo_width "px" "x" }}
<!-- checking logo existance -->
{{ if $logoPath }}
{{ if fileExists (add `assets/` $logoPath) }}
{{ $logo:= resources.Get $logoPath }}
<!-- logo extention -->
{{ $logoExt := path.Ext $logo }}
<!-- logo height, width (if not svg) -->
{{ if eq $logoExt `.svg` }}
{{ .Scratch.Set "logo-width" "" }}
{{ .Scratch.Set "logo-height" "" }}
{{ else }}
{{ .Scratch.Set "logo-width" $logo.Width }}
{{ .Scratch.Set "logo-height" $logo.Height }}
{{ end }}
{{ $logoDefaultWidth:= .Scratch.Get "logo-width" }}
{{ $logoDefaultHeight:= .Scratch.Get "logo-height" }}
<!-- checking gif -->
{{ if eq $logoExt ".gif" }}
{{ .Scratch.Set "logo" ($logo.Resize $logoWidth).RelPermalink }}
<!-- checking svg -->
{{ else if eq $logoExt ".svg"}}
{{ .Scratch.Set "logo" $logo.RelPermalink }}
<!-- logo processing to webp -->
{{ else }}
{{ $logoDefaultWidth:= add (string $logoDefaultWidth) "x"}}
{{ $logoWidth:= $logoWidth | default $logoDefaultWidth }}
{{ $options := add (string $logoWidth) " webp" }}
{{ .Scratch.Set "logo" ($logo.Resize $options).RelPermalink }}
<!-- logo fallback -->
{{ .Scratch.Set "logo_fallback" ($logo.Resize $logoWidth).RelPermalink }}
{{ end }}
<img loading="prelaod" decoding="async" class="img-fluid" width="{{replace $logoWidth `x` `` | default $logoDefaultWidth}}" height="{{$logoDefaultHeight}}" src="{{.Scratch.Get `logo`}}" alt="{{ site.Title }}" onerror="this.onerror=null;this.src='{{.Scratch.Get `logo_fallback`}}'">
{{ else }}
<strong class="text-danger">`{{$logoPath}}` doesn't exist</strong>
{{ end }}
<!-- / checking logo existance -->
<!-- logo text -->
{{ else if site.Params.logo_text }}
{{ site.Params.logo_text | markdownify }}
<!-- logo title -->
{{ else }}
{{ site.Title | markdownify }}
{{ end }}

View file

@ -0,0 +1,12 @@
<section class="page-title bg-2" style="background-image: url('{{ .Params.bg_image | relURL }}');">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="block">
<h1>{{ .Title }}</h1>
<p>{{ .Params.description }}</p>
</div>
</div>
</div>
</div>
</section>

View file

@ -0,0 +1,38 @@
{{ if site.Params.preloader.enable }}
<div class="preloader">
<!-- get image path -->
{{ $preloaderPath:= site.Params.preloader.preloader }}
{{ if $preloaderPath }}
<!-- check image existence -->
{{ if fileExists (add `assets/` $preloaderPath) }}
{{ $preloader:= resources.Get $preloaderPath }}
<!-- image extension -->
{{ $preloader_ext := path.Ext $preloader }}
<!-- image width -->
{{ $preloader_width := $preloader.Width }}
<!-- not gif -->
{{ if ne $preloader_ext ".gif" }}
<!-- webp image -->
{{ $option_webp := add (add (string $preloader_width) "x") " webp" }}
{{ .Scratch.Set "preloader" ($preloader.Resize $option_webp).RelPermalink }}
<!-- fallback image -->
{{ $option := add (string $preloader_width) "x" }}
{{ .Scratch.Set "preloader_fallback" ($preloader.Resize $option).RelPermalink }}
<!-- gif image -->
{{ else }}
{{ .Scratch.Set "preloader" $preloader.RelPermalink }}
{{ end }}
<img class="img-fluid" loading="preload" decoding="async" src="{{.Scratch.Get `preloader`}}" aria-label="preloader" title="preloader"
onerror="this.onerror=null;this.src='{{.Scratch.Get `preloader_fallback`}}'" alt="preloader">
{{ end }}
{{ end }}
<!-- /check image existence -->
</div>
{{ end }}

View file

@ -0,0 +1,15 @@
<!-- JS Plugins + Main script -->
{{ $scripts := slice }}
{{ range site.Params.plugins.js}}
{{ if findRE "^http" .link }}
<script src="{{ .link | relURL }}" type="application/javascript" {{.attributes | safeHTMLAttr}}></script>
{{ else }}
{{ $scripts = $scripts | append (resources.Get .link) }}
{{ end }}
{{ end }}
{{ $scripts := $scripts | append (resources.Get "js/script.js" | minify) }}
{{ $scripts := $scripts | resources.Concat "js/script.js" | minify | fingerprint "sha512" }}
<script crossorigin="anonymous" defer="defer" integrity="{{ $scripts.Data.Integrity }}" type="application/javascript">{{$scripts.Content | safeJS}}</script>

View file

@ -0,0 +1,25 @@
{{ with site.GetPage "/service" }}
{{ with .Params.service }}
<section class="service">
<div class="container">
<div class="row">
<div class="section-title">
{{ with .title }}<h2>{{ . | markdownify }}</h2>{{ end }}
{{ with .description }}<p>{{ . | markdownify }}</p>{{ end }}
</div>
</div>
<div class="row">
{{ range .service_item }}
<div class="col-sm-6 col-md-3">
<div class="service-item">
<i class="{{ .icon }}"></i>
<h4>{{ .name | markdownify }}</h4>
<p>{{ .content | markdownify }}</p>
</div>
</div>
{{ end }}
</div>
</div>
</section>
{{ end }}
{{ end }}

View file

@ -0,0 +1,31 @@
<!-- DNS preconnect -->
<meta http-equiv="x-dns-prefetch-control" content="on">
<link rel="preconnect" href="//ajax.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous">
<link rel="preconnect" href="https://use.fontawesome.com" crossorigin>
<link rel="preconnect" href="//cdnjs.cloudflare.com">
<link rel="preconnect" href="//www.googletagmanager.com">
<link rel="preconnect" href="//www.google-analytics.com">
<link rel="dns-prefetch" href="https://fonts.gstatic.com">
<link rel="dns-prefetch" href="https://use.fontawesome.com">
<link rel="dns-prefetch" href="//ajax.googleapis.com">
<link rel="dns-prefetch" href="//cdnjs.cloudflare.com">
<link rel="dns-prefetch" href="//www.googletagmanager.com">
<link rel="dns-prefetch" href="//www.google-analytics.com">
<link rel="dns-prefetch" href="//fonts.googleapis.com">
<link rel="dns-prefetch" href="//connect.facebook.net">
<link rel="dns-prefetch" href="//platform.linkedin.com">
<link rel="dns-prefetch" href="//platform.twitter.com">
<!-- plugins + stylesheet -->
{{ $styles := slice }}
{{ range site.Params.plugins.css }}
{{ if findRE "^http" .link }}
<link crossorigin="anonymous" media="all" rel="stylesheet" href="{{ .link | relURL }}" {{.attributes | safeHTMLAttr}} >
{{ else }}
{{ $styles = $styles | append (resources.Get .link) }}
{{ end }}
{{ end }}
{{ $styles := $styles | append (resources.Get "scss/style.scss" | resources.ExecuteAsTemplate "style.scss" . | toCSS) }}
{{ $styles := $styles | resources.Concat "/css/style.css" | minify | fingerprint "sha512"}}
<style type="text/css">{{$styles.Content | safeCSS}}</style>

View file

@ -0,0 +1,16 @@
<div class="widget widget-latest-post">
<h4 class="widget-title">{{ i18n "latest_posts" }}</h4>
{{ range first 4 (where site.Pages "Type" "post") }}
<div class="media">
<a class="pull-left" href="{{ .RelPermalink }}">
{{ if isset .Params "image" }}
<img class="media-object" src="{{ .Params.image | relURL }}" alt="{{ .Title }}">
{{ end }}
</a>
<div class="media-body">
<h4 class="media-heading"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h4>
<p>{{ .Summary | truncate 50 }}</p>
</div>
</div>
{{ end }}
</div>

View file

@ -0,0 +1,12 @@
<div class="widget widget-category">
<h4 class="widget-title">{{ i18n "categories" }}</h4>
{{- if isset site.Taxonomies "categories" }}
{{- if not (eq (len site.Taxonomies.categories) 0) }}
<ul class="widget-category-list">
{{- range site.Taxonomies.categories }}
<li><a href="{{ .Page.RelPermalink }}"{{ if (and (eq $.Page.Kind "term") (eq $.Page.Type "categories") (eq $.Page.Title .Page.Title)) }} class="current"{{ end }}>{{ .Page.Title }}</a></li>
{{- end }}
</ul>
{{- end }}
{{- end }}
</div>

View file

@ -0,0 +1,12 @@
<div class="widget widget-tag">
<h4 class="widget-title">{{ i18n "tags" }}</h4>
{{- if isset site.Taxonomies "tags" }}
{{- if not (eq (len site.Taxonomies.tags) 0) }}
<ul class="widget-tag-list">
{{- range site.Taxonomies.tags }}
<li><a href="{{ .Page.RelPermalink }}"{{ if (and (eq $.Page.Kind "term") (eq $.Page.Type "tags") (eq $.Page.Title .Page.Title)) }} class="current"{{ end }}>{{ .Page.Title }}</a></li>
{{- end }}
</ul>
{{- end }}
{{- end }}
</div>

View file

@ -0,0 +1,3 @@
{{- range .Widgets -}}
{{- partial ( print "widgets/" . ) $.Scope -}}
{{- end -}}