fix: purple pushbox
This commit is contained in:
@@ -132,10 +132,10 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<div class="content-padding">
|
<div class="content-padding">
|
||||||
<push-box>
|
<push-box variant="purple">
|
||||||
<h2 slot="title">
|
<h2 slot="title">
|
||||||
Gespecialiseerd op het vlak van boeddhisme en aanverwante
|
Kom je er niet uit of heb je een vraag? Neem contact op met de
|
||||||
Oost-West thema's
|
klantenservice.
|
||||||
</h2>
|
</h2>
|
||||||
<div slot="cta" class="cta-buttons">
|
<div slot="cta" class="cta-buttons">
|
||||||
<arrow-button href="#">Klantenservice</arrow-button>
|
<arrow-button href="#">Klantenservice</arrow-button>
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ class ContentTabs extends HTMLElement {
|
|||||||
<style>
|
<style>
|
||||||
:host {
|
:host {
|
||||||
display: block;
|
display: block;
|
||||||
|
margin: var(--spacing-xl, 2rem) 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tabs-container {
|
.tabs-container {
|
||||||
@@ -83,15 +84,18 @@ class ContentTabs extends HTMLElement {
|
|||||||
|
|
||||||
.tab-list {
|
.tab-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: var(--spacing-lg, 1.5rem);
|
gap: var(--spacing-md, 1rem);
|
||||||
|
margin-top: var(--spacing-lg, 1.5rem);
|
||||||
border-bottom: 1px solid var(--color-border, #e2e8f0);
|
border-bottom: 1px solid var(--color-border, #e2e8f0);
|
||||||
margin-bottom: var(--spacing-md, 1rem);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-button {
|
.tab-button {
|
||||||
padding: var(--spacing-sm, 0.5rem) 0;
|
padding: var(--spacing-sm, 0.5rem) var(--spacing-md, 1rem);
|
||||||
background: none;
|
background: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
font-family: var(--font-family-outfit, "Outfit", sans-serif);
|
font-family: var(--font-family-outfit, "Outfit", sans-serif);
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
@@ -100,28 +104,24 @@ class ContentTabs extends HTMLElement {
|
|||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
text-underline-offset: 3px;
|
text-underline-offset: 3px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: opacity var(--transition-fast, 150ms ease);
|
transition: all var(--transition-fast, 150ms ease);
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tab-button:first-child {
|
|
||||||
color: var(--color-text, #1e293b);
|
|
||||||
text-decoration: none;
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-button.active {
|
.tab-button.active {
|
||||||
|
background: var(--color-border, #e2e8f0);
|
||||||
color: var(--color-text, #1e293b);
|
color: var(--color-text, #1e293b);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-weight: 400;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-button:hover {
|
.tab-button:not(.active):hover {
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-panels {
|
.tab-panels {
|
||||||
min-height: 100px;
|
min-height: 100px;
|
||||||
|
background: var(--color-border, #e2e8f0);
|
||||||
|
padding: var(--spacing-lg, 1.5rem) var(--spacing-md, 1rem);
|
||||||
|
border-radius: var(--radius-sm, 0.25rem);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div class="tabs-container">
|
<div class="tabs-container">
|
||||||
|
|||||||
@@ -2,10 +2,11 @@
|
|||||||
* Push Box Component
|
* Push Box Component
|
||||||
* A promotional container with logo, title, and CTA
|
* A promotional container with logo, title, and CTA
|
||||||
* Uses slots for all content to allow easy customization in HTML
|
* Uses slots for all content to allow easy customization in HTML
|
||||||
|
* Supports variant="purple" for purple background with white content
|
||||||
*/
|
*/
|
||||||
class PushBox extends HTMLElement {
|
class PushBox extends HTMLElement {
|
||||||
static get observedAttributes() {
|
static get observedAttributes() {
|
||||||
return ["background-color", "text-color"];
|
return ["background-color", "text-color", "variant"];
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
@@ -48,7 +49,18 @@ class PushBox extends HTMLElement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get variant() {
|
||||||
|
return this.getAttribute("variant") || "default";
|
||||||
|
}
|
||||||
|
|
||||||
|
get isPurple() {
|
||||||
|
return this.variant === "purple";
|
||||||
|
}
|
||||||
|
|
||||||
get backgroundColor() {
|
get backgroundColor() {
|
||||||
|
if (this.isPurple) {
|
||||||
|
return "#951D51";
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
this.getAttribute("background-color") ||
|
this.getAttribute("background-color") ||
|
||||||
"var(--color-push-box-bg, #EBEEF4)"
|
"var(--color-push-box-bg, #EBEEF4)"
|
||||||
@@ -56,9 +68,19 @@ class PushBox extends HTMLElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get textColor() {
|
get textColor() {
|
||||||
|
if (this.isPurple) {
|
||||||
|
return "#FFFFFF";
|
||||||
|
}
|
||||||
return this.getAttribute("text-color") || "#951D51";
|
return this.getAttribute("text-color") || "#951D51";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get titleColor() {
|
||||||
|
if (this.isPurple) {
|
||||||
|
return "#FFFFFF";
|
||||||
|
}
|
||||||
|
return "#000000";
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
this.shadowRoot.innerHTML = `
|
this.shadowRoot.innerHTML = `
|
||||||
<style>
|
<style>
|
||||||
@@ -94,12 +116,12 @@ class PushBox extends HTMLElement {
|
|||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
line-height: 34px;
|
line-height: 34px;
|
||||||
color: #000000;
|
color: ${this.titleColor};
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cta-wrapper {
|
.cta-wrapper {
|
||||||
color: #951D51;
|
color: ${this.textColor};
|
||||||
font-family: var(--font-family-outfit, "Outfit", sans-serif);
|
font-family: var(--font-family-outfit, "Outfit", sans-serif);
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
|||||||
Reference in New Issue
Block a user