", {
class: "posts-02__info",
text: item.info
});
const postItemImgBox = $("
", { class: "posts-02__img_box" });
const postItemImage = $("
![]()
", {
class: "posts-02__img",
src: item.image
});
postItemText.append(postItemTitle, postItemInfo);
postItemImgBox.append(postItemImage);
postItem.append(postItemText, postItemImgBox);
return postItem;
});
wrapperIdentifier.html(htmlGen);
}
// Set category filter
function setFilter(
thiis,
category,
block = 0,
container = null,
description = null
) {
const gotDataBlock = window["dataBlock" + block];
$(".filter").removeClass("active");
$(thiis).addClass("active");
const selected = gotDataBlock.filterButtons.filter((button) => {
return button.value === category;
})[0];
this.currentFilter = selected.value;
const projects = gotDataBlock.projects.filter((project) => {
return project.category.includes(category);
});
if (description !== null) {
$("." + description).text(gotDataBlock.categories[category]);
}
if (container === null) {
generateProjects(projects, $(".projects"));
} else {
const projectContainer = $("." + container);
generateProjects(
projects,
projectContainer,
true,
gotDataBlock.projectsTextColor,
gotDataBlock.projectsBackgroundColor,
gotDataBlock.projectsSponsoText,
gotDataBlock.badgeUrl
);
}
}
// Bubbel Navbar
function setBubbleFilter(
thiis,
category,
block = 0,
container = null,
cards = true
) {
const gotDataBlock = window["dataBlock" + block];
$(".bubbleNavItem").removeClass("active");
$(thiis).addClass("active");
const selected = gotDataBlock.filterButtons.filter((button) => {
return button.value === category;
})[0];
this.currentFilter = selected.value;
const projects = gotDataBlock.list.filter((project) => {
return project.category.includes(category);
});
if (cards) {
generateCards(projects, container);
} else {
generateLongs(projects, container);
}
}
// ================= BLOCK 23
function Block23(data) {
if (data.visible !== "oui") return;
// Create the outermost div with specified classes and attributes
var outerDiv = $("
", {
class:
"page-component__bg_image_box page-component__bg_image_box--dark-bg bg-accent-color page-component__bg_image_box--has-image",
id: "header-23-190821",
style: 'background-image: url("' + data.image + '")'
});
// Create the first inner div with class and opacity style
var overlayDiv = $("
", {
class: "page-component__bg_overlay_box",
style:
"opacity: unset;background-color: rgba(33, 39, 46, " +
data.imageOpacity +
");"
});
// Create the second inner div with z-index and padding styles
var wrapperDiv = $("
", {
class: "page-component__wrapper",
style: "z-index: 10;padding-top:40px;padding-bottom:70px;"
});
// Create the header element with specified classes
var header = $("