fix: add footer
This commit is contained in:
@@ -725,3 +725,41 @@ site-content {
|
|||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
line-height: var(--line-height-normal);
|
line-height: var(--line-height-normal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Footer Styles (Light DOM content for slotted elements)
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
.accordion-links {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--spacing-sm, 0.5rem);
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-links a {
|
||||||
|
color: var(--color-text-inverse, #ffffff);
|
||||||
|
text-decoration: none;
|
||||||
|
font-size: var(--font-size-sm, 0.875rem);
|
||||||
|
transition: opacity var(--transition-fast, 150ms ease);
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-links a:hover {
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer-bottom-links {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--spacing-md, 1rem);
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer-bottom-links a {
|
||||||
|
color: var(--color-text-inverse, #ffffff);
|
||||||
|
text-decoration: underline;
|
||||||
|
font-size: var(--font-size-sm, 0.875rem);
|
||||||
|
transition: opacity var(--transition-fast, 150ms ease);
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer-bottom-links a:hover {
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
|||||||
49
index.html
49
index.html
@@ -256,7 +256,54 @@
|
|||||||
</div>
|
</div>
|
||||||
</site-content>
|
</site-content>
|
||||||
|
|
||||||
<site-footer></site-footer>
|
<site-footer>
|
||||||
|
<span slot="logo">MILINDA uitgevers</span>
|
||||||
|
|
||||||
|
<footer-accordion-item slot="accordion" title="Service & bestellen">
|
||||||
|
<div class="accordion-links">
|
||||||
|
<a href="#">Bestellen</a>
|
||||||
|
<a href="#">Verzending</a>
|
||||||
|
<a href="#">Retourneren</a>
|
||||||
|
<a href="#">Betaalmethoden</a>
|
||||||
|
</div>
|
||||||
|
</footer-accordion-item>
|
||||||
|
|
||||||
|
<footer-accordion-item slot="accordion" title="Over MILINDA uitgevers">
|
||||||
|
<div class="accordion-links">
|
||||||
|
<a href="#">Onze geschiedenis</a>
|
||||||
|
<a href="#">Ons team</a>
|
||||||
|
<a href="#">Vacatures</a>
|
||||||
|
</div>
|
||||||
|
</footer-accordion-item>
|
||||||
|
|
||||||
|
<footer-accordion-item slot="accordion" title="Populaire categorieën">
|
||||||
|
<div class="accordion-links">
|
||||||
|
<a href="#">Boeddhisme</a>
|
||||||
|
<a href="#">Meditatie</a>
|
||||||
|
<a href="#">Mindfulness</a>
|
||||||
|
<a href="#">Filosofie</a>
|
||||||
|
</div>
|
||||||
|
</footer-accordion-item>
|
||||||
|
|
||||||
|
<footer-accordion-item slot="accordion" title="Accessibility">
|
||||||
|
<div class="accordion-links">
|
||||||
|
<a href="#">Toegankelijkheidsverklaring</a>
|
||||||
|
<a href="#">Hulpmiddelen</a>
|
||||||
|
</div>
|
||||||
|
</footer-accordion-item>
|
||||||
|
|
||||||
|
<div slot="links-left" class="footer-bottom-links">
|
||||||
|
<a href="#">Klantenservice</a>
|
||||||
|
<a href="#">Uitgeverij</a>
|
||||||
|
<a href="#">Neem contact op</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div slot="links-right" class="footer-bottom-links">
|
||||||
|
<a href="#">Privacyverklaring</a>
|
||||||
|
<a href="#">Algemene voorwaarden</a>
|
||||||
|
<a href="#">Toegankelijkheidsverklaring</a>
|
||||||
|
</div>
|
||||||
|
</site-footer>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="module" src="js/app.js"></script>
|
<script type="module" src="js/app.js"></script>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import "./components/horizontal-scroll-nav.js";
|
|||||||
import "./components/search-bar.js";
|
import "./components/search-bar.js";
|
||||||
import "./components/site-content.js";
|
import "./components/site-content.js";
|
||||||
import "./components/site-footer.js";
|
import "./components/site-footer.js";
|
||||||
|
import "./components/footer-accordion-item.js";
|
||||||
import "./components/book-card.js";
|
import "./components/book-card.js";
|
||||||
import "./components/push-box.js";
|
import "./components/push-box.js";
|
||||||
import "./components/arrow-button.js";
|
import "./components/arrow-button.js";
|
||||||
|
|||||||
115
js/components/footer-accordion-item.js
Normal file
115
js/components/footer-accordion-item.js
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
/**
|
||||||
|
* Footer Accordion Item Component
|
||||||
|
* Expandable accordion item for footer navigation
|
||||||
|
*/
|
||||||
|
class FooterAccordionItem extends HTMLElement {
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
this.attachShadow({ mode: "open" });
|
||||||
|
this._expanded = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
static get observedAttributes() {
|
||||||
|
return ["title"];
|
||||||
|
}
|
||||||
|
|
||||||
|
connectedCallback() {
|
||||||
|
this.render();
|
||||||
|
this.setupEventListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
attributeChangedCallback() {
|
||||||
|
this.render();
|
||||||
|
this.setupEventListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
setupEventListeners() {
|
||||||
|
const header = this.shadowRoot.querySelector(".accordion-header");
|
||||||
|
if (header) {
|
||||||
|
header.addEventListener("click", () => this.toggle());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
toggle() {
|
||||||
|
this._expanded = !this._expanded;
|
||||||
|
const content = this.shadowRoot.querySelector(".accordion-content");
|
||||||
|
const icon = this.shadowRoot.querySelector(".accordion-icon");
|
||||||
|
|
||||||
|
if (content) {
|
||||||
|
content.classList.toggle("expanded", this._expanded);
|
||||||
|
}
|
||||||
|
if (icon) {
|
||||||
|
icon.classList.toggle("rotated", this._expanded);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const title = this.getAttribute("title") || "";
|
||||||
|
|
||||||
|
this.shadowRoot.innerHTML = `
|
||||||
|
<style>
|
||||||
|
:host {
|
||||||
|
display: block;
|
||||||
|
border-bottom: 1px solid rgba(255, 255, 255, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: var(--spacing-lg, 1.5rem) 0;
|
||||||
|
cursor: pointer;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-header:hover {
|
||||||
|
opacity: 0.9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-title {
|
||||||
|
font-size: var(--font-size-base, 1rem);
|
||||||
|
font-weight: 400;
|
||||||
|
color: var(--color-text-inverse, #ffffff);
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-icon {
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
color: var(--color-text-inverse, #ffffff);
|
||||||
|
transition: transform var(--transition-fast, 150ms ease);
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-icon.rotated {
|
||||||
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-content {
|
||||||
|
max-height: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: max-height var(--transition-normal, 300ms ease), padding var(--transition-normal, 300ms ease);
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-content.expanded {
|
||||||
|
max-height: 500px;
|
||||||
|
padding-bottom: var(--spacing-lg, 1.5rem);
|
||||||
|
}
|
||||||
|
|
||||||
|
::slotted(*) {
|
||||||
|
color: var(--color-text-inverse, #ffffff);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div class="accordion-header">
|
||||||
|
<h3 class="accordion-title">${title}</h3>
|
||||||
|
<svg class="accordion-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<polyline points="6 9 12 15 18 9"></polyline>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<div class="accordion-content">
|
||||||
|
<slot></slot>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
customElements.define("footer-accordion-item", FooterAccordionItem);
|
||||||
@@ -180,7 +180,9 @@ class NewsletterSignup extends HTMLElement {
|
|||||||
required
|
required
|
||||||
aria-label="E-mailadres"
|
aria-label="E-mailadres"
|
||||||
/>
|
/>
|
||||||
<button type="submit" class="newsletter-button" aria-label="${this.buttonText || 'Inschrijven'}">
|
<button type="submit" class="newsletter-button" aria-label="${
|
||||||
|
this.buttonText || "Inschrijven"
|
||||||
|
}">
|
||||||
${sendIcon({ size: 24, color: "#ffffff" })}
|
${sendIcon({ size: 24, color: "#ffffff" })}
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* Site Footer Component
|
* Site Footer Component
|
||||||
* Footer with navigation links, social icons, and copyright
|
* Footer with configurable accordion sections and link columns
|
||||||
*/
|
*/
|
||||||
class SiteFooter extends HTMLElement {
|
class SiteFooter extends HTMLElement {
|
||||||
constructor() {
|
constructor() {
|
||||||
@@ -18,91 +18,79 @@ class SiteFooter extends HTMLElement {
|
|||||||
:host {
|
:host {
|
||||||
display: block;
|
display: block;
|
||||||
background-color: var(--color-button-primary, #951D51);
|
background-color: var(--color-button-primary, #951D51);
|
||||||
border-top: 1px solid var(--color-border, #e2e8f0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
padding: var(--spacing-lg, 1.5rem) var(--spacing-md, 1rem);
|
padding: var(--spacing-xl, 2rem) var(--spacing-md, 1rem);
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer-nav {
|
.footer-logo {
|
||||||
display: flex;
|
font-size: var(--font-size-2xl, 1.5rem);
|
||||||
flex-wrap: wrap;
|
font-weight: 400;
|
||||||
gap: var(--spacing-md, 1rem);
|
|
||||||
margin-bottom: var(--spacing-lg, 1.5rem);
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-link {
|
|
||||||
font-size: var(--font-size-sm, 0.875rem);
|
|
||||||
color: var(--color-text-inverse, #ffffff);
|
color: var(--color-text-inverse, #ffffff);
|
||||||
|
margin: 0;
|
||||||
|
padding-bottom: var(--spacing-lg, 1.5rem);
|
||||||
|
border-bottom: 1px solid rgba(255, 255, 255, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-section {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer-links {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
gap: var(--spacing-md, 1rem) var(--spacing-xl, 2rem);
|
||||||
|
padding-top: var(--spacing-xl, 2rem);
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer-link-column {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--spacing-md, 1rem);
|
||||||
|
}
|
||||||
|
|
||||||
|
::slotted([slot="logo"]) {
|
||||||
|
font-size: var(--font-size-2xl, 1.5rem);
|
||||||
|
font-weight: 400;
|
||||||
|
color: var(--color-text-inverse, #ffffff) !important;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
transition: color var(--transition-fast, 150ms ease);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer-link:hover {
|
::slotted(footer-accordion-item) {
|
||||||
color: rgba(255, 255, 255, 0.8);
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.social-icons {
|
::slotted([slot="links-left"]),
|
||||||
|
::slotted([slot="links-right"]) {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
gap: var(--spacing-md, 1rem);
|
gap: var(--spacing-md, 1rem);
|
||||||
margin-bottom: var(--spacing-lg, 1.5rem);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.social-icon {
|
/* Style for links inside the footer */
|
||||||
display: flex;
|
.links-wrapper ::slotted(a) {
|
||||||
align-items: center;
|
color: var(--color-text-inverse, #ffffff) !important;
|
||||||
justify-content: center;
|
text-decoration: underline;
|
||||||
width: 40px;
|
font-size: var(--font-size-base, 1rem);
|
||||||
height: 40px;
|
|
||||||
color: var(--color-text-inverse, #ffffff);
|
|
||||||
background-color: rgba(255, 255, 255, 0.2);
|
|
||||||
border-radius: var(--radius-full, 9999px);
|
|
||||||
transition: all var(--transition-fast, 150ms ease);
|
|
||||||
}
|
|
||||||
|
|
||||||
.social-icon:hover {
|
|
||||||
color: var(--color-text-inverse, #ffffff);
|
|
||||||
background-color: rgba(255, 255, 255, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.social-icon svg {
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.copyright {
|
|
||||||
font-size: var(--font-size-xs, 0.75rem);
|
|
||||||
color: var(--color-text-inverse, #ffffff);
|
|
||||||
text-align: center;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<footer class="footer">
|
<footer class="footer">
|
||||||
<nav class="footer-nav">
|
<h2 class="footer-logo">
|
||||||
<a href="#" class="footer-link">About Us</a>
|
<slot name="logo">MILINDA uitgevers</slot>
|
||||||
<a href="#" class="footer-link">Contact</a>
|
</h2>
|
||||||
<a href="#" class="footer-link">FAQ</a>
|
<div class="accordion-section">
|
||||||
<a href="#" class="footer-link">Privacy Policy</a>
|
<slot name="accordion"></slot>
|
||||||
<a href="#" class="footer-link">Terms of Service</a>
|
</div>
|
||||||
</nav>
|
<div class="footer-links">
|
||||||
<div class="social-icons">
|
<div class="footer-link-column links-wrapper">
|
||||||
<a href="#" class="social-icon" aria-label="Facebook">
|
<slot name="links-left"></slot>
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
</div>
|
||||||
<path d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"/>
|
<div class="footer-link-column links-wrapper">
|
||||||
</svg>
|
<slot name="links-right"></slot>
|
||||||
</a>
|
</div>
|
||||||
<a href="#" class="social-icon" aria-label="Twitter">
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
|
||||||
<path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/>
|
|
||||||
</svg>
|
|
||||||
</a>
|
|
||||||
<a href="#" class="social-icon" aria-label="Instagram">
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
|
||||||
<path d="M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm6.406-11.845a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z"/>
|
|
||||||
</svg>
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
<p class="copyright">© 2026 BookStore. All rights reserved.</p>
|
|
||||||
</footer>
|
</footer>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user