From 0eebcd03a4f77225517cd8f5825017a2a841d550 Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Sun, 3 Sep 2023 23:18:00 +0100 Subject: [PATCH] Add questions on homepage --- .../FeaturedItems/FeaturedItem.astro | 25 ++++++++++++++----- .../FeaturedItems/FeaturedItems.astro | 6 +++-- src/pages/index.astro | 12 +++++++++ 3 files changed, 35 insertions(+), 8 deletions(-) diff --git a/src/components/FeaturedItems/FeaturedItem.astro b/src/components/FeaturedItems/FeaturedItem.astro index d42d54581..73c424b40 100644 --- a/src/components/FeaturedItems/FeaturedItem.astro +++ b/src/components/FeaturedItems/FeaturedItem.astro @@ -6,11 +6,18 @@ export interface FeaturedItemType { isNew?: boolean; url: string; text: string; + allowBookmark?: boolean; } export interface Props extends FeaturedItemType {} -const { isUpcoming = false, isNew = false, text, url } = Astro.props; +const { + isUpcoming = false, + isNew = false, + text, + url, + allowBookmark = true, +} = Astro.props; --- - + { + allowBookmark && ( + + ) + } { isNew && ( diff --git a/src/components/FeaturedItems/FeaturedItems.astro b/src/components/FeaturedItems/FeaturedItems.astro index e19af0fab..92ac30c4a 100644 --- a/src/components/FeaturedItems/FeaturedItems.astro +++ b/src/components/FeaturedItems/FeaturedItems.astro @@ -4,15 +4,16 @@ import FeaturedItem, { FeaturedItemType } from './FeaturedItem.astro'; export interface Props { featuredItems: FeaturedItemType[]; heading: string; + allowBookmark?: boolean; } -const { featuredItems, heading } = Astro.props; +const { featuredItems, heading, allowBookmark = true } = Astro.props; ---

{heading}

@@ -22,6 +23,7 @@ const { featuredItems, heading } = Astro.props; featuredItems.map((featuredItem) => (
  • + + + + + + + + + +