diff --git a/src/components/widgets/Content.astro b/src/components/widgets/Content.astro index ce9fb13..f802282 100644 --- a/src/components/widgets/Content.astro +++ b/src/components/widgets/Content.astro @@ -4,12 +4,14 @@ import type { Content } from '~/types'; import Headline from '../ui/Headline.astro'; import WidgetWrapper from '../ui/WidgetWrapper.astro'; import Image from '~/components/common/Image.astro'; +import CTA from '../ui/CTA.astro'; const { title = await Astro.slots.render('title'), subtitle = await Astro.slots.render('subtitle'), tagline, content = await Astro.slots.render('content'), + callToAction, items = [], image = await Astro.slots.render('image'), isReversed = false, @@ -43,6 +45,14 @@ const {
{content &&
} + { + callToAction && ( +
+ +
+ ) + } + { items && (
diff --git a/src/pages/homes/personal.astro b/src/pages/homes/personal.astro index b22b1cd..f552097 100644 --- a/src/pages/homes/personal.astro +++ b/src/pages/homes/personal.astro @@ -201,6 +201,12 @@ const metadata = { src: 'https://images.unsplash.com/photo-1658248165252-71e116af1b34?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=928&q=80', alt: 'Tech Design Image', }} + callToAction={{ + targetBlank: true, + text: 'Go to the project', + icon: 'tabler:chevron-right', + href: '#', + }} >

@@ -233,6 +239,12 @@ const metadata = { src: 'https://images.unsplash.com/photo-1619983081563-430f63602796?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=774&q=80', alt: 'Art and Music Poster Image', }} + callToAction={{ + targetBlank: true, + text: 'Go to the project', + icon: 'tabler:chevron-right', + href: '#', + }} >

@@ -264,6 +276,12 @@ const metadata = { src: 'https://plus.unsplash.com/premium_photo-1683288295841-782fa47e4770?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=870&q=80', alt: 'Fashion e-commerce Image', }} + callToAction={{ + targetBlank: true, + text: 'Go to the project', + icon: 'tabler:chevron-right', + href: '#', + }} >

diff --git a/src/types.d.ts b/src/types.d.ts index 92102cb..8a89204 100644 --- a/src/types.d.ts +++ b/src/types.d.ts @@ -273,6 +273,7 @@ export interface Content extends Headline, Widget { columns?: number; isReversed?: boolean; isAfterContent?: boolean; + callToAction?: CallToAction; } export interface Contact extends Headline, Form, Widget {}