diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index c1a52f9..49e2169 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -2,22 +2,20 @@ {{- partial "head.html" . -}} - - {{- partial "header.html" . -}} -
- {{- block "head" . -}}{{- end }} + {{- partial "header.html" . -}} +
+ {{- block "head" . -}}{{- end }} -
-
- {{- block "main" . -}}{{- end }} -
- +
+
+ {{- block "main" . -}}{{- end }}
-
- {{- partial "footer.html" . -}} - + + +
+ {{- partial "footer.html" . -}} {{- partial "script.html" . -}} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index c687834..56981bc 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -8,9 +8,9 @@ {{- partial "widget/header.html" (dict "title" "About Me") -}} {{- partial "widget/aboutme.html" (dict "avatar" .Site.Author.avatar "description" .Site.Author.description) -}} - {{ with .Site.Author.social }} + {{- with .Site.Author.social }} {{- partial "widget/header.html" (dict "title" "Contact Me") -}} {{- partial "widget/socials.html" . -}} - {{ end }} + {{ end -}} {{ end }} \ No newline at end of file diff --git a/layouts/index.html b/layouts/index.html index 2e5d380..03b59de 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -22,12 +22,12 @@ {{ end }} {{ define "sidebar" }} - {{ if isset .Site.Author "linkdata" }} - {{ with (index .Site.Data .Site.Author.linkdata) }} + {{- if isset .Site.Author "linkdata" -}} + {{- with (index .Site.Data .Site.Author.linkdata) }}
{{- partial "widget/header.html" (dict "title" "Links") -}} {{- partial "widget/links.html" . -}}
- {{ end }} - {{ end }} -{{ end }} \ No newline at end of file + {{- end -}} + {{- end -}} +{{- end }} \ No newline at end of file diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 9d3fce3..2430630 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,36 +1,33 @@ + \ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 5a98c1d..b723b91 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -3,26 +3,24 @@ - {{ $title := print .Site.Title " | " .Title }} + {{- $title := print .Site.Title " | " .Title -}} {{ if .IsHome }}{{ $title := .Site.Title }} {{ end }} {{ $title }} - {{/* compressed soll besser sein als minify bei SASS */}} - {{ $sassOptions := (dict "targetPath" "main.css" "outputStyle" "compressed" "enableSourceMap" (not hugo.IsProduction) "includePaths" "assets/bootstrap/scss") }} - {{ $sassStyle := resources.Get "_own/sass/main.scss" | resources.ToCSS $sassOptions | minify }} + {{- $sassOptions := (dict "targetPath" "main.css" "outputStyle" "compressed" "enableSourceMap" (not hugo.IsProduction) "includePaths" "assets/bootstrap/scss") -}} + {{- $sassStyle := resources.Get "_own/sass/main.scss" | resources.ToCSS $sassOptions | minify -}} - {{ $style := resources.Match "_own/css/**.css" | resources.Concat "css/custom.css" | minify }}{{/* .Resources.GetMatch "css/**.css" */}} + {{- $style := resources.Match "_own/css/**.css" | resources.Concat "css/custom.css" | minify -}}{{/* .Resources.GetMatch "css/**.css" */}} - {{ if isset .Site.Params "custom_css" }} + {{- if isset .Site.Params "custom_css" -}} {{ range .Site.Params.custom_css }} - - {{ end }} - {{ end }} - - {{ range .AlternativeOutputFormats -}} - {{ printf `` .Rel .MediaType.Type (.Permalink | relURL) $.Site.Title | safeHTML }} - {{ end }} + + {{- end -}} + {{- end -}} + {{ range .AlternativeOutputFormats }} + {{ printf `` .Rel .MediaType.Type (.Permalink | relURL) $.Site.Title | safeHTML }} + {{- end }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 3690850..c6e5ff6 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -3,27 +3,26 @@
- - - {{ if .IsHome }} - {{ print .Site.Title }} - {{ else }} - {{ print .Site.Title " | " .Title }} - {{ end }} + + {{- if .IsHome -}} + {{- print .Site.Title -}} + {{- else -}} + {{- print .Site.Title " | " .Title -}} + {{- end }}
diff --git a/layouts/partials/meta/data.html b/layouts/partials/meta/data.html index df1692c..3307fbe 100644 --- a/layouts/partials/meta/data.html +++ b/layouts/partials/meta/data.html @@ -1,8 +1,8 @@ -{{ $dateTime := .PublishDate.Format "2006-01-02" }} -{{ $dateTimeMod := .Lastmod.Format "2006-01-02" }} -{{ $dateFormat := .Site.Params.dateFormat | default "Jan 2, 2006" }} +{{- $dateTime := .PublishDate.Format "2006-01-02" -}} +{{- $dateTimeMod := .Lastmod.Format "2006-01-02" -}} +{{- $dateFormat := .Site.Params.dateFormat | default "Jan 2, 2006" -}} -{{ .Page.Params.Author }} +{{- .Page.Params.Author -}} diff --git a/layouts/partials/meta/footer.html b/layouts/partials/meta/footer.html index 1839176..2031a0d 100644 --- a/layouts/partials/meta/footer.html +++ b/layouts/partials/meta/footer.html @@ -1,5 +1,5 @@ -{{ $tagsIdent := .Site.Params.Blog.Tags | default "tags" }} +{{- $tagsIdent := .Site.Params.Blog.Tags | default "tags" -}} {{- partial "taxonomy/metatag.html" (dict "Params" .Params "Ident" $tagsIdent "Feather" "tag") -}} -{{ $catIdent := .Site.Params.Blog.Categories | default "categories" }} +{{- $catIdent := .Site.Params.Blog.Categories | default "categories" -}} {{- partial "taxonomy/metatag.html" (dict "Params" .Params "Ident" $catIdent "Feather" "award") -}} diff --git a/layouts/partials/meta/footer_skill.html b/layouts/partials/meta/footer_skill.html index cf202c0..5363d15 100644 --- a/layouts/partials/meta/footer_skill.html +++ b/layouts/partials/meta/footer_skill.html @@ -1,2 +1,2 @@ -{{ $skillIdent := .Site.Params.KnowHow.Skills | default "skills" }} +{{- $skillIdent := .Site.Params.KnowHow.Skills | default "skills" -}} {{- partial "taxonomy/metatag.html" (dict "Params" .Params "Ident" $skillIdent "Feather" "code") -}} diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html index a967667..5b5901e 100644 --- a/layouts/partials/pagination.html +++ b/layouts/partials/pagination.html @@ -4,34 +4,34 @@ -{{ end }} +{{- end }} diff --git a/layouts/partials/script.html b/layouts/partials/script.html index 48f47e1..c235471 100644 --- a/layouts/partials/script.html +++ b/layouts/partials/script.html @@ -1,16 +1,12 @@ -{{ $bootstrapJs := resources.Get "bootstrap/js/bootstrap.bundle.min.js" }} - - -{{ $featherJs := resources.Get "feather/js/feather.min.js" }} - - -{{ $mainJs := resources.Get "_own/js/main.js" | js.Build | minify }} - - -{{- range .Site.Params.custom_js -}} +{{- $bootstrapJs := resources.Get "bootstrap/js/bootstrap.bundle.min.js" }} + +{{- $featherJs := resources.Get "feather/js/feather.min.js" }} + +{{- $mainJs := resources.Get "_own/js/main.js" | js.Build | minify }} + +{{- range .Site.Params.custom_js }} -{{ end }} - - \ No newline at end of file +{{- end }} + diff --git a/layouts/partials/shortcodes/table.html b/layouts/partials/shortcodes/table.html index 3278b3c..86bf02f 100644 --- a/layouts/partials/shortcodes/table.html +++ b/layouts/partials/shortcodes/table.html @@ -1,14 +1,14 @@ -{{ $htmlTable := .content }} +{{- $htmlTable := .content -}} -{{ $old_tbl := ""}} -{{ $new_tbl := printf "
" .table_class }} -{{ $htmlTable := replace $htmlTable $old_tbl $new_tbl }} +{{- $old_tbl := "
" -}} +{{- $new_tbl := printf "
" .table_class -}} +{{- $htmlTable := replace $htmlTable $old_tbl $new_tbl -}} -{{ $old_th := ""}} -{{ $new_th := printf "" .thead_class }} -{{ $htmlTable := replace $htmlTable $old_th $new_th }} +{{- $old_th := "" -}} +{{- $new_th := printf "" .thead_class -}} +{{- $htmlTable := replace $htmlTable $old_th $new_th -}} - -{{ $htmlTable | safeHTML }} \ No newline at end of file + +{{- $htmlTable | safeHTML -}} \ No newline at end of file diff --git a/layouts/partials/widget/aboutme.html b/layouts/partials/widget/aboutme.html index 5549091..ece22ec 100644 --- a/layouts/partials/widget/aboutme.html +++ b/layouts/partials/widget/aboutme.html @@ -1,11 +1,11 @@ -{{ with .avatar }} +{{- with .avatar }}
Ansprechendes Bild
-{{ end }} +{{- end -}} -{{ with .description }} +{{- with .description }}
{{ . }}
-{{ end }} +{{- end }} diff --git a/layouts/partials/widget/cloud.html b/layouts/partials/widget/cloud.html index c12123a..4c9b53f 100644 --- a/layouts/partials/widget/cloud.html +++ b/layouts/partials/widget/cloud.html @@ -1,15 +1,15 @@
- {{ $parentLink := (site.GetPage (printf "/%s" .ident)).Permalink }} - {{ $maxCnt := mul 1.0 (index .tax.ByCount 0).Count }} - {{ $minCnt := mul 1.0 (index .tax.ByCount.Reverse 0).Count }} - {{ $div := math.Max 1 (sub $maxCnt $minCnt) }} - {{ range $key, $sites := .tax }} + {{- $parentLink := (site.GetPage (printf "/%s" .ident)).Permalink -}} + {{- $maxCnt := mul 1.0 (index .tax.ByCount 0).Count -}} + {{- $minCnt := mul 1.0 (index .tax.ByCount.Reverse 0).Count -}} + {{- $div := math.Max 1 (sub $maxCnt $minCnt) -}} + {{- range $key, $sites := .tax }} {{- (printf `%s%d` (add (mul (math.Pow (div (sub $sites.Count $minCnt) $div) 2.0) 0.6) 0.8) ((printf "%s%s" $parentLink $key) | relURL) $key $sites.Count $key $sites.Count ) | safeHTML -}} - {{ end }} + {{- end }}
-{{/* https://mertbakir.gitlab.io/hugo/tag-cloud-in-hugo/ */}} +{{/* https://mertbakir.gitlab.io/hugo/tag-cloud-in-hugo/ */}} \ No newline at end of file diff --git a/layouts/partials/widget/header.html b/layouts/partials/widget/header.html index ab83507..5d9d0cb 100644 --- a/layouts/partials/widget/header.html +++ b/layouts/partials/widget/header.html @@ -1,2 +1,2 @@

{{ .title }}

- + \ No newline at end of file diff --git a/layouts/partials/widget/links.html b/layouts/partials/widget/links.html index 31df44b..9c5972f 100644 --- a/layouts/partials/widget/links.html +++ b/layouts/partials/widget/links.html @@ -1,16 +1,16 @@ diff --git a/layouts/partials/widget/socials.html b/layouts/partials/widget/socials.html index 1083107..be7bd9b 100644 --- a/layouts/partials/widget/socials.html +++ b/layouts/partials/widget/socials.html @@ -1,36 +1,36 @@
diff --git a/layouts/partials/widget/taglist.html b/layouts/partials/widget/taglist.html index f32ca3e..36aa8d5 100644 --- a/layouts/partials/widget/taglist.html +++ b/layouts/partials/widget/taglist.html @@ -1,9 +1,9 @@
- {{ $parentLink := (site.GetPage (printf "/%s" .ident)).Permalink }} - {{ range $key, $sites := .tax }} + {{- $parentLink := (site.GetPage (printf "/%s" .ident)).Permalink -}} + {{- range $key, $sites := .tax }}
{{ $key }}
{{ $sites.Count }}
- {{ end }} + {{- end }}