diff options
| author | Dawid Rycerz <dawid@rycerz.xyz> | 2026-01-13 20:06:15 +0100 |
|---|---|---|
| committer | Dawid Rycerz <dawid@rycerz.xyz> | 2026-01-13 20:06:15 +0100 |
| commit | b6e440699e9fca474869bf74ce09f2310f05c620 (patch) | |
| tree | a089f456a0e9ebb6f9f6b72370deb7eeb8a3e308 /src/components/blog/webmentions/Likes.astro | |
| parent | f8a4e00f89913b0c57ca016965f49efc26f4bff9 (diff) | |
Cleanup unused functionalities
Diffstat (limited to 'src/components/blog/webmentions/Likes.astro')
| -rw-r--r-- | src/components/blog/webmentions/Likes.astro | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/src/components/blog/webmentions/Likes.astro b/src/components/blog/webmentions/Likes.astro deleted file mode 100644 index fce1a96..0000000 --- a/src/components/blog/webmentions/Likes.astro +++ /dev/null @@ -1,54 +0,0 @@ ---- -import { Image } from "astro:assets"; -import { t } from "@/i18n/translations"; -import type { WebmentionsChildren } from "@/types"; - -interface Props { - mentions: WebmentionsChildren[]; - language?: string | undefined; -} - -const { mentions, language } = Astro.props; -const MAX_LIKES = 10; - -const likes = mentions.filter((mention) => mention["wm-property"] === "like-of"); -const likesToShow = likes - .filter((like) => like.author?.photo && like.author.photo !== "") - .slice(0, MAX_LIKES); ---- - -{ - !!likes.length && ( - <div> - <p class="text-accent-2 mb-0"> - <strong>{likes.length}</strong>{" "} - {likes.length > 1 ? t(language, "peopleLiked") : t(language, "personLiked")} - </p> - {!!likesToShow.length && ( - <ul class="flex list-none flex-wrap overflow-hidden ps-2" role="list"> - {likesToShow.map((like) => ( - <li class="p-like h-cite -ms-2"> - <a - class="u-url not-prose ring-global-text hover:ring-link focus-visible:ring-link relative inline-block overflow-hidden rounded-full ring-2 hover:z-10 hover:ring-4 focus-visible:z-10 focus-visible:ring-4" - href={like.author?.url} - rel="noreferrer" - target="_blank" - title={like.author?.name} - > - <span class="p-author h-card"> - <Image - alt={like.author!.name} - class="u-photo my-0 inline-block h-12 w-12" - height={48} - src={like.author!.photo} - width={48} - /> - </span> - </a> - </li> - ))} - </ul> - )} - </div> - ) -} |
