11import React from 'react'
2- import { Container , Paper , Stack , Image , Title , Button , Group } from '@mantine/core'
2+ import {
3+ Container , Paper , Stack , Image , Title , Button , Box , Overlay ,
4+ Group
5+ } from '@mantine/core'
36import { IconHeartbeat } from '@tabler/icons-react'
47import ReactMarkdown from 'react-markdown'
58import PageContent from './page.content'
@@ -16,48 +19,80 @@ interface PageProps {
1619
1720const PageComponent = ( { page, store } : PageProps ) => {
1821 return (
19- < Container size = "md" py = "xl" id = { window . location . hash ?. replace ( '#' , '' ) } >
20- < Paper shadow = "md" radius = "md" p = "xl" mb = "xl" >
21- < Stack align = "center" >
22- { store ?. Logo && (
23- < Image
24- src = { store . Logo . formats ?. small ?. url || store . Logo . url }
25- alt = { store . title }
26- width = { 200 }
27- height = { 200 }
28- fit = "contain"
29- />
30- ) }
22+ < Container size = "md" py = "xl" >
23+ < Box pos = "relative" h = { 300 } mb = { 50 } >
24+ < Box
25+ style = { {
26+ backgroundImage : `url(${ store ?. Cover ?. url || store ?. SEO ?. socialImage ?. url || '' } )` ,
27+ backgroundSize : 'cover' ,
28+ backgroundPosition : 'center' ,
29+ height : '100%' ,
30+ width : '100%' ,
31+ } }
32+ >
33+ < Overlay
34+ gradient = "linear-gradient(180deg, rgba(36, 85, 214, 0.2) 0%, rgba(36, 85, 214, 0.4) 100%)"
35+ opacity = { 0.6 }
36+ zIndex = { 1 }
37+ />
38+ </ Box >
3139
32- < Title order = { 1 } >
33- { store ?. title }
34- </ Title >
35-
36- { store ?. Description && (
37- < div className = "blocks-content" >
38- < ReactMarkdown >
39- { store . Description }
40- </ ReactMarkdown >
41- </ div >
42- ) }
43-
44- { store ?. URLS ?. length && (
45- < Group mt = "md" >
46- { store . URLS . map ( ( url ) => (
47- < Button
48- key = { url . id }
49- component = "a"
50- href = { url . URL }
51- target = "_blank"
52- variant = "light"
53- >
54- < IconHeartbeat size = { 18 } /> { ` ` }
55- { url . Label }
56- </ Button >
57- ) ) }
58- </ Group >
59- ) }
60- </ Stack >
40+ < Paper
41+ pos = "absolute"
42+ left = "50%"
43+ style = { { transform : 'translate(-50%, 50%)' } }
44+ bottom = { 0 }
45+ shadow = "xl"
46+ p = "xs"
47+ withBorder
48+ radius = "md"
49+ bg = "white"
50+ className = "z-10"
51+ >
52+ { store ?. Logo ?. url && (
53+ < img
54+ src = { store . Logo . url }
55+ alt = { store . SEO ?. metaTitle }
56+ width = { 150 }
57+ height = { 150 }
58+ className = "rounded-md object-contain"
59+ />
60+ ) }
61+ </ Paper >
62+ </ Box >
63+ < Paper shadow = "md" radius = "md" p = "xl" mb = "xl" >
64+ < Container size = "lg" className = "pb-20 pt-10" >
65+ < Stack gap = "xl" >
66+ < Title className = "text-4xl text-center md:text-5xl mb-4" >
67+ { store ?. title || store ?. SEO ?. metaTitle }
68+ </ Title >
69+ </ Stack >
70+ </ Container >
71+ < Stack align = "center" >
72+ { store ?. Description && (
73+ < div className = "blocks-content" >
74+ < ReactMarkdown >
75+ { store . Description }
76+ </ ReactMarkdown >
77+ </ div >
78+ ) }
79+ { store ?. URLS ?. length && (
80+ < Group mt = "md" >
81+ { store . URLS . map ( ( url ) => (
82+ < Button
83+ key = { url . id }
84+ component = "a"
85+ href = { url . URL }
86+ target = "_blank"
87+ variant = "light"
88+ >
89+ < IconHeartbeat size = { 18 } /> { ` ` }
90+ { url . Label }
91+ </ Button >
92+ ) ) }
93+ </ Group >
94+ ) }
95+ </ Stack >
6196 </ Paper >
6297 { page && (
6398 < Paper className = 'blocks-content' shadow = "md" radius = "md" p = "xl" mb = "xl" >
0 commit comments