-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
101 lines (97 loc) · 2.06 KB
/
app.js
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
//TODO: add a new data on the top
const landingPageData = [
{
title: "Planet",
publish: "June 6, 2022",
src: "./planet/",
},
{
title: "innovated",
publish: "June 3, 2022",
src: "./innovated/",
},
{
title: "Creative Learner",
publish: "June 1, 2022",
src: "./creative-learner/",
},
{
title: "Creative Branding",
publish: "May 31, 2022",
src: "./creative-branding/",
},
{
title: "E-commerce Brand",
publish: "May 31, 2022",
src: "./e-commerce-brand/",
},
{
title: "E-commerce",
publish: "May 28, 2022",
src: "./e-commerce/",
},
{
title: "Cleaning Service",
publish: "March 15, 2022",
src: "./cleaning-service/",
},
{
title: "Everyday",
publish: "March 10, 2022",
src: "./everyday-dzo/",
},
{
title: "Elegance",
publish: "March 8, 2022",
src: "./elegance-dzo/",
},
{
title: "Nature Beauty",
publish: "March 6, 2022",
src: "./nature-beauty-dzo/",
},
{
title: "Pottery Studio",
publish: "March 5, 2022",
src: "./pottery-studio-dzo/",
},
{
title: "Fast Food",
publish: "March 4, 2022",
src: "./fast-food-dzo/",
},
{
title: "Travel Hunter",
publish: "March 3, 2022",
src: "./travel-hunter-dzo/",
},
{
title: "Digital Agency",
publish: "Feb 12, 2022",
src: "./degital-agency/",
},
{
title: "Corporate Landing",
publish: "Jun 15, 2021",
src: "./corporate_landing/",
},
{
title: "Planet",
publish: "Jun 1, 2021",
src: "./utopic-flowers/",
},
];
window.onload = function () {
const landingPages = document.getElementById("landingPages");
for (const landingPage of landingPageData) {
landingPages.appendChild(card(landingPage));
}
};
function card({title, publish, src}) {
const div = document.createElement("div");
div.className = "my-5 py-4 shadow border px-2";
div.innerHTML = `<div class="bg-secondary-subtle px-5 py-2"> <h2>${title}</h2>
<p>Created on ${publish}</p></div>
<iframe class="w-100" src="${src}"></iframe>`;
return div;
}