-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
33 lines (26 loc) · 848 Bytes
/
Copy pathscript.js
File metadata and controls
33 lines (26 loc) · 848 Bytes
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
const container = document.getElementById("projects");
projects.forEach(project => {
const card = document.createElement("div");
card.className = "project";
card.innerHTML = `
<img src="${project.image}" alt="${project.title}">
<h2>${project.title}</h2>
<p>${project.description}</p>
<div class="tags">
${project.tags.map(tag => `<span class="tag">${tag}</span>`).join("")}
</div>
<div class="links">
${
project.github
? `<a href="${project.github}" target="_blank">GitHub</a>`
: ""
}
${
project.itch
? `<a href="${project.itch}" target="_blank">itch.io</a>`
: ""
}
</div>
`;
container.appendChild(card);
});