summaryrefslogtreecommitdiffstats
path: root/indieweb-micro
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2025-12-02 20:38:55 -0800
committerPinapelz <yukais@pinapelz.com>2025-12-03 02:31:51 -0800
commit21b8736c80ebb98cf936388f5789f6d9d1590b59 (patch)
tree2a871f110bf2e51790c9a72080928f64eec902d7 /indieweb-micro
parent98ddc6edd51bc961ef8dbeb9852fdbb3978f23ce (diff)
fix: micro posts imprecise dt-published values
Diffstat (limited to 'indieweb-micro')
-rwxr-xr-xindieweb-micro/ping-bridgyfed.sh16
-rwxr-xr-xindieweb-micro/prep-images.sh4
-rw-r--r--indieweb-micro/themes/MinIndie/layouts/indie/single.html66
-rw-r--r--indieweb-micro/themes/MinIndie/layouts/shortcodes/follow.html12
-rw-r--r--indieweb-micro/themes/MinIndie/static/css/style.css4
5 files changed, 98 insertions, 4 deletions
diff --git a/indieweb-micro/ping-bridgyfed.sh b/indieweb-micro/ping-bridgyfed.sh
new file mode 100755
index 0000000..22479f6
--- /dev/null
+++ b/indieweb-micro/ping-bridgyfed.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+# Usage:
+# ./ping-bridgyfed.sh https://yoursite.com/posts/foo/
+
+SOURCE_URL="$1"
+
+if [ -z "$SOURCE_URL" ]; then
+ echo "Error: No source URL provided."
+ echo "Usage: $0 <source-url>"
+ exit 1
+fi
+
+curl -i https://fed.brid.gy/webmention \
+ -d "source=$SOURCE_URL" \
+ -d "target=https://fed.brid.gy"
diff --git a/indieweb-micro/prep-images.sh b/indieweb-micro/prep-images.sh
index e478348..2f41052 100755
--- a/indieweb-micro/prep-images.sh
+++ b/indieweb-micro/prep-images.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Usage:
-# ./overwrite-to-webp.sh /path/to/folder jpg
+# ./prep-images.sh /path/to/folder jpg
#
# Arguments:
# 1 = folder containing images
@@ -12,7 +12,7 @@ EXT="$2"
if [ -z "$SRC_DIR" ] || [ -z "$EXT" ]; then
echo "Usage: $0 <folder> <extension>"
- echo "Example: ./overwrite-to-webp.sh ./photos jpg"
+ echo "Example: ./prep-images.sh ./photos jpg"
exit 1
fi
diff --git a/indieweb-micro/themes/MinIndie/layouts/indie/single.html b/indieweb-micro/themes/MinIndie/layouts/indie/single.html
new file mode 100644
index 0000000..906b704
--- /dev/null
+++ b/indieweb-micro/themes/MinIndie/layouts/indie/single.html
@@ -0,0 +1,66 @@
+{{ define "main" }}
+{{ $ageDays := div (sub now.Unix .Date.Unix) 86400 }}
+ <main>
+ <article class="h-entry">
+ <a class="u-bridgy-fed" href="https://fed.brid.gy/" hidden="from-humans"></a>
+ <h1 class="p-name">{{ .Title }}</h1>
+ <div hidden>{{ partial "bio-hcard.html" . }}</div>
+
+ {{- if or .Params.categories .Params.tags -}}
+ <div class="article-meta">
+ {{- with .Params.categories -}}
+ <span class="categories">
+ Categories:
+ {{ range . }}
+ <a href="{{ "/categories/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
+ {{ end }}
+ </span>
+ {{- end -}}
+ {{- if and .Params.categories .Params.tags -}}
+ --
+ {{- end -}}
+ {{- with .Params.tags -}}
+ <span class="tags">
+ Tags:
+ {{ range . }}
+ #<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}" class="p-category">{{ . }}</a>
+ {{ end }}
+ </span>
+ {{- end -}}
+ </div>
+ {{- end -}}
+
+ {{- with .Site.Params.tagPostOlderThanXDays -}}
+ {{- if and (gt $ageDays .) (eq $.Type "posts") -}}
+ {{ partial "article-old-content.html" . }}
+ {{- end -}}
+ {{- end -}}
+
+ {{- partial "article-precontent.html" . -}}
+
+ {{- if .Params.toc -}}
+ <div class="toc noprint">
+ <h2>Table of Content</h2>
+ <aside>
+ {{ .TableOfContents }}
+ </aside>
+ </div>
+ {{- end -}}
+
+ <div class="e-content">
+ {{ .Content }}
+ </div>
+
+ {{ partial "article-extra.html" . }}
+
+ {{ if .Site.Params.enableNextPrevPages }}
+ {{ partial "article-prevnext.html" . }}
+ {{ end }}
+
+ {{ if .Site.Params.enableRelatedPages }}
+ {{ partial "article-related.html" . }}
+ {{ end }}
+ </article>
+ <a class="u-bridgy-fed" href="https://fed.brid.gy/" hidden="from-humans"></a>
+ </main>
+{{ end }}
diff --git a/indieweb-micro/themes/MinIndie/layouts/shortcodes/follow.html b/indieweb-micro/themes/MinIndie/layouts/shortcodes/follow.html
new file mode 100644
index 0000000..27a1bdd
--- /dev/null
+++ b/indieweb-micro/themes/MinIndie/layouts/shortcodes/follow.html
@@ -0,0 +1,12 @@
+{{ $url := .Get 0 }}
+{{ $date := .Get 1 }}
+
+<div class="follow-card h-entry">
+ <a class="follow-target u-follow-of" href="{{ $url }}">
+ {{ $url }}
+ </a>
+
+ <time class="follow-date dt-published" datetime="{{ $date }}T00:00:00Z">
+ {{ $date }}
+ </time>
+</div>
diff --git a/indieweb-micro/themes/MinIndie/static/css/style.css b/indieweb-micro/themes/MinIndie/static/css/style.css
index bc04f86..73e3665 100644
--- a/indieweb-micro/themes/MinIndie/static/css/style.css
+++ b/indieweb-micro/themes/MinIndie/static/css/style.css
@@ -259,13 +259,13 @@ tbody tr:nth-child(even) {
align-self: center;
text-align: center;
}
-
+
/* Smaller avatar on mobile */
.banner .avatar {
width: 90px;
height: 90px;
}
-
+
.banner img:first-child {
border-radius: 6px;
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage