2023-08-06 16:27:24 +02:00
|
|
|
<script setup lang="ts">
|
2023-11-14 19:17:04 +01:00
|
|
|
withDefaults(
|
2023-11-14 18:33:23 +01:00
|
|
|
defineProps<{
|
2024-01-20 14:37:35 +01:00
|
|
|
tag?: string
|
2023-11-14 18:33:23 +01:00
|
|
|
text?: string
|
|
|
|
srOnly?: boolean
|
|
|
|
}>(),
|
|
|
|
{
|
2024-01-20 14:37:35 +01:00
|
|
|
tag: 'h1',
|
2023-11-14 18:33:23 +01:00
|
|
|
text: undefined,
|
|
|
|
srOnly: false,
|
|
|
|
},
|
|
|
|
)
|
2023-08-06 16:27:24 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2024-01-20 14:37:35 +01:00
|
|
|
<component
|
|
|
|
:tag="tag"
|
2023-11-14 18:33:23 +01:00
|
|
|
id="main-target"
|
|
|
|
tabindex="-1"
|
|
|
|
class="inline-block text-4xl font-bold"
|
|
|
|
:class="{ 'sr-only focus:not-sr-only': srOnly }"
|
|
|
|
>
|
2023-08-06 16:27:24 +02:00
|
|
|
<slot name="default">
|
|
|
|
{{ text }}
|
|
|
|
</slot>
|
2024-01-20 14:37:35 +01:00
|
|
|
</component>
|
2023-08-06 16:27:24 +02:00
|
|
|
</template>
|
2023-11-14 18:33:23 +01:00
|
|
|
|
|
|
|
<style scoped>
|
2024-01-20 14:37:35 +01:00
|
|
|
#main-target {
|
2023-11-14 18:33:23 +01:00
|
|
|
/* Need some override here because of `not-sr-only` styles */
|
|
|
|
margin-top: 2rem !important;
|
|
|
|
margin-bottom: 0.75rem !important;
|
|
|
|
}
|
|
|
|
</style>
|