@levo-so/blocks 0.1.74 → 0.1.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/src/blocks/about-us/about-us-1.schema.ts +0 -3
- package/src/blocks/blogs/ClientOnly.tsx +24 -0
- package/src/blocks/blogs/blog-listing-1.schema.ts +750 -111
- package/src/blocks/blogs/blog-listing-1.tsx +123 -41
- package/src/blocks/blogs/blog-listing-2.schema.ts +1127 -2640
- package/src/blocks/blogs/blog-listing-2.tsx +110 -23
- package/src/blocks/blogs/blog-listing-3.schema.ts +713 -2010
- package/src/blocks/blogs/blog-listing-3.tsx +118 -20
- package/src/blocks/blogs/blog-post-1.schema.ts +262 -32
- package/src/blocks/blogs/blog-post-1.tsx +217 -28
- package/src/blocks/cards/cards-16.schema.ts +947 -0
- package/src/blocks/cards/cards-16.tsx +106 -0
- package/src/blocks/cards/cards-17.schema.ts +1945 -0
- package/src/blocks/cards/cards-17.tsx +112 -0
- package/src/blocks/cards/cards-18.schema.ts +1040 -0
- package/src/blocks/cards/cards-18.tsx +102 -0
- package/src/blocks/cards/cards-2.schema.ts +2 -2
- package/src/blocks/cards/cards-3.schema.ts +3 -16
- package/src/blocks/cards/cards-4.schema.ts +3 -28
- package/src/blocks/cards/cards-7.schema.ts +4 -7
- package/src/blocks/cards/cards-8.schema.ts +1 -10
- package/src/blocks/carousel/carousel-2.schema.ts +1 -2
- package/src/blocks/content/content-10.schema.ts +450 -0
- package/src/blocks/content/content-10.tsx +43 -0
- package/src/blocks/content/content-3.schema.ts +22 -28
- package/src/blocks/content/content-5.schema.ts +0 -4
- package/src/blocks/cta/cta-1.schema.ts +0 -3
- package/src/blocks/event/event-details.schema.ts +41 -175
- package/src/blocks/event/event-details.tsx +45 -50
- package/src/blocks/event/event-listing-2.schema.ts +437 -202
- package/src/blocks/event/event-listing-2.tsx +86 -22
- package/src/blocks/event/event-listing-3.schema.ts +232 -196
- package/src/blocks/event/event-listing-3.tsx +62 -29
- package/src/blocks/event/event-listing-4.schema.ts +314 -2824
- package/src/blocks/event/event-listing-4.tsx +68 -32
- package/src/blocks/event/event-listing.schema.ts +176 -1032
- package/src/blocks/event/event-listing.tsx +59 -25
- package/src/blocks/features/features-1/variants/stylized-cards-v2.ts +0 -1
- package/src/blocks/features/features-4.schema.ts +4 -14
- package/src/blocks/features/features-5.schema.ts +30 -51
- package/src/blocks/features/features-6.schema.ts +0 -1
- package/src/blocks/filter-listing/filter-listing-1.schema.ts +1 -3
- package/src/blocks/footer/footer-3.schema.ts +6 -14
- package/src/blocks/hero/hero-11.schema.ts +25 -54
- package/src/blocks/hero/hero-5.schema.ts +2 -6
- package/src/blocks/hero/hero-6.schema.ts +1 -10
- package/src/blocks/index.ts +4 -0
- package/src/blocks/logos/logos-1.schema.ts +0 -30
- package/src/blocks/pricing/pricing-1.schema.ts +0 -3
- package/src/blocks/stats/variants/default.ts +4 -5
- package/src/blocks/team/team-2.schema.ts +57 -154
- package/src/blocks/team/team-3.schema.ts +14 -31
- package/src/blocks/testimonial/testimonial-4.schema.ts +67 -152
- package/src/blocks/testimonial/testimonial-5/variants/default.ts +0 -1
- package/src/blocks/testimonial/testimonial-5/variants/testimonialWithLogo.ts +0 -1
- package/src/blocks/testimonial/testimonial-5/variants/testimonialWithRatings.ts +0 -1
- package/src/schemas/blocks.ts +8 -0
|
@@ -8,48 +8,53 @@ import {
|
|
|
8
8
|
RegisterModal,
|
|
9
9
|
Section,
|
|
10
10
|
Typography,
|
|
11
|
+
usePageContext,
|
|
11
12
|
} from "@levo-so/studio";
|
|
12
13
|
import dayjs from "dayjs";
|
|
13
14
|
|
|
14
15
|
import { ClientOnly } from "./ClientOnly";
|
|
15
16
|
import type { IEventDetailsContent } from "./event-details.schema";
|
|
16
17
|
|
|
17
|
-
const EventDetails: React.FC<ILevoBlockBaseProps<IEventDetailsContent>> = (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
const EventDetails: React.FC<ILevoBlockBaseProps<IEventDetailsContent>> = () => {
|
|
19
|
+
const data = usePageContext("event");
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<Section elementKey="layout">
|
|
23
|
+
<Container elementKey="container">
|
|
21
24
|
<Box elementKey="hero-card">
|
|
22
|
-
<Image
|
|
25
|
+
<Image
|
|
26
|
+
elementKey="hero-image"
|
|
27
|
+
alt="Event cover image"
|
|
28
|
+
width={800}
|
|
29
|
+
height={400}
|
|
30
|
+
image={data?.cover_image}
|
|
31
|
+
/>
|
|
23
32
|
<Box elementKey="hero-content">
|
|
24
|
-
<Heading elementKey="title"
|
|
33
|
+
<Heading elementKey="title">{data.title}</Heading>
|
|
25
34
|
<Box elementKey="event-info">
|
|
26
35
|
<Box elementKey="start-date-wrapper">
|
|
27
36
|
<Icon elementKey="date-icon" />
|
|
28
|
-
<
|
|
29
|
-
<
|
|
30
|
-
|
|
37
|
+
<ClientOnly>
|
|
38
|
+
<Typography elementKey="starts_at">
|
|
39
|
+
{dayjs(data?.starts_at).format("MMM D, YYYY")}
|
|
40
|
+
</Typography>
|
|
41
|
+
</ClientOnly>
|
|
31
42
|
</Box>
|
|
32
43
|
<Box elementKey="end-date-wrapper">
|
|
33
44
|
<Icon elementKey="end-date-icon" />
|
|
34
|
-
<
|
|
35
|
-
<
|
|
36
|
-
|
|
45
|
+
<ClientOnly>
|
|
46
|
+
<Typography elementKey="ends_at">
|
|
47
|
+
{dayjs(data?.ends_at).format("MMM D, YYYY")}
|
|
48
|
+
</Typography>
|
|
49
|
+
</ClientOnly>
|
|
37
50
|
</Box>
|
|
38
51
|
<Box elementKey="time-wrapper">
|
|
39
52
|
<Icon elementKey="time-icon" />
|
|
40
|
-
<
|
|
41
|
-
<
|
|
42
|
-
{`${dayjs(
|
|
43
|
-
</
|
|
44
|
-
</
|
|
45
|
-
</Box>
|
|
46
|
-
<Box elementKey="kind-wrapper">
|
|
47
|
-
<Icon elementKey="kind-icon" />
|
|
48
|
-
<Typography elementKey="kind">{content?.kind?.replace(/_/g, " ")}</Typography>
|
|
49
|
-
</Box>
|
|
50
|
-
<Box elementKey="timing-wrapper">
|
|
51
|
-
<Icon elementKey="timing-icon" />
|
|
52
|
-
<Typography elementKey="timing">{content?.timing?.replace(/_/g, " ")}</Typography>
|
|
53
|
+
<ClientOnly>
|
|
54
|
+
<Typography elementKey="time-range">
|
|
55
|
+
{`${dayjs(data?.starts_at).format("hh:mm A")} - ${dayjs(data?.ends_at).format("hh:mm A")}`}
|
|
56
|
+
</Typography>
|
|
57
|
+
</ClientOnly>
|
|
53
58
|
</Box>
|
|
54
59
|
</Box>
|
|
55
60
|
</Box>
|
|
@@ -57,39 +62,29 @@ const EventDetails: React.FC<ILevoBlockBaseProps<IEventDetailsContent>> = ({ con
|
|
|
57
62
|
|
|
58
63
|
<Box elementKey="content-section">
|
|
59
64
|
<Box elementKey="main-content">
|
|
60
|
-
{
|
|
65
|
+
{data?.id ? (
|
|
61
66
|
<RegisterModal
|
|
62
|
-
eventID={
|
|
63
|
-
title={
|
|
64
|
-
external={
|
|
67
|
+
eventID={data?.id as string}
|
|
68
|
+
title={data?.title}
|
|
69
|
+
external={data?.external_ticketing}
|
|
65
70
|
/>
|
|
66
71
|
) : null}
|
|
67
|
-
<Typography elementKey="description"
|
|
72
|
+
<Typography elementKey="description">{data?.description}</Typography>
|
|
68
73
|
</Box>
|
|
69
74
|
|
|
70
|
-
<Box elementKey="contact-
|
|
71
|
-
<
|
|
72
|
-
|
|
73
|
-
<Box elementKey="
|
|
74
|
-
<
|
|
75
|
-
|
|
76
|
-
<Typography elementKey="name-value" />
|
|
77
|
-
</Box>
|
|
78
|
-
<Box elementKey="email-field">
|
|
79
|
-
<Typography elementKey="email-label" />
|
|
80
|
-
<Typography elementKey="email-value" />
|
|
81
|
-
</Box>
|
|
82
|
-
<Box elementKey="phone-field">
|
|
83
|
-
<Typography elementKey="phone-label" />
|
|
84
|
-
<Typography elementKey="phone-value" />
|
|
85
|
-
</Box>
|
|
75
|
+
<Box elementKey="contact-card">
|
|
76
|
+
<Heading elementKey="contact-title" />
|
|
77
|
+
<Box elementKey="contact-details">
|
|
78
|
+
<Box elementKey="email-field">
|
|
79
|
+
<Typography elementKey="email-label" />
|
|
80
|
+
<Typography elementKey="email-value">{data.contact_email}</Typography>
|
|
86
81
|
</Box>
|
|
87
82
|
</Box>
|
|
88
83
|
</Box>
|
|
89
84
|
</Box>
|
|
90
|
-
</
|
|
91
|
-
</
|
|
92
|
-
|
|
93
|
-
|
|
85
|
+
</Container>
|
|
86
|
+
</Section>
|
|
87
|
+
);
|
|
88
|
+
};
|
|
94
89
|
|
|
95
90
|
export default EventDetails;
|