]> juplo.de Git - website/commitdiff
Removed the generated layout-elements in `layout`
authorKai Moritz <kai@juplo.de>
Sat, 20 Dec 2025 22:25:28 +0000 (23:25 +0100)
committerKai Moritz <kai@juplo.de>
Sat, 20 Dec 2025 22:34:48 +0000 (23:34 +0100)
layouts/partials/comments.html [deleted file]
layouts/rss.xml [deleted file]
layouts/shortcodes/audio.html [deleted file]
layouts/shortcodes/catlist.html [deleted file]
layouts/shortcodes/gallery.html [deleted file]
layouts/shortcodes/googlemaps.html [deleted file]
layouts/shortcodes/parallaxblur.html [deleted file]

diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html
deleted file mode 100644 (file)
index cca573f..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-
-<!-- fetch /data/comments.yaml -->
-{{ $site_comments := .Site.Data.comments }}
-
-<!-- /data/comments.yaml not found: abort -->
-{{ if not $site_comments }}
-       {{ return "" }}
-{{ end }}
-
-<!-- find all comments whose post_id matches current post/page post_id -->
-{{ with (where .Site.Data.comments "post_id" .Params.post_id ) }}
-  <ul id="comments" style="list-style: none;">
-    <!-- Call the top level of comments (parent_id = 0). Each of them will call their own children (replies) internally -->
-    {{ template "comments" (dict "post_comments" . "site_comments" $site_comments "parent_id" "0" ) }}
-  </ul>
-{{ end }}
-
-{{- define "comments" -}}
-
-  {{ $site_comments := .site_comments }}
-  {{ $query_parent_id := .parent_id }}
-
-  <!-- Note : we iterate over comments using the order in which they appear
-  in /data/comments.yaml. WordPress exports them in increasing order of ID
-  and ID is incremented with time, so this is chronological without having to sort -->
-  {{ range .post_comments }}
-    {{ $author_name := index . "author_name" }}
-    {{ $author_link := index . "author_url" }}
-    {{ $date := index . "published" }}
-    {{ $parent_id := index . "parent_id" }}
-    {{ $id := index . "id" }}
-
-    <!-- Only current-level parent comments. -->
-    {{ if eq $parent_id $query_parent_id }}
-      <li id="comment-{{ $id }}" data-reply-to="comment-{{ $parent_id }}" >
-        <div class="comment-meta">
-          <!-- Optional: get Gravatar profile pic from email -->
-          <img src="https://gravatar.com/avatar/{{ sha256 (index . "author_email") }}" />
-
-          <!-- Optional: keep author URL -->
-          {{ with $author_link }}
-            <a href="{{ . }}" rel="nofollow" target="_blank">{{ $author_name }}</a>
-          {{ else }}
-            {{ $author_name }}
-          {{ end }}
-
-          <time pubdate datetime="{{ $date | time.Format "2006-01-02" }}" title="Publication date" property="created">
-            {{ $date | time.Format ":date_long" }}
-          </time>
-        </div>
-
-        <div class="comment-content">
-          {{ index . "content" | markdownify | safeHTML }}<!-- don't escape HTML if content uses it -->
-        </div>
-
-        <!-- Embed children comments (replies), aka find comments whose parent_id match current id -->
-        {{ with (where $site_comments "parent_id" $id) }}
-          <ul class="children-comments" style="list-style: none;">
-            {{ template "comments" (dict "post_comments" . "site_comments" $site_comments "parent_id" $id ) }}
-          </ul>
-        {{ end }}
-
-      </li>
-    {{ end }}
-  {{ end }}
-{{- end -}}
diff --git a/layouts/rss.xml b/layouts/rss.xml
deleted file mode 100644 (file)
index 8d1df27..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-{{- /* Deprecate site.Author.email in favor of site.Params.author.email */}}
-{{- $authorEmail := "" }}
-{{- with site.Params.author }}
-  {{- if reflect.IsMap . }}
-    {{- with .email }}
-      {{- $authorEmail = . }}
-    {{- end }}
-  {{- end }}
-{{- else }}
-  {{- with site.Author.email }}
-    {{- $authorEmail = . }}
-    {{- warnf "The author key in site configuration is deprecated. Use params.author.email instead." }}
-  {{- end }}
-{{- end }}
-
-{{- /* Deprecate site.Author.name in favor of site.Params.author.name */}}
-{{- $authorName := "" }}
-{{- with site.Params.author }}
-  {{- if reflect.IsMap . }}
-    {{- with .name }}
-      {{- $authorName = . }}
-    {{- end }}
-  {{- else }}
-    {{- $authorName  = . }}
-  {{- end }}
-{{- else }}
-  {{- with site.Author.name }}
-    {{- $authorName = . }}
-    {{- warnf "The author key in site configuration is deprecated. Use params.author.name instead." }}
-  {{- end }}
-{{- end }}
-
-{{- $pctx := . }}
-{{- if .IsHome }}{{ $pctx = site }}{{ end }}
-{{- $pages := slice }}
-{{- if or $.IsHome $.IsSection }}
-{{- $pages = $pctx.RegularPages }}
-{{- else }}
-{{- $pages = $pctx.Pages }}
-{{- end }}
-{{- $limit := site.Config.Services.RSS.Limit }}
-{{- if ge $limit 1 }}
-{{- $pages = $pages | first $limit }}
-{{- end }}
-{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
-<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
-  <channel>
-    <title>{{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ site.Title }}{{ end }}</title>
-    <link>{{ .Permalink }}</link>
-    <description>Recent content {{ if ne .Title site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ site.Title }}</description>
-    {{- with site.Params.images }}
-    <image>
-      <title>{{ site.Title }}</title>
-      <url>{{ index . 0 | absURL }}</url>
-      <link>{{ index . 0 | absURL }}</link>
-    </image>
-    {{- end }}
-    <generator>Hugo -- {{ hugo.Version }}</generator>
-    <language>{{ site.Language.LanguageCode }}</language>{{ with $authorEmail }}
-    <managingEditor>{{.}}{{ with $authorName }} ({{ . }}){{ end }}</managingEditor>{{ end }}{{ with $authorEmail }}
-    <webMaster>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</webMaster>{{ end }}{{ with site.Copyright }}
-    <copyright>{{ . | markdownify | plainify | strings.TrimPrefix "© " }}</copyright>{{ end }}{{ if not .Date.IsZero }}
-    <lastBuildDate>{{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
-    {{- with .OutputFormats.Get "RSS" }}
-    {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
-    {{- end }}
-    {{- range $pages }}
-    {{- if and (ne .Layout `search`) (ne .Layout `archives`) }}
-    <item>
-      <title>{{ .Title }}</title>
-      <link>{{ .Permalink }}</link>
-      <pubDate>{{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
-      {{- with $authorEmail }}<author>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</author>{{ end }}
-      {{ if .Params.GUID }} <guid isPermaLink="false">{{ .Params.guid }}</guid> {{ else }} <guid isPermaLink="false">{{ .Permalink }}</guid> {{ end }}
-      <description>{{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}}</description>
-      {{- if and site.Params.ShowFullTextinRSS .Content }}
-      <content:encoded>{{ (printf "<![CDATA[%s]]>" .Content) | safeHTML }}</content:encoded>
-      {{- end }}
-    </item>
-    {{- end }}
-    {{- end }}
-  </channel>
-</rss>
diff --git a/layouts/shortcodes/audio.html b/layouts/shortcodes/audio.html
deleted file mode 100644 (file)
index 90cd060..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-
-<audio controls preload="metadata">
-  <source src="{{ .Get "src" }}" type="audio/{{ replace (path.Ext (.Get "src")) "." ""}}">
-  Your browser does not support the audio element.
-</audio>
diff --git a/layouts/shortcodes/catlist.html b/layouts/shortcodes/catlist.html
deleted file mode 100644 (file)
index 90c5da8..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-{{ $category := .Get "category" }}
-{{ $catLink := .Get "catlink" | default true }}
-{{ $count := .Get "count" | default 5 }}
-
-{{ $p := site.AllPages }}
-{{ $p = where $p "Params.category" "intersect" (slice $category) }}
-
-{{ $categoryTitle := title $category }}
-{{ $categoryTitle = strings.Replace $categoryTitle "-" " " }}
-
-<h3>
-  {{ if $catLink }}
-    <a href="/category/{{ urlquery $category }}"> {{$categoryTitle }} </a>
-  {{ else }}
-    {{ $categoryTitle }}
-  {{ end }}
-
-</h3>
-<ul>
-  {{ range first $count $p}}
-      <li><a href="{{ .RelPermalink }}">{{ .Title }}</a>
-      </li>
-  {{ end }}
-</ul>
diff --git a/layouts/shortcodes/gallery.html b/layouts/shortcodes/gallery.html
deleted file mode 100644 (file)
index 69be59a..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-
-{{ $p := .Page }}
-<div class="gallery gallery-cols-{{ .Get "cols" | default 1 }}">
-{{- print .Inner | $p.RenderString  -}}
-</div>
diff --git a/layouts/shortcodes/googlemaps.html b/layouts/shortcodes/googlemaps.html
deleted file mode 100644 (file)
index c37c434..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<iframe loading="lazy"
-        src="https://www.google.com/maps/d/embed?mid={{ .Get "src" }}"
-        width="{{ .Get "width" }}"
-        height="{{ .Get "height" }}">
-</iframe>
diff --git a/layouts/shortcodes/parallaxblur.html b/layouts/shortcodes/parallaxblur.html
deleted file mode 100644 (file)
index 7f1ef90..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-{{ $imgURL := .Get "src" }}
-{{ $id := substr (md5 .Inner) 0 16 }}
-
-<style>
-#div-{{$id}} {
-    position: relative; /* Allows layering elements */
-    height: auto; /* Adjust height as needed */
-}
-
-#div-{{$id}}:after {
-    content: "";
-    position: absolute; /* Overlays content */
-    top: 0;
-    left: 0;
-    width: 100%;
-    height: 100%;
-    background-image: url("{{ $imgURL }}");
-    background-attachment: fixed;
-    background-size: cover;
-    background-position: center;
-    filter: blur(0px); /* Initial blur */
-    transition: filter 0.5s ease; /* Smooth transition */
-}
-
-#div-{{$id}} p {
-    text-align: center;
-}
-
-
-#div-{{$id}} a {
-    color: white; /* Adjust text color for contrast */
-    text-align: center;
-    text-shadow: 0 3px 0 gray;
-    position: relative; /* Allows text to stay above blur */
-    z-index: 1; /* Ensures text is on top of blurred background */
-    backdrop-filter: blur(5px); /* Amount of blur on text */
-    padding: 0.5rem;
-}
-
-#div-{{$id}} a:link,a:visited,a:hover,a:active {
-   text-decoration: none !important;
-   text-decoration-style: unset !important;
-   text-decoration-thickness: 0 !important;
-}
-
-/* Increase blur on scroll */
-#div-{{$id}}:after {
-    opacity: 0.8; /* Semi-transparent background */
-}
-
-#div-{{$id}}:hover:after,
-#div-{{$id}}:active:after,
-#div-{{$id}}:focus:after,
-#div-{{$id}}:target:after {
-    filter: blur(10px); /* Amount of blur on interaction */
-}
-</style>
-
-<div class="container" id="div-{{ $id }}">
-    {{ .Inner | markdownify }}
-</div>