From 9e7462a77d6f466a413e6a25a40ea4d8ea409245 Mon Sep 17 00:00:00 2001 From: prototypa Date: Wed, 16 Aug 2023 00:42:35 -0400 Subject: [PATCH] Better layout when no image --- src/components/ui/Timeline.astro | 2 +- src/components/widgets/Steps.astro | 67 ++++++++++++++++-------------- 2 files changed, 37 insertions(+), 32 deletions(-) diff --git a/src/components/ui/Timeline.astro b/src/components/ui/Timeline.astro index bb25330..b393b50 100644 --- a/src/components/ui/Timeline.astro +++ b/src/components/ui/Timeline.astro @@ -49,7 +49,7 @@ const { )}
diff --git a/src/components/widgets/Steps.astro b/src/components/widgets/Steps.astro index fde8052..ecc6291 100644 --- a/src/components/widgets/Steps.astro +++ b/src/components/widgets/Steps.astro @@ -1,54 +1,59 @@ --- -import WidgetWrapper from "~/components/ui/WidgetWrapper.astro"; -import Timeline from "~/components/ui/Timeline.astro"; -import Headline from "~/components/ui/Headline.astro"; +import WidgetWrapper from '~/components/ui/WidgetWrapper.astro'; +import Timeline from '~/components/ui/Timeline.astro'; +import Headline from '~/components/ui/Headline.astro'; import Image from '~/components/common/Image.astro'; -import type { Steps } from "~/types"; +import type { Steps } from '~/types'; const { - title = await Astro.slots.render("title"), - subtitle = await Astro.slots.render("subtitle"), - tagline = await Astro.slots.render("tagline"), + title = await Astro.slots.render('title'), + subtitle = await Astro.slots.render('subtitle'), + tagline = await Astro.slots.render('tagline'), items = [], - image = await Astro.slots.render("image"), + image = await Astro.slots.render('image'), isReversed = false, id, isDark = false, classes = {}, - bg = await Astro.slots.render("bg"), + bg = await Astro.slots.render('bg'), } = Astro.props as Steps; --- - -
-
+ +
+
-
- { - image && - (typeof image === 'string' ? ( - + { + image && ( +
+ {(typeof image === 'string' ? ( + ) : ( - {image?.alt - )) - } -
+ {image?.alt + ))} +
+ ) + }