-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcards.js
More file actions
178 lines (166 loc) · 5.45 KB
/
cards.js
File metadata and controls
178 lines (166 loc) · 5.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
import React from "react"
import PropTypes from "prop-types"
const reactWorkshopImage =
"https://res.cloudinary.com/kingisaac95/image/upload/v1581518763/unstack_assets/reactjs-workshop.jpg"
const imagePlaceholder =
"https://res.cloudinary.com/kingisaac95/image/upload/v1581518763/unstack_assets/image-placeholder.png"
const twitterLogo =
"https://res.cloudinary.com/kingisaac95/image/upload/v1581518762/unstack_assets/twitter-logo.png"
const WorkshopCard = () => (
<section className="event-highlight md:absolute max-w-sm bg-white shadow-lg">
<figure>
<img
className="w-full animate-image"
src={reactWorkshopImage}
alt="react workshop"
/>
</figure>
<section className="px-6 py-4 animate-content">
<article>
<header>
<h2 className="text-xl mb-2">2-day ReactJS Workshop</h2>
</header>
<section className="text-base text-gray-700">
<p className="mb-2">Date: 20th - 21st March 2020</p>
<p className="mb-2">Time: 10:00am till 4:30pm (Each Day)</p>
<p className="">Venue: The Zone, Gbagada, Lagos, Nigeria.</p>
</section>
</article>
<section className="px-6 py-4 text-center">
<p className="inline-block bg-gray-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2">
#unstack
</p>
<p className="inline-block bg-gray-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2">
#react
</p>
</section>
<footer className="flex justify-center px-6 py-4">
<a
className="ep_embed_btn bg-blue-500 hover:bg-blue-700 focus:outline-none focus:shadow-outline text-white font-bold py-3 px-16 rounded-full"
href="https://eventprime.co/e/unstack-2day-reactjs-workshop"
data-wid="ep_widget_1229"
rel="noopener noreferrer"
target="_blank"
>
Save a seat
</a>
</footer>
</section>
</section>
)
const SpeakerCard = ({ name, work, title, twitterHandle, imageSrc }) => (
<section className="flex flex-col items-center max-w-sm bg-white mt-6 md:mr-6">
<figure className="md:h-56 md:w-56 h-40 w-40">
<img
className="md:h-56 md:w-56 h-40 w-40 rounded-full md:rounded-none h-40 w-40 mx-auto md:mx-0 md:mr-6"
src={imageSrc != null ? imageSrc : imagePlaceholder}
alt="speaker placeholder"
/>
</figure>
<article className="md:w-56 text-center md:text-left md:mt-0 mt-6 py-6">
<header>
<h2 className="text-lg">{name}</h2>
</header>
<p className="text-blue-700 text-sm">{work}</p>
<p className="text-gray-700 italic text-sm mt-2">{title}</p>
<section className="text-gray-600 text-sm inline-flex items-center mt-4">
<figure>
<img className="w-4 mx-auto" src={twitterLogo} alt="twitter logo" />
</figure>
<a
className="ml-2"
rel="noopener noreferrer"
target="_blank"
href={`https://twitter.com/${twitterHandle}`}
>
@{twitterHandle}
</a>
</section>
</article>
</section>
)
SpeakerCard.prototype = {
name: PropTypes.string,
work: PropTypes.string,
title: PropTypes.string,
twitterHandle: PropTypes.string,
imageSrc: PropTypes.string,
}
SpeakerCard.defaultProps = {
name: "",
work: "",
title: "",
twitterHandle: "",
imageSrc: "",
}
const OrganizerCard = ({ name, work, title, twitterHandle, imageSrc }) => (
<section className="relative max-w-sm shadow-lg hover:shadow-none bg-white mt-32 mr-2 rounded-md py-2 px-4">
<section className="absolute oranizer-image h-40 w-40 rounded-full bg-white">
<figure>
<img
className="h-40 w-40 rounded-full"
src={imageSrc != null ? imageSrc : imagePlaceholder}
alt={name}
/>
</figure>
</section>
<section className="px-5 py-4 w-56">
<article className="text-center mt-12">
<header>
<h2 className="text-lg">{name}</h2>
</header>
<p className="text-blue-700 text-sm">{work}</p>
<p className="text-gray-700 italic text-sm">{title}</p>
<section className="text-gray-600 text-sm inline-flex items-center mt-4">
<figure>
<img className="w-4 mx-auto" src={twitterLogo} alt="twitter logo" />
</figure>
<a
className="ml-2"
rel="noopener noreferrer"
target="_blank"
href={`https://twitter.com/${twitterHandle}`}
>
@{twitterHandle}
</a>
</section>
</article>
</section>
</section>
)
OrganizerCard.prototype = {
name: PropTypes.string,
work: PropTypes.string,
title: PropTypes.string,
twitterHandle: PropTypes.string,
imageSrc: PropTypes.string,
}
OrganizerCard.defaultProps = {
name: "",
work: "",
title: "",
twitterHandle: "",
imageSrc: "",
}
const SponsorCard = ({ name, imageSrc }) => (
<section className="flex items-center max-w-sm bg-white mt-5 mr-2 hover:shadow-lg">
<section className="px-5 py-4 w-32">
<figure title={name}>
<img
className="w-full h-auto w-32 animate-image"
src={imageSrc || imagePlaceholder}
alt={name}
/>
</figure>
</section>
</section>
)
SponsorCard.prototype = {
name: PropTypes.string,
imageSrc: PropTypes.string,
}
SponsorCard.defaultProps = {
name: "",
imageSrc: "",
}
export { WorkshopCard, SpeakerCard, OrganizerCard, SponsorCard }