From 55c65b0c2ac36fc364ac8454876e5517ab8acbb1 Mon Sep 17 00:00:00 2001 From: ildyria Date: Tue, 15 Oct 2024 11:06:31 +0200 Subject: [PATCH] improve list --- src/components/ui/Tag.astro | 7 +++++++ src/components/widgets/FeaturesList.astro | 7 ++++--- src/pages/get-supporter-edition.astro | 17 +++++++++++++---- src/types.d.ts | 1 + 4 files changed, 25 insertions(+), 7 deletions(-) create mode 100644 src/components/ui/Tag.astro diff --git a/src/components/ui/Tag.astro b/src/components/ui/Tag.astro new file mode 100644 index 00000000..bb35eae7 --- /dev/null +++ b/src/components/ui/Tag.astro @@ -0,0 +1,7 @@ +--- +import { twMerge } from 'tailwind-merge'; + +const { tag = 'v6', classes = {} } = Astro.props; +--- + +{ tag } \ No newline at end of file diff --git a/src/components/widgets/FeaturesList.astro b/src/components/widgets/FeaturesList.astro index c38e6613..50314d45 100644 --- a/src/components/widgets/FeaturesList.astro +++ b/src/components/widgets/FeaturesList.astro @@ -3,6 +3,7 @@ import Headline from '~/components/ui/Headline.astro'; import WidgetWrapper from '~/components/ui/WidgetWrapper.astro'; import type { FeaturesList as Props } from '~/types'; import Tick from '../ui/Tick.astro'; +import Tag from '../ui/Tag.astro'; const { title = await Astro.slots.render('title'), @@ -36,11 +37,11 @@ const { { - specs.map(({ feature, isHeader, values, available }) => ( - + specs.map(({ feature, isHeader, isV6, values, available }) => ( + {isHeader && } {isHeader && products.map(() => )} - {!isHeader && } + {!isHeader && { isV6 && } } {!isHeader && values && (values.map((val) => {val}))} {!isHeader && available && available.map((yes) => {yes && })} diff --git a/src/pages/get-supporter-edition.astro b/src/pages/get-supporter-edition.astro index 8dff9517..32028a60 100644 --- a/src/pages/get-supporter-edition.astro +++ b/src/pages/get-supporter-edition.astro @@ -115,6 +115,7 @@ const metadata = { { feature: 'Dark and Light themes', available: [true, true], + isV6: true, }, { feature: 'Unlimited photos upload', @@ -154,8 +155,9 @@ const metadata = { available: [true, true], }, { - feature: 'Upload by chunks v6', + feature: 'Upload by chunks', available: [true, true], + isV6: true, }, { feature: 'Zip & download', @@ -207,8 +209,9 @@ const metadata = { available: [true, true], }, { - feature: 'Slideshow with previous & next v6', + feature: 'Slideshow with previous & next', available: [true, true], + isV6: true, }, { @@ -228,12 +231,14 @@ const metadata = { available: [true, true], }, { - feature: 'Space usage per user v6', + feature: 'Space usage per user', available: [false, true], + isV6: true, }, { - feature: 'Upload quota per user v6', + feature: 'Upload quota per user', available: [false, true], + isV6: true, }, { @@ -244,6 +249,10 @@ const metadata = { feature: 'Landing page', available: [true, true], }, + { + feature: 'Map view', + available: [true, true], + }, { feature: 'RSS Feed', available: [true, true], diff --git a/src/types.d.ts b/src/types.d.ts index 636e962f..a78811bc 100644 --- a/src/types.d.ts +++ b/src/types.d.ts @@ -257,6 +257,7 @@ export interface Features extends Omit, Widget { export interface Spec { feature: string; isHeader?: boolean; + isV6?: boolean; values?: string[]; available?: boolean[]; }