mirror of
https://github.com/michivonah/website-v3.git
synced 2025-12-22 21:36:28 +01:00
translations + removed unused tag + animations while project filtering + accessability
This commit is contained in:
parent
ba15e71c80
commit
384e92ba6a
6 changed files with 72 additions and 30 deletions
|
|
@ -117,11 +117,13 @@ document.querySelectorAll(".tag-checkbox").forEach(element => {
|
|||
});
|
||||
});
|
||||
|
||||
function showSelectedProjects(category, show = true){
|
||||
function showSelectedProjects(category, show = true, noProjectSelector = '.no-projects'){
|
||||
if(category){
|
||||
document.querySelectorAll(`.${category}`).forEach(project => {
|
||||
project.classList.toggle("hidden", !show);
|
||||
});
|
||||
// show message when no project is available
|
||||
document.querySelector(noProjectSelector).classList.toggle('hidden', document.querySelector('.project-card:not(.hidden)'));
|
||||
}
|
||||
else{
|
||||
console.error("func showSelectedProjects(): Missing category name.");
|
||||
|
|
@ -183,7 +185,6 @@ async function getProjectCard(data){
|
|||
container.classList.add(category);
|
||||
if(!isCategoryEnabled(category)) container.classList.add("hidden");
|
||||
//container.style.animation = "fade-up var(--baseDuration) linear";
|
||||
//container.style.backgroundImage = `url(${image})`;
|
||||
|
||||
const cardFirst = document.createElement("div");
|
||||
cardFirst.classList = "card-first";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue