Rss und noch weitere Kleinigkeiten

This commit is contained in:
mdn 2022-11-15 23:34:16 +01:00
parent 6dd9fa38f6
commit 4ca99523cf
4 changed files with 17 additions and 6 deletions

View file

@ -4,7 +4,7 @@
<div class="p-4 p-md-5 m-2 mb-4 rounded text-bg-dark"> <div class="p-4 p-md-5 m-2 mb-4 rounded text-bg-dark">
<div class="col-md6 px-0"> <div class="col-md6 px-0">
<h1 class="display-4 fst-italic">{{ $latestEntry.Title }}</h1> <h1 class="display-4 fst-italic">{{ $latestEntry.Title }}</h1>
<p class="lead my-3">{{ $latestEntry.Summary }}</p> <p class="lead my-3">{{ $latestEntry.Summary | safeHTML }}</p>
<p class="lead mb-0"><a href="{{ $latestEntry.Permalink }}" class="text-white fw-bold">Weiter lesen...</a></p> <p class="lead mb-0"><a href="{{ $latestEntry.Permalink }}" class="text-white fw-bold">Weiter lesen...</a></p>
</div> </div>
</div> </div>
@ -15,7 +15,7 @@
{{/* Paginator initialisieren, in der Reihenfolge die man sich im Blog wünscht */}} {{/* Paginator initialisieren, in der Reihenfolge die man sich im Blog wünscht */}}
{{ if eq .Type "blog" }} {{ if eq .Type "blog" }}
{{/* Der 1te Weg soll alle Blog-Einträge finden*/}} {{/* Der 1te Weg soll alle Blog-Einträge finden*/}}
{{ $pag := .Paginate (where .Site.RegularPages "Type" "blog").ByPublishDate.Reverse 3 }} {{ $pag := .Paginate (where .Site.RegularPages "Type" "blog").ByPublishDate.Reverse }}
{{ else }} {{ else }}
{{/* Der 2te Weg ist über die Archive-Gruppierung, und dort wird nicht paginiert */}} {{/* Der 2te Weg ist über die Archive-Gruppierung, und dort wird nicht paginiert */}}
{{ $pag := .Paginate .Pages.ByPublishDate.Reverse 9999 }} {{ $pag := .Paginate .Pages.ByPublishDate.Reverse 9999 }}
@ -76,9 +76,10 @@
{{ $div := math.Max 1 (sub $maxCnt $minCnt) }} {{ $div := math.Max 1 (sub $maxCnt $minCnt) }}
{{ range $key, $sites := $tags }} {{ range $key, $sites := $tags }}
<!-- add (mul (math.Pow (div $sites.Count $maxCnt) 2.0) 14.0) 8.0 px --> <!-- add (mul (math.Pow (div $sites.Count $maxCnt) 2.0) 14.0) 8.0 px -->
<a class="tag-cloud-link" style="{{ printf "font-size: %.3frem" (add (mul (math.Pow (div (sub $sites.Count $minCnt) $div) 2.0) 0.4) 1.0) }};" href="{{ $parentLink | relURL }}{{ $key | urlize }}" aria-label="{{- $key -}} ({{- $sites.Count -}} Einträge)"> {{- (printf `<a class="tag-cloud-link" style="font-size: %.3frem;" href="%s" aria-label="%s %d Einträge">%s<sup>%d</sup></a>`
{{- $key -}}<sup>{{ $sites.Count }}</sup> (add (mul (math.Pow (div (sub $sites.Count $minCnt) $div) 2.0) 0.6) 0.8)
</a> ($parentLink | relURL) $key $sites.Count $key $sites.Count
) | safeHTML -}}
<!--<span class="badge">{{ $sites.Count }}</span>--> <!--<span class="badge">{{ $sites.Count }}</span>-->
{{ end }} {{ end }}

View file

@ -1,5 +1,9 @@
{{ define "main" }} {{ define "main" }}
<div id="home-jumbotron" class="jumbotron text-center bg-light"> <div id="home-jumbotron" class="jumbotron text-center bg-light">
<h1 class="title">{{ .Site.Title }}</h1> <h1 class="title">{{ .Site.Title }}</h1>
<div>
{{ .Site.Params.Description }}
</div>
</div> </div>
{{ end }} {{ end }}

View file

@ -1,7 +1,9 @@
<footer class="footer bg-dark text-white"> <footer class="footer bg-dark text-white">
<nav class="nav justify-content-center navbar-expand-md navbar-dark "> <nav class="nav justify-content-center navbar-expand-md navbar-dark ">
<a class="nav-link" href="#">Impressum & Datenschutz</a> <a class="nav-link" href="#">Impressum & Datenschutz</a>
<a class="nav-link" href="#">RSS-Feed</a> {{ with .OutputFormats.Get "rss" -}}
<a class="nav-link" href="{{- .Permalink -}}">RSS-Feed</a>
{{ end }}
</nav> </nav>
<p><a class="nav-link" href="#"><small>&copy; 2009-{{ now.Format "2006"}} MarcoDN</small></a></p> <p><a class="nav-link" href="#"><small>&copy; 2009-{{ now.Format "2006"}} MarcoDN</small></a></p>

View file

@ -21,4 +21,8 @@
<link rel="stylesheet" type="text/css" href="{{ $.Site.BaseURL }}{{ . }}"> <link rel="stylesheet" type="text/css" href="{{ $.Site.BaseURL }}{{ . }}">
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ range .AlternativeOutputFormats -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end }}
</head> </head>