refactor: streamline component structure and enhance accessibility features

This commit is contained in:
2025-09-04 18:43:14 +02:00
parent 34d2e88e9f
commit 97d7cddaa5
14 changed files with 38 additions and 71 deletions

View File

@@ -46,8 +46,9 @@ defineShortcuts({
})
const activeElement = useActiveElement()
watch(activeElement, () => {
if (activeElement.value instanceof HTMLElement && ['INPUT', 'TEXTAREA'].includes(activeElement.value.tagName)) {
watch(openMessageModal, async () => {
await nextTick()
if (activeElement.value instanceof HTMLElement) {
activeElement.value.blur()
}
})
@@ -201,6 +202,7 @@ function goHome() {
/>
</UTooltip>
<UTooltip
v-if="router.currentRoute.value.name !== 'canva'"
:text="t('palette.tooltip.canva')"
arrow
:content="toolTipContent"

View File

@@ -14,7 +14,7 @@ const generate = computed(() => props.id && ((typeof headings?.anchorLinks === '
<a
v-if="id && generate"
:href="`#${id}`"
class="text-xl font-bold border-transparent border-b-2 hover:border-black dark:hover:border-white duration-300"
class="text-xl font-bold decoration-neutral-300 dark:decoration-neutral-700 underline-offset-2 hover:decoration-black dark:hover:decoration-white duration-300"
>
<slot />
</a>

View File

@@ -14,7 +14,7 @@ const generate = computed(() => props.id && ((typeof headings?.anchorLinks === '
<a
v-if="id && generate"
:href="`#${id}`"
class="text-lg font-semibold text-neutral-800 dark:text-neutral-200"
class="text-lg font-semibold text-neutral-800 dark:text-neutral-200 decoration-neutral-300 dark:decoration-neutral-700 underline-offset-2 hover:decoration-black dark:hover:decoration-white duration-300"
>
<slot />
</a>

View File

@@ -3,7 +3,7 @@ const { t } = useI18n()
</script>
<template>
<div class="mt-8 p-8 border bg-white/70 dark:bg-black/70 border-gray-200 dark:border-neutral-700 rounded-md">
<UCard class="mt-8 shadow-sm bg-white dark:bg-neutral-900">
<NuxtImg
src="/arthur pro.webp"
alt="Arthur Danjou"
@@ -42,5 +42,5 @@ const { t } = useI18n()
<br> <br>
</template>
</i18n-t>
</div>
</UCard>
</template>