Use path aliasing and improve accesibility

This commit is contained in:
Bad Manners 2024-09-14 17:51:22 -03:00
parent b464c5e795
commit dadbd32e1b
No known key found for this signature in database
GPG key ID: 8C88292CCB075609
40 changed files with 138 additions and 115 deletions

View file

@ -1,5 +1,5 @@
---
import { t, type Lang } from "../i18n";
import { t, type Lang } from "@i18n";
type Props = {
lang: Lang;

View file

@ -1,5 +1,5 @@
---
import { t, type Lang } from "../i18n";
import { t, type Lang } from "@i18n";
type Props = {
lang: Lang;

View file

@ -1,9 +1,9 @@
---
import type { CopyrightedCharacters } from "../content/config";
import { t, type Lang } from "../i18n";
import type { CopyrightedCharacters } from "@content/config";
import { t, type Lang } from "@i18n";
import UserComponent from "./UserComponent.astro";
import CopyrightedCharactersItem from "./CopyrightedCharactersItem.astro";
import { formatCopyrightedCharacters } from "../utils/format_copyrighted_characters";
import { formatCopyrightedCharacters } from "@utils/format_copyrighted_characters";
type Props = {
copyrightedCharacters?: CopyrightedCharacters;

View file

@ -1,6 +1,6 @@
---
import type { Posts } from "../content/config";
import { t, type Lang } from "../i18n";
import type { Posts } from "@content/config";
import { t, type Lang } from "@i18n";
import { IconEkasPortal, IconFurAffinity, IconInkbunny, IconSoFurry, IconWeasyl } from "./icons/brands";
type Props = {
@ -30,6 +30,7 @@ const isVisible = eka || furaffinity || inkbunny || sofurry || weasyl;
aria-label={t(lang, "published_content/syndication_eka")}
>
<IconEkasPortal class="mx-auto" width="2rem" height="2rem" />
<span class="sr-only">{t(lang, "published_content/syndication_eka")}</span>
</a>
</li>
) : null}
@ -42,6 +43,7 @@ const isVisible = eka || furaffinity || inkbunny || sofurry || weasyl;
aria-label={t(lang, "published_content/syndication_furaffinity")}
>
<IconFurAffinity class="mx-auto" width="2rem" height="2rem" />
<span class="sr-only">{t(lang, "published_content/syndication_furaffinity")}</span>
</a>
</li>
) : null}
@ -54,6 +56,7 @@ const isVisible = eka || furaffinity || inkbunny || sofurry || weasyl;
aria-label={t(lang, "published_content/syndication_inkbunny")}
>
<IconInkbunny class="mx-auto" width="2rem" height="2rem" />
<span class="sr-only">{t(lang, "published_content/syndication_inkbunny")}</span>
</a>
</li>
) : null}
@ -66,6 +69,7 @@ const isVisible = eka || furaffinity || inkbunny || sofurry || weasyl;
aria-label={t(lang, "published_content/syndication_sofurry")}
>
<IconSoFurry class="mx-auto" width="2rem" height="2rem" />
<span class="sr-only">{t(lang, "published_content/syndication_sofurry")}</span>
</a>
</li>
) : null}
@ -78,6 +82,7 @@ const isVisible = eka || furaffinity || inkbunny || sofurry || weasyl;
aria-label={t(lang, "published_content/syndication_weasyl")}
>
<IconWeasyl class="mx-auto" width="2rem" height="2rem" />
<span class="sr-only">{t(lang, "published_content/syndication_weasyl")}</span>
</a>
</li>
) : null}

View file

@ -1,5 +1,5 @@
---
import type { Lang } from "../i18n";
import type { Lang } from "@i18n";
import { IconStar, IconRetweet } from "./icons";
type Props = {

View file

@ -13,4 +13,5 @@ const { id, title, text } = Astro.props;
{text}
</a>
<sup>{id}</sup>
<em class="sr-only">({title})</em>
</Fragment>

View file

@ -1,5 +1,5 @@
---
import { t, type Lang } from "../i18n";
import { t, type Lang } from "@i18n";
type Props = {
lang: Lang;

View file

@ -1,8 +1,8 @@
---
import type { CollectionEntry } from "astro:content";
import clsx from "clsx";
import type { Lang } from "../i18n";
import { getUsernameForLang } from "../utils/get_username_for_lang";
import type { Lang } from "@i18n";
import { getUsernameForLang } from "@utils/get_username_for_lang";
type Props = {
lang: Lang;