-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathcard.html
More file actions
233 lines (229 loc) · 8.73 KB
/
card.html
File metadata and controls
233 lines (229 loc) · 8.73 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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Card component - Example page</title>
<!-- CSS only -->
<link
rel="stylesheet"
href="../../unity-bootstrap-theme/dist/unity-bootstrap-theme2.css"
/>
<!-- Load FontAwesome -->
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css"
integrity="sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbuBusANI9QpRohGBreCFkKxLhei6S9CQXFEbbKuqLg0DA=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<script
src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/js/v4-shims.min.js"
integrity="sha512-1ND726aZWs77iIUxmOoCUGluOmCT9apImcOVOcDCOSVAUxk3ZSJcuGsHoJ+i4wIOhXieZZx6rY9s6i5xEy1RPg=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
></script>
<!-- *************************************************************** -->
<!-- Load React. -->
<script
src="https://unpkg.com/react@18.3.1/umd/react.development.js"
crossorigin
></script>
<script
src="https://unpkg.com/react-dom@18.3.1/umd/react-dom.development.js"
crossorigin
></script>
<!-- *************************************************************** -->
<!-- include bundled scripts from packages -->
<script src="../dist/unityReactCore.umd.js"></script>
</head>
<body>
<div class="container">
<div class="d-flex justify-content-center border p-4">
<!-- Provide target elements -->
<div id="default-card"></div>
<div id="ranking-card"></div>
<div id="icon-card"></div>
<div id="degree-card"></div>
<div id="event-card"></div>
<div id="story-card"></div>
<div id="horizontal-card"></div>
<div id="asu-news-card"></div>
<div id="clickable-card"></div>
</div>
</div>
<script>
// Setup and initialize cards options.
unityReactCore.initCard({
targetSelector: "#default-card",
props: {
type: "default",
horizontal: false,
image: "https://picsum.photos/300/200",
imageAltText: "An example image",
title: "Default title",
body: "Body copy goes here. Limit to 5 lines max. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua eiusmod tempo.",
buttons: [
{
color: "maroon",
size: "default",
label: "CTA button",
},
{
color: "gold",
size: "small",
label: "CTA button",
},
{
color: "dark",
size: "small",
label: "Link button",
href: "/",
target: "_blank",
},
],
tags: [
{ color: "gray", label: "tag1", href: "/#example-link" },
{ color: "gray", label: "tag2", href: "/#example-link" },
{ color: "gray", label: "tag3", href: "/#example-link" },
],
},
});
unityReactCore.initRankingCard({
targetSelector: "#ranking-card",
props: {
imageSize: 'small',
image: "https://picsum.photos/300/200",
imageAlt: "An example image",
heading: "Ranking card title",
body: "Body copy goes here. Limit to 5 lines max. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua eiusmod tempo.",
readMoreLink: '#readmore',
citation: "My happy citation.",
},
});
unityReactCore.initCard({
targetSelector: "#icon-card",
props: {
type: "default",
horizontal: false,
title: "Default title",
body: "Body copy goes here. Limit to 5 lines max. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua eiusmod tempo.",
buttons: [
{
color: "maroon",
size: "default",
label: "Button text",
},
],
icon: ["fas", "newspaper"],
},
});
unityReactCore.initCard({
targetSelector: "#degree-card",
props: {
type: "degree",
horizontal: false,
image: "https://picsum.photos/300/200",
imageAltText: "An example image",
title: "Default title",
body: "Body copy goes here. Limit to 5 lines max. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua eiusmod tempo.",
},
});
unityReactCore.initCard({
targetSelector: "#event-card",
props: {
type: "event",
horizontal: false,
image: "https://picsum.photos/300/200",
imageAltText: "An example image",
title: "Event title",
body: "Body copy goes here. Limit to 5 lines max. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua eiusmod tempo.",
eventFormat: "stack",
eventTime: "Wed, November 21st, 2021<br />11:30 a.m - 12:30 p.m.",
eventLocation: "Downtown Phoenix campus",
buttons: [
{
color: "maroon",
size: "default",
label: "CTA button",
},
],
},
});
unityReactCore.initCard({
targetSelector: "#story-card",
props: {
type: "story",
horizontal: false,
image: "https://picsum.photos/300/200",
imageAltText: "An example image",
title: "Story title",
body: "Body copy goes here. Limit to 5 lines max. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua eiusmod tempo.",
buttons: [
{
color: "maroon",
size: "default",
label: "CTA button",
},
],
linkLabel: "Default link",
linkUrl: "http://google.com",
tags: [
{ color: "gray", label: "tag1", href: "/#example-link" },
{ color: "gray", label: "tag2", href: "/#example-link" },
{ color: "gray", label: "tag3", href: "/#example-link" },
],
},
});
unityReactCore.initCard({
targetSelector: "#clickable-card",
props: {
type: "story",
horizontal: false,
image: "https://picsum.photos/300/200",
imageAltText: "An example image",
title: "Story title",
body: "Body copy goes here. Limit to 5 lines max. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua eiusmod tempo.",
tags: [
{ color: "gray", label: "tag1", href: "/#example-link" },
{ color: "gray", label: "tag2", href: "/#example-link" },
{ color: "gray", label: "tag3", href: "/#example-link" },
],
},
});
unityReactCore.initCard({
targetSelector: "#horizontal-card",
props: {
type: "story",
horizontal: true,
image: "https://picsum.photos/300/200",
imageAltText: "An example image",
title: "Horizontal story",
body: "Body copy goes here. Limit to 5 lines max. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua eiusmod tempo.",
tags: [
{ color: "gray", label: "tag1", href: "/#example-link" },
{ color: "gray", label: "tag2", href: "/#example-link" },
{ color: "gray", label: "tag3", href: "/#example-link" },
],
},
});
unityReactCore.initCard({
targetSelector: "#asu-news-card",
props: {
type: "story",
horizontal: false,
image: "https://picsum.photos/300/200",
imageAltText: "An example image",
title: "ASU News Story title",
body: "Body copy goes here. Limit to 5 lines max. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua eiusmod tempo.",
buttons: [
{
color: "maroon",
size: "default",
label: "Read at ASU News",
},
],
},
});
</script>
<script src="./js/example-helper.js"></script>
</body>
</html>