diff options
| author | Pinapelz <yukais@pinapelz.com> | 2025-12-02 20:38:55 -0800 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2025-12-03 02:31:51 -0800 |
| commit | 21b8736c80ebb98cf936388f5789f6d9d1590b59 (patch) | |
| tree | 2a871f110bf2e51790c9a72080928f64eec902d7 | |
| parent | 98ddc6edd51bc961ef8dbeb9852fdbb3978f23ce (diff) | |
fix: micro posts imprecise dt-published values
| -rwxr-xr-x | indieweb-micro/ping-bridgyfed.sh | 16 | ||||
| -rwxr-xr-x | indieweb-micro/prep-images.sh | 4 | ||||
| -rw-r--r-- | indieweb-micro/themes/MinIndie/layouts/indie/single.html | 66 | ||||
| -rw-r--r-- | indieweb-micro/themes/MinIndie/layouts/shortcodes/follow.html | 12 | ||||
| -rw-r--r-- | indieweb-micro/themes/MinIndie/static/css/style.css | 4 | ||||
| -rw-r--r-- | micro.pinapelz.moe/css/follows.css | 31 | ||||
| -rw-r--r-- | micro.pinapelz.moe/css/style.css | 4 | ||||
| -rw-r--r-- | pinapelz.moe/about.html | 5 | ||||
| -rw-r--r-- | pinapelz.moe/projects.html | 2 |
9 files changed, 133 insertions, 11 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; } 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 @@ </a> </div> </div> - <div class="general-section"> - <iframe src="https://blog.pinapelz.com/blog/" width="100%" height="600px" frameborder="0"></iframe> - </div> </div> <div class="footer"> <div class="footer"> @@ -164,5 +161,3 @@ </div> </body> </html> -<link href="https://melonking.net/styles/flood.css" rel="stylesheet" type="text/css" media="all" /> -<script src="https://melonking.net/scripts/flood.js"></script> diff --git a/pinapelz.moe/projects.html b/pinapelz.moe/projects.html index e8d8509..94c4c53 100644 --- a/pinapelz.moe/projects.html +++ b/pinapelz.moe/projects.html @@ -210,3 +210,5 @@ </script> </body> </html> +<link href="https://melonking.net/styles/flood.css" rel="stylesheet" type="text/css" media="all" /> +<script src="https://melonking.net/scripts/flood.js"></script> |
