lien mécénat et contacts

This commit is contained in:
2026-07-06 14:39:19 +02:00
parent dc345b5d75
commit b0ccb82447
6 changed files with 39 additions and 17 deletions

View File

@@ -8,7 +8,13 @@
<!-- Content -->
<div class="rounded-card__content">
<NuxtLink v-if="url" :to="url" class="rounded-card__title-link">
<NuxtLink
v-if="url"
:to="url"
:target="isExternalUrl ? '_blank' : undefined"
:rel="isExternalUrl ? 'noopener noreferrer' : undefined"
class="rounded-card__title-link"
>
<DsHeading as="h5" tone="default" class="rounded-card__title">
{{ title }}
</DsHeading>
@@ -34,7 +40,7 @@
import DsButtonArrow from '@root/design-system/primitives/DsButtonArrow.vue'
defineProps({
const props = defineProps({
id: { type: [String, Number], required: true },
title: { type: String, required: true },
url: { type: String, required: true },
@@ -43,6 +49,8 @@
imgAlt: { type: String, default: '' },
ratio: { type: String, default: 'square' },
})
const isExternalUrl = computed(() => /^https?:\/\//i.test(props.url))
</script>
<style lang="scss">