ADD: icons for RichTextLink
Hard coded RichTextLink icons
This commit is contained in:
parent
cc8e4eb1bd
commit
9a1b1acfee
4 changed files with 9 additions and 19 deletions
|
@ -54,25 +54,25 @@ const burgerLabel = computed(() => isBurgerOpen.value ? burgerCloseLabel : burge
|
||||||
const nav = [
|
const nav = [
|
||||||
{
|
{
|
||||||
to: `/`,
|
to: `/`,
|
||||||
label: 'home',
|
label: 'Home',
|
||||||
icon: 'house',
|
icon: 'house',
|
||||||
'aria-label': 'Link dieser Seite: Startseite'
|
'aria-label': 'Link dieser Seite: Startseite'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
to: `/services`,
|
to: `/services`,
|
||||||
label: 'leistungen',
|
label: 'Leistungen',
|
||||||
icon: 'list-checks',
|
icon: 'list-checks',
|
||||||
aria: 'Link dieser Seite: Leistungen'
|
aria: 'Link dieser Seite: Leistungen'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
to: `/references`,
|
to: `/references`,
|
||||||
label: 'referenzen',
|
label: 'Referenzen',
|
||||||
icon: 'at',
|
icon: 'at',
|
||||||
aria: 'Link dieser Seite: Referenzen'
|
aria: 'Link dieser Seite: Referenzen'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
to: `/contact`,
|
to: `/contact`,
|
||||||
label: 'kontakt',
|
label: 'Kontakt',
|
||||||
icon: 'chats-circle',
|
icon: 'chats-circle',
|
||||||
aria: 'Link dieser Seite: Kontakt'
|
aria: 'Link dieser Seite: Kontakt'
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<a :href="href" :target="target" class="text inline-flex-row" :class="{ reverse : icon && icon.position === 'end' }">
|
<a :href="href" :target="target" class="text inline-flex-row">
|
||||||
<Icon v-if="icon" :name="icon.name" mode="svg" />
|
|
||||||
{{ content }}
|
{{ content }}
|
||||||
|
<Icon :name="`ph:${linkIcon}-duotone`" mode="svg" />
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { RichTextLink } from './Types'
|
import type { RichTextLink } from './Types'
|
||||||
|
|
||||||
defineProps<RichTextLink>()
|
const { href } = defineProps<RichTextLink>()
|
||||||
|
|
||||||
|
const linkIcon = href.startsWith('http') ? 'globe' : 'arrow-square-in'
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -20,10 +20,6 @@ export type RichTextSpan = RichTextBasis & {
|
||||||
export type RichTextLink = RichTextBasis & {
|
export type RichTextLink = RichTextBasis & {
|
||||||
type: 'a'
|
type: 'a'
|
||||||
href: string
|
href: string
|
||||||
icon ?: {
|
|
||||||
name: string
|
|
||||||
position : 'start' | 'end'
|
|
||||||
}
|
|
||||||
target ?: string
|
target ?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -141,10 +141,6 @@ const skills : Skill[] = [
|
||||||
target: '_blank',
|
target: '_blank',
|
||||||
css: 'text',
|
css: 'text',
|
||||||
href: 'https://www.storyblok.com',
|
href: 'https://www.storyblok.com',
|
||||||
icon: {
|
|
||||||
name: 'ph:arrow-square-out-duotone',
|
|
||||||
position: 'end',
|
|
||||||
},
|
|
||||||
content: 'Storyblok'
|
content: 'Storyblok'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -165,10 +161,6 @@ const skills : Skill[] = [
|
||||||
target: '_blank',
|
target: '_blank',
|
||||||
css: 'text',
|
css: 'text',
|
||||||
href: 'https://www.strapi.io',
|
href: 'https://www.strapi.io',
|
||||||
icon: {
|
|
||||||
name: 'ph:arrow-square-out-duotone',
|
|
||||||
position: 'end',
|
|
||||||
},
|
|
||||||
content: 'Strapi'
|
content: 'Strapi'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue