-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
Toon alle onderwerpen
diff --git a/js/app.js b/js/app.js
index 634c3b7..b228149 100644
--- a/js/app.js
+++ b/js/app.js
@@ -15,6 +15,8 @@ import "./components/push-box.js";
import "./components/arrow-button.js";
import "./components/section-title.js";
import "./components/add-to-cart-button.js";
+import "./components/cta-button.js";
+import "./components/category-card.js";
// App initialization (if needed)
document.addEventListener("DOMContentLoaded", () => {
diff --git a/js/components/category-card.js b/js/components/category-card.js
new file mode 100644
index 0000000..22655a7
--- /dev/null
+++ b/js/components/category-card.js
@@ -0,0 +1,112 @@
+/**
+ * Category Card Component
+ * Displays a category with an icon and title
+ * Icon is centered above the category text
+ */
+class CategoryCard extends HTMLElement {
+ static get observedAttributes() {
+ return ["title", "href", "icon"];
+ }
+
+ constructor() {
+ super();
+ this.attachShadow({ mode: "open" });
+ }
+
+ connectedCallback() {
+ this.render();
+ }
+
+ attributeChangedCallback() {
+ if (this.shadowRoot) {
+ this.render();
+ }
+ }
+
+ get title() {
+ return this.getAttribute("title") || "Category";
+ }
+
+ get href() {
+ return this.getAttribute("href") || "#";
+ }
+
+ get icon() {
+ return this.getAttribute("icon") || "";
+ }
+
+ render() {
+ const iconHtml = this.icon
+ ? `

`
+ : `
`;
+
+ this.shadowRoot.innerHTML = `
+
+
+ ${iconHtml}
+ ${this.title}
+
+ `;
+ }
+}
+
+customElements.define("category-card", CategoryCard);
diff --git a/js/components/cta-button.js b/js/components/cta-button.js
new file mode 100644
index 0000000..d143635
--- /dev/null
+++ b/js/components/cta-button.js
@@ -0,0 +1,85 @@
+/**
+ * CTA Button Component
+ * Full-width purple button with white underlined text
+ */
+class CtaButton extends HTMLElement {
+ static get observedAttributes() {
+ return ["href"];
+ }
+
+ constructor() {
+ super();
+ this.attachShadow({ mode: "open" });
+ }
+
+ connectedCallback() {
+ this.render();
+ }
+
+ attributeChangedCallback() {
+ this.render();
+ }
+
+ get href() {
+ return this.getAttribute("href") || "#";
+ }
+
+ render() {
+ const isLink = this.hasAttribute("href");
+ const tag = isLink ? "a" : "button";
+ const hrefAttr = isLink ? `href="${this.href}"` : "";
+
+ this.shadowRoot.innerHTML = `
+
+ <${tag} class="cta-button" ${hrefAttr} type="${isLink ? "" : "button"}">
+
+
+
+ ${tag}>
+ `;
+ }
+}
+
+customElements.define("cta-button", CtaButton);