-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathlisting-page.html
212 lines (205 loc) · 8.77 KB
/
listing-page.html
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
<!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>Listing Page- Example page</title>
<!-- CSS only -->
<!-- FONTAWESOME loaded from CDN 'kit' URL -->
<script
src="https://kit.fontawesome.com/35fb12a3a9.js"
crossorigin="anonymous"
></script>
<link
rel="stylesheet"
href="https://asu.github.io/asu-unity-stack/@asu/unity-bootstrap-theme/css/unity-bootstrap-theme.bundle.css"
/>
<!-- *************************************************************** -->
<!-- Load React. -->
<script
src="https://unpkg.com/[email protected]/umd/react.development.js"
crossorigin
></script>
<script crossorigin src="https://unpkg.com/[email protected]/umd/react-dom.development.js"></script>
<!-- *************************************************************** -->
<!-- include bundled scripts from packages -->
<script src="../dist/degreePages.umd.js"></script>
</head>
<body>
<!-- Provide target divs for the component. Must have unique ids or class name. -->
<div id="degreePageContainer"></div>
<script>
/**
* This exmaple show how to use a degree page component
* from a static HTML page with plain vanilla JS
*/
// Setup and initialize component.
const dataSource = {
endpoint: "https://degrees.apps.asu.edu/t5/service",
method: "findAllDegrees",
init: "false", // "true" | "false"Î
program: "undergrad", // graduate | undergrad
cert: "false", // "true" | "false"
// collegeAcadOrg: "CGF", // OPTIONAL example values: CLW, CTB, CTE
// departmentCode: "CSFIS", // OPTIONAL example values: CMANAGE, CHUMARTCLT, CHL
// blacklistAcadPlans: ["BAACCBS", "LAACTBS"], // OPTIONAL example filters out Accountancy and Actuarial Science
};
// those links are just examples
const actionUrls = {
// applyNowUrl: "https://admission.asu.edu/apply", // OPTIONAL
majorInfoUrl: `/examples/detail-page.html?acadPlan={ACAD_PLAN_CODE}`,
// majorInfoUrl:
// `programs/College/{ACAD_PLAN_CODE}/undergrad/false`
// more example here: https://asudev.jira.com/browse/WS2-691?focusedCommentId=1302038
};
// =======================================================================
// Optional introContent configuration which type is "text-photo-grid"
// =======================================================================
const introContentTextPhotoGrid = {
type: "text-photo-grid",
title: {
text:
"This is introductory marketing copy. Lorem ipsum dolor sit amet",
// component: "h2", default h2
},
contents: [
{
text: `Lorem, ipsum dolor sit amet consectetur adipisicing elit. Molestias aut, repellat ipsum facere voluptate dicta obcaecati deserunt nobis suscipit eaque?
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Molestias aut, repellat ipsum facere voluptate dicta obcaecati deserunt nobis suscipit eaque?
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Molestias aut, repellat ipsum facere voluptate dicta obcaecati deserunt nobis suscipit eaque?`,
},
],
photoGrid: {
images: [
{
url: "./assets/img/demo-phot-1.jpeg",
},
{
url: "./assets/img/demo-phot-2.jpeg",
},
{
url: "./assets/img/demo-phot-3.jpeg",
},
],
},
};
// =======================================================================
// Optional introContent configuration which type is "text-media"
// =======================================================================
const introContentTextMedia = {
type: "text-media",
title: {
text:
"This is introductory marketing copy. Lorem ipsum dolor sit amet",
// component: "h2", default h2
},
contents: [
{
text: `Lorem, ipsum dolor sit amet consectetur adipisicing elit. Molestias aut, repellat ipsum facere voluptate dicta obcaecati deserunt nobis suscipit eaque?
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Molestias aut, repellat ipsum facere voluptate dicta obcaecati deserunt nobis suscipit eaque?
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Molestias aut, repellat ipsum facere voluptate dicta obcaecati deserunt nobis suscipit eaque?`,
},
],
image: {
url: "https://source.unsplash.com/random/800x400?a=1",
},
// video: {
// url: "./assets/video/stock-video-person-drawing.mp4",
// title: "",
// vttUrl: "",
// },
};
// =======================================================================
// Optional introContent configuration which type is "text-image-overlay"
// =======================================================================
const introContentTextImageOverlay = {
type: "text-image-overlay",
header: {
text: "Intro Content Image Overlay",
// component: "h2", default h2
},
title: {
text: "This is the contents that goes in the box",
// component: "h2", default h2
},
contents: [
{
text: `Instagram tour operator travel sailing flying package.
Territory New York City group discount active lifestyle creditcard
insurance wellness kayak guide overnight rural lonely planet.`,
},
{
text: `Train luxury Paris recommendations nature France sight seeing.
Flexibility Amsterdam maps.
Pacific lonely planet private jet national insurance taxi tourist attractions.
Budget Pacific guide caravan Barcelona place to stay maps gateway diary tour operator money`,
},
],
image: {
url: "https://source.unsplash.com/random/800x600?a=1",
},
};
// =======================================================================
// Optional introContent configuration which type is "text"
// =======================================================================
const introContentText = {
type: "text",
title: {
text:
"This is introductory marketing copy. Lorem ipsum dolor sit amet",
// component: "h2", default h2
},
contents: [
{
text: `<strong>Lorem, ipsum dolor</strong> sit amet consectetur adipisicing elit. Molestias aut, repellat ipsum facere voluptate dicta obcaecati deserunt nobis suscipit eaque?
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Molestias aut, repellat ipsum facere voluptate dicta obcaecati deserunt nobis suscipit eaque?
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Molestias aut, repellat ipsum facere voluptate dicta obcaecati deserunt nobis suscipit eaque?`,
},
],
};
// =======================================================================
// Different introContent configuration can be tested here below:
// =======================================================================
// const introContent = introContentTextPhotoGrid;
// const introContent = introContentTextMedia
// const introContent = introContentTextImageOverlay
const introContent = introContentText;
AsuDegreePages.initListingPage({
targetSelector: "#degreePageContainer",
props: {
appPathFolder: "http://localhost:3000/dist",
actionUrls,
// OPTIONAL
// hero: {
// image: {
// url: DOMAIN_URL + "/programs/resources/images/ds_header_undergrad.jpg",
// altText: "Undergraduate Degrees",
// size: "medium",
// },
// title: {
// text: "Undergraduate Degrees",
// highlightColor: "gold",
// },
// },
introContent,
// hasFilters: false, // OPTIONAL
// hasSearchBar: false, // OPTIONAL
programList: {
dataSource,
// OPTIONAL
settings: {
hideCollegeSchool: true,
defaultView: "list-view", // "grid-view""grid-view" or "list-view"
cardDefaultImage: {
url: `examples/assets/img/ds_header_undergrad.jpg`,
},
},
},
// degreesPerPage: 5, // OPTIONAL
},
});
</script>
<script src="./js/example-helper.js"></script>
</body>
</html>