Skip to content

Commit

Permalink
feat: ticks for selected skills
Browse files Browse the repository at this point in the history
  • Loading branch information
mjaquiery committed Apr 16, 2024
1 parent b737030 commit ec4a9cd
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@
border: 1px solid violet;
box-shadow: violet 0px 0px 5px;
}
.highlight::before {
content: "✓ ";
}
span.wanted {
background-color: white;
}
Expand Down Expand Up @@ -106,9 +109,9 @@
color: white;
}
a.highlight,
span.highlight,
span.highlightwanted {
background-color: blueviolet;
span.highlight {
border: 1px solid #5d465d;
box-shadow: #5d465d 0px 0px 5px;
}
}
</style>
Expand Down Expand Up @@ -204,10 +207,10 @@ <h1>Skillboard</h1>

const skillHTML = () => {
const html = allSkills
.map(
(s) =>
`<li><a id="${s}" class="skill" onClick="skillOnClick('${s}')">${s}</a></li>`
)
.map((s) => {
const highlight = selectedSkills.has(s) ? "highlight" : "";
return `<li><a id="${s}" class="skill ${highlight}" onClick="skillOnClick('${s}')">${s}</a></li>`;
})
.join("\n");
return `<ul>${html}</ul>`;
};
Expand Down

0 comments on commit ec4a9cd

Please sign in to comment.