From 21b8736c80ebb98cf936388f5789f6d9d1590b59 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Tue, 2 Dec 2025 20:38:55 -0800 Subject: fix: micro posts imprecise dt-published values --- indieweb-micro/ping-bridgyfed.sh | 16 ++++++ indieweb-micro/prep-images.sh | 4 +- .../themes/MinIndie/layouts/indie/single.html | 66 ++++++++++++++++++++++ .../themes/MinIndie/layouts/shortcodes/follow.html | 12 ++++ .../themes/MinIndie/static/css/style.css | 4 +- micro.pinapelz.moe/css/follows.css | 31 ++++++++++ micro.pinapelz.moe/css/style.css | 4 +- pinapelz.moe/about.html | 5 -- pinapelz.moe/projects.html | 2 + 9 files changed, 133 insertions(+), 11 deletions(-) create mode 100755 indieweb-micro/ping-bridgyfed.sh create mode 100644 indieweb-micro/themes/MinIndie/layouts/indie/single.html create mode 100644 indieweb-micro/themes/MinIndie/layouts/shortcodes/follow.html create mode 100644 micro.pinapelz.moe/css/follows.css 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 " + 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 " - 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 }} +
+
+ +

{{ .Title }}

+ + + {{- if or .Params.categories .Params.tags -}} + + {{- 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 -}} +
+

Table of Content

+ +
+ {{- end -}} + +
+ {{ .Content }} +
+ + {{ partial "article-extra.html" . }} + + {{ if .Site.Params.enableNextPrevPages }} + {{ partial "article-prevnext.html" . }} + {{ end }} + + {{ if .Site.Params.enableRelatedPages }} + {{ partial "article-related.html" . }} + {{ end }} +
+ +
+{{ 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 }} + + 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; } diff --git a/micro.pinapelz.moe/css/follows.css b/micro.pinapelz.moe/css/follows.css new file mode 100644 index 0000000..a6673af --- /dev/null +++ b/micro.pinapelz.moe/css/follows.css @@ -0,0 +1,31 @@ +.follow-card { + display: flex; + flex-direction: column; + padding: 0.6rem 0.8rem; + margin: 0.6rem 0 0.6rem 0; + background: var(--card-bg, #f9f9f9); + border-radius: 8px; + border: 1px solid #e5e5e5; + font-size: 0.9rem; +} + +.follow-card:hover { + background: var(--card-bg-hover, #f2f2f2); +} + +.follow-target { + font-weight: 600; + text-decoration: none; + color: var(--link-color, #3366cc); + word-break: break-all; +} + +.follow-target:hover { + text-decoration: underline; +} + +.follow-date { + color: #777; + font-size: 0.8rem; + margin-top: 0.25rem; +} diff --git a/micro.pinapelz.moe/css/style.css b/micro.pinapelz.moe/css/style.css index bc04f86..73e3665 100644 --- a/micro.pinapelz.moe/css/style.css +++ b/micro.pinapelz.moe/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; } diff --git a/pinapelz.moe/about.html b/pinapelz.moe/about.html index aa09129..3075708 100644 --- a/pinapelz.moe/about.html +++ b/pinapelz.moe/about.html @@ -134,9 +134,6 @@ -
- -