-
Notifications
You must be signed in to change notification settings - Fork 148
/
Copy pathscript.js
126 lines (120 loc) · 2.56 KB
/
script.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
"use strict";
const projects = [
{
name: "01-Community-Card",
tags: ["HTML", "CSS"],
},
{
name: "02-qr-code-component",
tags: ["HTML","CSS", "JavaScript"],
},
{
name: "03-social-proof",
tags: ["HTML", "CSS"],
},
{
name: "04-nft-project",
tags: ["HTML", "CSS"],
},
{
name: "05-intractive-rating",
tags: ["HTML", "CSS", "JavaScript"],
},
{
name: "06-product-preview",
tags: ["HTML", "CSS"],
},
{
name: "07-fylo-two-column-layout",
tags: ["HTML", "CSS"],
},
{
name: "08-profile-card",
tags: ["HTML", "CSS"],
},
{
name: "09-clipboard-landing-page",
tags: ["HTML", "CSS"],
},
{
name: "10-three-column-card",
tags: ["HTML", "CSS"],
},
{
name: "11-Order-summery-component",
tags: ["HTML", "CSS"],
},
{
name: "12-Huddle-comm-page",
tags: ["HTML", "CSS"],
},
{
name: "13-stat-preview-card",
tags: ["HTML", "CSS"],
},
{
name: "14-Huddle-landing-page",
tags: ["HTML", "CSS"],
},
{
name: "15-Article-Preview",
tags: ["HTML", "CSS", "JavaScript"],
},
{
name: "16-base-apparel-coming-soon",
tags: ["HTML", "CSS", "JavaScript"],
},
{
name: "17-advice-generator-app",
tags: ["HTML", "CSS", "JavaScript"],
},
{
name: "18-chat-app-css-illustration",
tags: ["HTML", "CSS"],
},
{
name: "19-news-homepage",
tags: ["HTML", "CSS"],
},
{
name: "20-testimonials-grid-section",
tags: ["HTML", "CSS"],
},
{
name: "21-ecommerce-product-page",
tags: ["HTML", "CSS", "JavaScript"],
},
{
name: "23-Weather-App",
tags: ["HTML", "CSS", "JavaScript", "API",],
},
{
name: "24-joke-generator",
tags: ["HTML", "CSS", "JavaScript", "API"],
},
];
const list = document.getElementById("list");
projects.forEach(({ name }, i) => {
const listItem = document.createElement("li");
const tags = projects[i].tags.map(tag => `<span class="tag">${tag}</span>`).join(" ");
listItem.innerHTML = `
<a href="./${name}/index.html" target="_blank">
<img src="./${name}/design/desktop-design.jpg" alt="${name}" />
<p>${i + 1}. ${formatProjectName(name)}</p>
<div class="tags">Technologies: ${tags}</div>
</a>
<div class="links-container" target="_blank">
<a href="./${name}/index.html" class="blue">
<i class="fas fa-eye"></i>
</a>
</div>
`;
list.appendChild(listItem);
});
function formatProjectName(name) {
return name
.split("-")
.splice(1)
.map((word) => word[0].toUpperCase() + word.slice(1))
.join(" ");
}