forked from eKeiran/CSS-Inventory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
43 lines (38 loc) · 1.5 KB
/
index.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
let contents = [];
let cards = [
// Add your card in this section
{
artName: "Hack-o-ween",
pageLink: "./Cards/Keera/my_animation.html",
imageLink: "./Cards/Keera/keera.gif",
author: "Harkeerat",
githubLink: 'https://github.com/ekeiran'
},
{
artName: "Sakura Magic",
pageLink: "./Cards/Atharv/my_animation.html",
imageLink: "./Cards/Atharv/atharv.gif",
author: "Atharv",
githubLink: 'https://github.com/vyasylum'
}
];
// +--------------------------------------------------------------------------------+
// + +
// + DO NOT NEED TO CHANGE ANYTHING BELOW THIS +
// + +
// +--------------------------------------------------------------------------------+
// Creates cards from the array above
cards.forEach((c) => {
contents.push([
<li class="card"> +
<a href='${c.pageLink}'> +
<img class="art-image" src='${c.imageLink}' alt='${c.artName}' /> +
</a> +
<div class="flex-content"> +
<a href='${c.pageLink}'><h3 class="art-title">${c.artName}</h3></a> +
<p class='author'><a href="${c.githubLink}" target="_blank"><i class="fab fa-github"></i> ${c.author}</a> </p> +
</div> +
</li>
]);
});
document.getElementById('cards').innerHTML = contents;