From 14f97aea88282c8a8326049f2adec10dc1e24d08 Mon Sep 17 00:00:00 2001 From: Benno Tielen Date: Tue, 17 Dec 2024 16:28:47 +0100 Subject: [PATCH] feature: button "All" on homepage --- src/app/home.module.css | 4 ++ src/pageComponents/Home/Home.tsx | 45 +++++++++++++--------- src/pageComponents/Home/styles.module.scss | 3 ++ src/payload.config.ts | 1 + 4 files changed, 35 insertions(+), 18 deletions(-) create mode 100644 src/pageComponents/Home/styles.module.scss diff --git a/src/app/home.module.css b/src/app/home.module.css index 0d5825d..ce5e149 100644 --- a/src/app/home.module.css +++ b/src/app/home.module.css @@ -11,3 +11,7 @@ display: flex; justify-content: center; } + +.center { + text-align: center; +} diff --git a/src/pageComponents/Home/Home.tsx b/src/pageComponents/Home/Home.tsx index cc5da3c..b24bd54 100644 --- a/src/pageComponents/Home/Home.tsx +++ b/src/pageComponents/Home/Home.tsx @@ -18,6 +18,8 @@ import { transformEvents } from '@/utils/dto/events' import { ContactSection } from '@/compositions/ContactSection/ContactSection' import { CollapsibleImageWithText } from '@/compositions/CollapsibleImageWithText/CollapsibleImageWithText' import { MoreInformation } from '@/pageComponents/Home/MoreInformation' +import { Button } from '@/components/Button/Button' +import styles from "./styles.module.scss" type HomeProps = { events: Event[], @@ -85,32 +87,39 @@ export const Home = ({
- {blog && blog.length > 0 &&
<ImageCardSlider slides={blogToSlides(blog)} /> </Section> } - - - <Section paddingBottom={'medium'}> - <Title - title={'Nächste Gottesdiensten'} - subtitle={'Komm einfach vorbei!'} - color={"contrast"} - align={'center'} - /> - - <Section padding={'small'}> - <MassRow> - {worshipPerLocation.map(value => <MassTable key={value[0]} location={value[0]} masses={value[1]} />)} - </MassRow> - </Section> - - </Section> </Container> + <Section paddingBottom={'medium'}> + <Title + title={'Nächste Gottesdiensten'} + subtitle={'Komm einfach vorbei!'} + color={"contrast"} + align={'center'} + /> + + <Section padding={'small'}> + <MassRow> + {worshipPerLocation.map(value => <MassTable key={value[0]} location={value[0]} masses={value[1]} />)} + </MassRow> + </Section> + + <Section padding={'small'}> + <div className={styles.center}> + <Button + href={"/gottesdienst"} + size={"lg"} + >Alle Gottesdienste</Button> + </div> + </Section> + + </Section> + <CollapsibleImageWithText backgroundColor={'soft'} title={'Über uns'} diff --git a/src/pageComponents/Home/styles.module.scss b/src/pageComponents/Home/styles.module.scss new file mode 100644 index 0000000..f61c743 --- /dev/null +++ b/src/pageComponents/Home/styles.module.scss @@ -0,0 +1,3 @@ +.center { + text-align: center; +} \ No newline at end of file diff --git a/src/payload.config.ts b/src/payload.config.ts index 2c8a4d9..bd03e12 100644 --- a/src/payload.config.ts +++ b/src/payload.config.ts @@ -87,6 +87,7 @@ export default buildConfig({ }, db: postgresAdapter({ idType: "uuid", + push: false, pool: { connectionString: process.env.DATABASE_URI, }