diff --git a/package.json b/package.json
index ca01d52..2bc4178 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "@onwidget/astrowind",
- "description": "A template to make your website using Astro + Tailwind CSS.",
- "version": "1.0.0-beta.1",
+ "description": "AstroWind: A free template using Astro 3.0 and Tailwind CSS. Astro starter theme.",
+ "version": "1.0.0-beta.2",
"private": true,
"scripts": {
"dev": "astro dev",
diff --git a/src/assets/styles/tailwind.css b/src/assets/styles/tailwind.css
index bacd14e..38014f2 100644
--- a/src/assets/styles/tailwind.css
+++ b/src/assets/styles/tailwind.css
@@ -2,10 +2,6 @@
@tailwind components;
@tailwind utilities;
-.dd *:first-child {
- margin-top: 0;
-}
-
@layer utilities {
.bg-page {
background-color: var(--aw-color-bg-page);
@@ -13,31 +9,32 @@
.bg-dark {
background-color: var(--aw-color-bg-page-dark);
}
-}
-
-@layer components {
- .text-page {
- color: var(--aw-color-text-page);
- }
-
- .text-muted {
- color: var(--aw-color-text-muted);
- }
-
.bg-light {
background-color: var(--aw-color-bg-page);
}
-
- .btn {
- @apply inline-flex items-center justify-center rounded-full border-gray-400 border bg-transparent font-medium text-center text-base text-page leading-snug transition py-3.5 px-6 md:px-8 ease-in duration-200 focus:ring-blue-500 focus:ring-offset-blue-200 focus:ring-2 focus:ring-offset-2 hover:bg-gray-100 hover:border-gray-600 dark:text-slate-300 dark:border-slate-500 dark:hover:bg-slate-800 dark:hover:border-slate-800;
+ .text-page {
+ color: var(--aw-color-text-page);
}
+ .text-muted {
+ color: var(--aw-color-text-muted);
+ }
+}
- .btn-ghost {
- @apply border-none shadow-none text-muted hover:text-gray-900 dark:text-gray-400 dark:hover:text-white;
+@layer components {
+ .btn {
+ @apply inline-flex items-center justify-center rounded-full border-gray-400 border bg-transparent font-medium text-center text-base text-page leading-snug transition py-3.5 px-6 md:px-8 ease-in duration-200 focus:ring-blue-500 focus:ring-offset-blue-200 focus:ring-2 focus:ring-offset-2 hover:bg-gray-100 hover:border-gray-600 dark:text-slate-300 dark:border-slate-500 dark:hover:bg-slate-800 dark:hover:border-slate-800 cursor-pointer;
}
.btn-primary {
- @apply font-semibold bg-primary text-white border-primary hover:bg-secondary hover:border-secondary hover:text-white dark:text-white dark:bg-primary dark:border-primary dark:hover:border-secondary dark:hover:bg-secondary;
+ @apply btn font-semibold bg-primary text-white border-primary hover:bg-secondary hover:border-secondary hover:text-white dark:text-white dark:bg-primary dark:border-primary dark:hover:border-secondary dark:hover:bg-secondary;
+ }
+
+ .btn-secondary {
+ @apply btn;
+ }
+
+ .btn-tertiary {
+ @apply btn border-none shadow-none text-muted hover:text-gray-900 dark:text-gray-400 dark:hover:text-white;
}
}
@@ -85,3 +82,9 @@
[data-aw-toggle-menu].expanded g > path:last-child {
@apply rotate-45 translate-y-[-8px] translate-x-[14px];
}
+
+/* To deprecated */
+
+.dd *:first-child {
+ margin-top: 0;
+}
diff --git a/src/components/blog/Pagination.astro b/src/components/blog/Pagination.astro
index 058e363..1a3af78 100644
--- a/src/components/blog/Pagination.astro
+++ b/src/components/blog/Pagination.astro
@@ -1,6 +1,7 @@
---
import { Icon } from 'astro-icon/components';
import { getPermalink } from '~/utils/permalinks';
+import Button from '~/components/ui/Button.astro';
export interface Props {
prevUrl: string;
@@ -16,18 +17,19 @@ const { prevUrl, nextUrl, prevText = 'Newer posts', nextText = 'Older posts' } =
(prevUrl || nextUrl) && (
)
diff --git a/src/components/blog/ToBlogLink.astro b/src/components/blog/ToBlogLink.astro
index d37bd8b..e3e28ef 100644
--- a/src/components/blog/ToBlogLink.astro
+++ b/src/components/blog/ToBlogLink.astro
@@ -2,16 +2,19 @@
import { Icon } from 'astro-icon/components';
import { getBlogPermalink } from '~/utils/permalinks';
import { I18N } from '~/utils/config';
+import Button from '~/components/ui/Button.astro';
const { textDirection } = I18N;
---
diff --git a/src/components/ui/Button.astro b/src/components/ui/Button.astro
new file mode 100644
index 0000000..9014de2
--- /dev/null
+++ b/src/components/ui/Button.astro
@@ -0,0 +1,26 @@
+---
+import { Icon } from 'astro-icon/components';
+import { twMerge } from 'tailwind-merge';
+import type { CallToAction } from '~/types';
+
+const {
+ variant = 'secondary',
+ target,
+ text = Astro.slots.render("default"),
+ icon = '',
+ class: className = '',
+ ...rest
+} = Astro.props as CallToAction;
+
+const variants = {
+ primary: 'btn-primary' ,
+ secondary: 'btn-secondary',
+ tertiary: 'btn btn-tertiary',
+ link: 'hover:text-primary',
+};
+---
+
+
+
+ {icon && }
+
diff --git a/src/components/ui/CTA.astro b/src/components/ui/CTA.astro
deleted file mode 100644
index 5a7d10a..0000000
--- a/src/components/ui/CTA.astro
+++ /dev/null
@@ -1,38 +0,0 @@
----
-import { Icon } from "astro-icon/components";
-import type { CallToAction } from "~/types";
-
-const { callToAction } = Astro.props;
-
-const {
- targetBlank,
- text = "",
- icon = "",
- href = "",
-} = callToAction as CallToAction;
----
-
-
diff --git a/src/components/ui/Form.astro b/src/components/ui/Form.astro
index d278520..64f3f36 100644
--- a/src/components/ui/Form.astro
+++ b/src/components/ui/Form.astro
@@ -1,5 +1,6 @@
---
import type { Form } from '~/types';
+import Button from '~/components/ui/Button.astro';
const { inputs, textarea, disclaimer, button = 'Contact us', description = '' } = Astro.props as Form;
---
@@ -69,9 +70,7 @@ const { inputs, textarea, disclaimer, button = 'Contact us', description = '' }
{
button && (
-
+
)
}
diff --git a/src/components/ui/ItemGrid.astro b/src/components/ui/ItemGrid.astro
index 8a6f6a6..03f27e8 100644
--- a/src/components/ui/ItemGrid.astro
+++ b/src/components/ui/ItemGrid.astro
@@ -1,7 +1,7 @@
---
import { twMerge } from 'tailwind-merge';
import type { ItemGrid } from '~/types';
-import CTA from './CTA.astro';
+import Button from './Button.astro';
import { Icon } from 'astro-icon/components';
const { items = [], columns, defaultIcon = '', classes = {} } = Astro.props as ItemGrid;
@@ -54,12 +54,12 @@ const {
{callToAction && (
-
+
)}
diff --git a/src/components/ui/ItemGrid2.astro b/src/components/ui/ItemGrid2.astro
index 9511413..9d0bc42 100644
--- a/src/components/ui/ItemGrid2.astro
+++ b/src/components/ui/ItemGrid2.astro
@@ -2,7 +2,7 @@
import { Icon } from "astro-icon/components";
import { twMerge } from "tailwind-merge";
import type { ItemGrid } from "~/types";
-import CTA from "./CTA.astro";
+import Button from "./Button.astro";
const {
items = [],
@@ -82,8 +82,8 @@ const {
/>
)}
{callToAction && (
-
diff --git a/src/components/widgets/BlogLatestPosts.astro b/src/components/widgets/BlogLatestPosts.astro
index 600a725..9b45383 100644
--- a/src/components/widgets/BlogLatestPosts.astro
+++ b/src/components/widgets/BlogLatestPosts.astro
@@ -7,6 +7,7 @@ import { getBlogPermalink } from "~/utils/permalinks";
import { findLatestPosts } from "~/utils/blog";
import WidgetWrapper from "~/components/ui/WidgetWrapper.astro";
import type { Widget } from "~/types";
+import Button from "../ui/Button.astro";
export interface Props extends Widget {
title?: string;
@@ -43,12 +44,7 @@ const posts = APP_BLOG.isEnabled ? await findLatestPosts({ count }) : [];
set:html={title}
/>
{APP_BLOG.list.isEnabled && linkText && linkUrl && (
-
- {linkText} »
-
+
)}
)}
diff --git a/src/components/widgets/CallToAction.astro b/src/components/widgets/CallToAction.astro
index d50b2c5..b9bae02 100644
--- a/src/components/widgets/CallToAction.astro
+++ b/src/components/widgets/CallToAction.astro
@@ -1,8 +1,8 @@
---
-import { Icon } from 'astro-icon/components';
import WidgetWrapper from '../ui/WidgetWrapper.astro';
import type { CallToAction, Widget } from '~/types';
-import Headline from '../ui/Headline.astro';
+import Headline from '~/components/ui/Headline.astro';
+import Button from "~/components/ui/Button.astro"
interface Props extends Widget {
title?: string;
@@ -43,13 +43,9 @@ const {
) : (
callToAction &&
- callToAction.text &&
- callToAction.href && (
+ callToAction.text && (
)
)
diff --git a/src/components/widgets/Content.astro b/src/components/widgets/Content.astro
index 12e54a7..5b95182 100644
--- a/src/components/widgets/Content.astro
+++ b/src/components/widgets/Content.astro
@@ -3,7 +3,7 @@ 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';
+import Button from '~/components/ui/Button.astro';
import ItemGrid from '../ui/ItemGrid.astro';
const {
@@ -48,8 +48,8 @@ const {
{
callToAction && (
-
-
+
+
)
}
diff --git a/src/components/widgets/Header.astro b/src/components/widgets/Header.astro
index 0812c65..60a2e36 100644
--- a/src/components/widgets/Header.astro
+++ b/src/components/widgets/Header.astro
@@ -3,9 +3,11 @@ import { Icon } from "astro-icon/components";
import Logo from "~/components/Logo.astro";
import ToggleTheme from "~/components/common/ToggleTheme.astro";
import ToggleMenu from "~/components/common/ToggleMenu.astro";
+import Button from "~/components/ui/Button.astro"
import { getHomePermalink } from "~/utils/permalinks";
import { trimSlash, getAsset } from "~/utils/permalinks";
+import type { CallToAction } from "~/types";
interface Link {
text?: string;
@@ -14,10 +16,7 @@ interface Link {
icon?: string;
}
-interface ActionLink extends Link {
- class?: string;
- type?: string;
-}
+interface ActionLink extends CallToAction {}
interface MenuLink extends Link {
links?: Array
;
@@ -146,10 +145,8 @@ const currentPath = `/${trimSlash(new URL(Astro.url).pathname)}`
{
actions?.length ? (
- {actions.map(({ text, href, class: className }) => (
-
-
-
+ {actions.map((btnProps) => (
+
))}
) : (
diff --git a/src/components/widgets/Hero.astro b/src/components/widgets/Hero.astro
index ed5e99a..20a1ba7 100644
--- a/src/components/widgets/Hero.astro
+++ b/src/components/widgets/Hero.astro
@@ -1,19 +1,30 @@
---
import Image from '~/components/common/Image.astro';
-import CTA from '../ui/CTA.astro';
+import Button from '~/components/ui/Button.astro';
+import type { CallToAction } from '~/types';
+
+export interface Props {
+ id?: string;
+ title?: string;
+ subtitle?: string;
+ tagline?: string;
+ content?: string;
+ actions?: string | CallToAction[];
+ image?: string | any; // TODO: find HTMLElementProps
+}
const {
+ id,
title = await Astro.slots.render('title'),
subtitle = await Astro.slots.render('subtitle'),
tagline,
content = await Astro.slots.render('content'),
- callToAction = await Astro.slots.render('callToAction'),
- callToAction2 = await Astro.slots.render('callToAction2'),
+ actions = await Astro.slots.render('actions'),
image = await Astro.slots.render('image'),
} = Astro.props;
---
-
+
@@ -37,34 +48,21 @@ const {
}
{subtitle &&
}
-
- {
- callToAction && (
-
- {typeof callToAction === 'string' ? (
-
- ) : (
-
-
+ {
+ actions && (
+
+ {Array.isArray(actions) ? (
+ actions.map((action) => (
+
+
- )}
-
- )
- }
- {
- callToAction2 && (
-
- {typeof callToAction2 === 'string' ? (
-
- ) : (
-
-
-
- )}
-
- )
- }
-
+ ))
+ ) : (
+
+ )}
+
+ )
+ }
{content &&
}
diff --git a/src/components/widgets/Hero2.astro b/src/components/widgets/Hero2.astro
index dcafae2..5eb3202 100644
--- a/src/components/widgets/Hero2.astro
+++ b/src/components/widgets/Hero2.astro
@@ -1,15 +1,14 @@
---
import Image from '~/components/common/Image.astro';
import type { CallToAction } from '~/types';
-import CTA from '../ui/CTA.astro';
+import Button from '~/components/ui/Button.astro';
export interface Props {
title?: string;
subtitle?: string;
tagline?: string;
content?: string;
- callToAction?: string | CallToAction;
- callToAction2?: string | CallToAction;
+ actions?: string | CallToAction[];
image?: string | any; // TODO: find HTMLElementProps
}
@@ -18,8 +17,7 @@ const {
subtitle = await Astro.slots.render('subtitle'),
tagline,
content = await Astro.slots.render('content'),
- callToAction = await Astro.slots.render('callToAction'),
- callToAction2 = await Astro.slots.render('callToAction2'),
+ actions = await Astro.slots.render('actions'),
image = await Astro.slots.render('image'),
} = Astro.props;
---
@@ -48,36 +46,22 @@ const {
}
{subtitle &&
}
-
- {
- callToAction && (
-
- {typeof callToAction === 'string' ? (
-
- ) : (
-
-
+
+ {
+ actions && (
+
+ {Array.isArray(actions) ? (
+ actions.map((action) => (
+
+
- )}
-
- )
- }
- {
- callToAction2 && (
-
- {typeof callToAction2 === 'string' ? (
-
- ) : (
-
-
-
- )}
-
- )
- }
-
+ ))
+ ) : (
+
+ )}
+
+ )
+ }
{content &&
}
diff --git a/src/components/widgets/HeroText.astro b/src/components/widgets/HeroText.astro
index 419ccdf..7087198 100644
--- a/src/components/widgets/HeroText.astro
+++ b/src/components/widgets/HeroText.astro
@@ -1,5 +1,5 @@
---
-import { Icon } from 'astro-icon/components';
+import Button from '~/components/ui/Button.astro';
const {
title = await Astro.slots.render('title'),
@@ -40,14 +40,7 @@ const {
{typeof callToAction === 'string' ? (
) : (
-
- {callToAction?.icon && (
- <>
-
- >
- )}
- {callToAction?.text}
-
+
)}
)
@@ -58,15 +51,7 @@ const {
{typeof callToAction2 === 'string' ? (
) : (
-
- {callToAction2?.icon && (
- <>
-
-
- >
- )}
- {callToAction2.text}
-
+
)}
)
diff --git a/src/components/widgets/Pricing.astro b/src/components/widgets/Pricing.astro
index 4ca0589..dc03eb0 100644
--- a/src/components/widgets/Pricing.astro
+++ b/src/components/widgets/Pricing.astro
@@ -1,6 +1,6 @@
---
import { Icon } from 'astro-icon/components';
-import CTA from '~/components/ui/CTA.astro';
+import Button from '~/components/ui/Button.astro';
import Headline from '~/components/ui/Headline.astro';
import WidgetWrapper from '~/components/ui/WidgetWrapper.astro';
import type { Pricing } from '~/types';
@@ -64,11 +64,11 @@ const {
)}
{callToAction && (
-
+
{typeof callToAction === 'string' ? (
) : (
- callToAction && callToAction.text && callToAction.href &&
+ callToAction && callToAction.text && callToAction.href &&
)}
)}
diff --git a/src/components/widgets/Steps2.astro b/src/components/widgets/Steps2.astro
index bea8e9d..b34e478 100644
--- a/src/components/widgets/Steps2.astro
+++ b/src/components/widgets/Steps2.astro
@@ -1,8 +1,9 @@
---
import { Icon } from 'astro-icon/components';
-import Headline from '../ui/Headline.astro';
+import WidgetWrapper from '~/components/ui/WidgetWrapper.astro';
+import Headline from '~/components/ui/Headline.astro';
+import Button from '~/components/ui/Button.astro';
import type { Steps } from '~/types';
-import WidgetWrapper from '../ui/WidgetWrapper.astro';
const {
title = await Astro.slots.render('title'),
@@ -42,10 +43,7 @@ const {
callToAction &&
callToAction.text &&
callToAction.href && (
-
- {callToAction.icon && }
- {callToAction.text}
-
+
)
)
}
diff --git a/src/components/widgets/Testimonials.astro b/src/components/widgets/Testimonials.astro
index 5a114fe..57b2a7c 100644
--- a/src/components/widgets/Testimonials.astro
+++ b/src/components/widgets/Testimonials.astro
@@ -1,7 +1,7 @@
---
import Headline from '~/components/ui/Headline.astro';
import WidgetWrapper from '~/components/ui/WidgetWrapper.astro';
-import CTA from '~/components/ui/CTA.astro';
+import Button from '~/components/ui/Button.astro';
import Image from '~/components/common/Image.astro';
import type { Testimonials } from '~/types';
@@ -68,8 +68,8 @@ const {
{
callToAction && (
-
-
+
+
)
}
diff --git a/src/pages/homes/mobile-app.astro b/src/pages/homes/mobile-app.astro
index 28a2c2b..873787c 100644
--- a/src/pages/homes/mobile-app.astro
+++ b/src/pages/homes/mobile-app.astro
@@ -19,13 +19,16 @@ const metadata = {
I'm a Graphic Designer passionate about crafting visual stories.
With 5 years of experience and a degree
@@ -62,7 +62,7 @@ const metadata = {
{
icon: 'tabler:brand-dribbble',
callToAction: {
- targetBlank: true,
+ target: '_blank',
text: 'Dribbble',
href: '#',
},
@@ -70,7 +70,7 @@ const metadata = {
{
icon: 'tabler:brand-behance',
callToAction: {
- targetBlank: true,
+ target: '_blank',
text: 'Behance',
href: '#',
},
@@ -78,7 +78,7 @@ const metadata = {
{
icon: 'tabler:brand-pinterest',
callToAction: {
- targetBlank: true,
+ target: '_blank',
text: 'Pinterest',
href: '#',
},
@@ -220,7 +220,7 @@ const metadata = {
alt: 'Tech Design Image',
}}
callToAction={{
- targetBlank: true,
+ target: '_blank',
text: 'Go to the project',
icon: 'tabler:chevron-right',
href: '#',
@@ -258,7 +258,7 @@ const metadata = {
alt: 'Art and Music Poster Image',
}}
callToAction={{
- targetBlank: true,
+ target: '_blank',
text: 'Go to the project',
icon: 'tabler:chevron-right',
href: '#',
@@ -295,7 +295,7 @@ const metadata = {
alt: 'Fashion e-commerce Image',
}}
callToAction={{
- targetBlank: true,
+ target: '_blank',
text: 'Go to the project',
icon: 'tabler:chevron-right',
href: '#',
diff --git a/src/pages/homes/saas.astro b/src/pages/homes/saas.astro
index 5c8dfcc..2b37b9f 100644
--- a/src/pages/homes/saas.astro
+++ b/src/pages/homes/saas.astro
@@ -13,7 +13,7 @@ import FAQs from '~/components/widgets/FAQs.astro';
import BlogLatestPosts from '~/components/widgets/BlogLatestPosts.astro';
const metadata = {
- title: 'Saas Landing Page',
+ title: 'SaaS Landing Page',
};
---
@@ -23,12 +23,12 @@ const metadata = {
{...headerData}
actions={[
{
- type: 'ghost',
+ variant: 'secondary',
text: 'Login',
href: '#',
},
{
- type: 'primary',
+ variant: 'primary',
text: 'Sign Up',
href: '#',
},
@@ -41,8 +41,10 @@ const metadata = {
Improve the online presence of your
diff --git a/src/pages/landing/click-through.astro b/src/pages/landing/click-through.astro
index e8f518d..f5e5464 100644
--- a/src/pages/landing/click-through.astro
+++ b/src/pages/landing/click-through.astro
@@ -16,8 +16,7 @@ const metadata = {
tagline="Click-through Demo"
title="Click-through Landing Page: The Perfect Bridge to Conversion!"
subtitle="Learn how to design a Click-Through Landing Page that seamlessly guides visitors to your main offer."
- callToAction={{ text: 'Call to Action', href: '#', icon: 'tabler:square-rounded-arrow-right' }}
- callToAction2={{ text: 'Learn more', href: '#' }}
+ actions={[{ variant:"primary", text: 'Call to Action', href: '#', icon: 'tabler:square-rounded-arrow-right' }, { text: 'Learn more', href: '#' }]}
image={{
src: 'https://images.unsplash.com/photo-1516321497487-e288fb19713f?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80',
alt: 'Click-through Landing Page Hero Image',
diff --git a/src/pages/landing/lead-generation.astro b/src/pages/landing/lead-generation.astro
index 851b015..fea8981 100644
--- a/src/pages/landing/lead-generation.astro
+++ b/src/pages/landing/lead-generation.astro
@@ -16,8 +16,7 @@ const metadata = {
tagline="Lead Generation Landing Demo"
title="Effective Lead Generation Landing Page: Unlock the Secrets"
subtitle="Discover the secrets to creating a Landing Page that turns curious visitors into eager leads. (Your Hero should grab attention instantly. Use a powerful headline that speaks directly to your target audience.)"
- callToAction={{ text: 'Call to Action', href: '#', icon: 'tabler:square-rounded-arrow-right' }}
- callToAction2={{ text: 'Learn more', href: '#' }}
+ actions={[{ variant:"primary", text: 'Call to Action', href: '#', icon: 'tabler:square-rounded-arrow-right' }, { text: 'Learn more', href: '#' }]}
image={{
src: 'https://images.unsplash.com/photo-1597423498219-04418210827d?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1674&q=80',
alt: 'Magnet attracting screws. Lead generation landing page demo',
diff --git a/src/pages/landing/pre-launch.astro b/src/pages/landing/pre-launch.astro
index 4376c28..d9915ca 100644
--- a/src/pages/landing/pre-launch.astro
+++ b/src/pages/landing/pre-launch.astro
@@ -16,8 +16,10 @@ const metadata = {
tagline="Pre-launch Demo"
title="Pre-launch Landing Page: Build the Hype Before the Big Reveal!"
subtitle="Craft a tantalizing Coming Soon or Pre-Launch Landing Page that leaves visitors eagerly awaiting your launch."
- callToAction={{ text: 'Call to Action', href: '#', icon: 'tabler:square-rounded-arrow-right' }}
- callToAction2={{ text: 'Learn more', href: '#' }}
+ actions={[
+ { variant: 'primary', text: 'Call to Action', href: '#', icon: 'tabler:square-rounded-arrow-right' },
+ { text: 'Learn more', href: '#' },
+ ]}
image={{
src: 'https://images.unsplash.com/photo-1558803116-c1b4ac867b31?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2069&q=80',
alt: 'Store with a Coming Soon sign. Pre-launch Landing Page',
diff --git a/src/pages/landing/product.astro b/src/pages/landing/product.astro
index dfa0c73..eead8a7 100644
--- a/src/pages/landing/product.astro
+++ b/src/pages/landing/product.astro
@@ -16,8 +16,10 @@ const metadata = {
tagline="Product Details Demo"
title="Product Landing Page: Showcase with Precision and Passion!"
subtitle="Step-by-step guide to designing a Landing Page that highlights every facet of your product or service."
- callToAction={{ text: 'Call to Action', href: '#', icon: 'tabler:square-rounded-arrow-right' }}
- callToAction2={{ text: 'Learn more', href: '#' }}
+ actions={[
+ { variant: 'primary', text: 'Call to Action', href: '#', icon: 'tabler:square-rounded-arrow-right' },
+ { text: 'Learn more', href: '#' },
+ ]}
image={{
src: 'https://images.unsplash.com/photo-1473188588951-666fce8e7c68?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2174&q=80',
alt: 'A spotlight on a product. Product Details Landing Page Demo',
diff --git a/src/pages/landing/sales.astro b/src/pages/landing/sales.astro
index 4bce13a..8fcab55 100644
--- a/src/pages/landing/sales.astro
+++ b/src/pages/landing/sales.astro
@@ -16,8 +16,7 @@ const metadata = {
tagline="Long-form Sales Demo"
title="Long-form Sales: Sell with a Story: The Long-form Way!"
subtitle="Dive deep into crafting a Landing Page that narrates, persuades, and converts."
- callToAction={{ text: 'Call to Action', href: '#', icon: 'tabler:square-rounded-arrow-right' }}
- callToAction2={{ text: 'Learn more', href: '#' }}
+ actions={[{ variant: "primary", text: 'Call to Action', href: '#', icon: 'tabler:square-rounded-arrow-right' }, { text: 'Learn more', href: '#' }]}
image={{
src: 'https://images.unsplash.com/photo-1621452773781-0f992fd1f5cb?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1626&q=80',
alt: 'Children telling a story. Long-form Sales Landing Page demo',
diff --git a/src/pages/landing/subscription.astro b/src/pages/landing/subscription.astro
index 1a1f264..7731103 100644
--- a/src/pages/landing/subscription.astro
+++ b/src/pages/landing/subscription.astro
@@ -16,8 +16,7 @@ const metadata = {
tagline="Subscription Landing Demo"
title="Subscription Landing Page: Turn Casual Browsers into Loyal Subscribers!"
subtitle="Unlock the formula for a Subscription Landing Page that keeps your audience coming back for more."
- callToAction={{ text: 'Call to Action', href: '#', icon: 'tabler:square-rounded-arrow-right' }}
- callToAction2={{ text: 'Learn more', href: '#' }}
+ actions={[{ variant: "primary", text: 'Call to Action', href: '#', icon: 'tabler:square-rounded-arrow-right' },{ text: 'Learn more', href: '#' } ]}
image={{
src: 'https://images.unsplash.com/photo-1593510987046-1f8fcfc512a0?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80',
alt: 'Ironic image associated with canceling a subscription. Subscription Landing Page Demo',
diff --git a/src/pages/pricing.astro b/src/pages/pricing.astro
index 47332fa..08c0422 100644
--- a/src/pages/pricing.astro
+++ b/src/pages/pricing.astro
@@ -47,7 +47,7 @@ const metadata = {
},
],
callToAction: {
- targetBlank: true,
+ target: '_blank',
text: 'Get started',
href: '#',
},
@@ -75,7 +75,7 @@ const metadata = {
},
],
callToAction: {
- targetBlank: true,
+ target: '_blank',
text: 'Get started',
href: '#',
},
@@ -102,7 +102,7 @@ const metadata = {
},
],
callToAction: {
- targetBlank: true,
+ target: '_blank',
text: 'Get started',
href: '#',
},
diff --git a/src/pages/services.astro b/src/pages/services.astro
index c7cb42a..f1c6e1e 100644
--- a/src/pages/services.astro
+++ b/src/pages/services.astro
@@ -18,7 +18,7 @@ const metadata = {
tagline="Services"
title="Elevate your projects with our stunning templates"
subtitle="Explore our meticulously crafted templates tailored to various industries and purposes. From captivating presentations to functional website designs, we offer the tools you need to succeed."
- callToAction={{ targetBlank: true, text: 'Start exploring', href: '/' }}
+ actions={[{ variant:"primary", target: '_blank', text: 'Start exploring', href: '/' }]}
image={{
src: 'https://images.unsplash.com/photo-1519389950473-47ba0277781c?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1740&q=80',
alt: 'AstroWind Hero Image',
@@ -201,7 +201,7 @@ const metadata = {
},
]}
callToAction={{
- targetBlank: true,
+ target: '_blank',
text: 'More testimonials...',
href: 'https://github.com/onwidget/astrowind',
icon: 'tabler:chevron-right',
diff --git a/src/types.d.ts b/src/types.d.ts
index 5c2e7b3..55a72ad 100644
--- a/src/types.d.ts
+++ b/src/types.d.ts
@@ -1,4 +1,5 @@
import type { AstroComponentFactory } from 'astro/runtime/server/index.js';
+import type { HTMLAttributes } from 'astro/types';
export interface Post {
/** A unique ID number that identifies a post. */
@@ -174,11 +175,10 @@ export interface Disclaimer {
}
// COMPONENTS
-export interface CallToAction {
- targetBlank?: boolean;
+export interface CallToAction extends HTMLAttributes {
+ variant?: 'primary' | 'secondary' | 'tertiary' | 'link';
text?: string;
icon?: string;
- href?: string;
classes?: Record;
}