feat: design change to hero and add stats element

This commit is contained in:
2024-12-12 23:52:34 +01:00
parent 7133371206
commit daa02d36d5
11 changed files with 207 additions and 96 deletions

View File

@@ -1,9 +1,21 @@
.frame-type-cloonar_hero {
background: #f9f9f9;
padding: 1rem; /* Mobile-first padding */
position: relative;
z-index: 1;
background: #cecece;
}
.frame-type-cloonar_hero + .frame {
margin-top: -10rem;
}
/* Inner container with white background and padding */
.frame-type-cloonar_hero .hero-inner {
padding: 3rem 1rem;
max-width: 1140px;
margin: 0 auto;
}
/* Mobile-first: stacked layout */
.frame-type-cloonar_hero .hero {
display: flex;
flex-direction: column;
@@ -68,7 +80,6 @@
border-radius: 0.5rem;
}
/* Medium devices (≥768px) - slightly larger text and icons */
@media (min-width: 768px) {
.frame-type-cloonar_hero .hero-subheader {
font-size: 1.2rem;
@@ -94,13 +105,7 @@
}
}
/* Large devices (≥992px): Switch to 3-column layout */
@media (min-width: 992px) {
.frame-type-cloonar_hero {
padding: 2rem;
}
/* Three-column grid: text (left), image (middle), icons (right) */
.frame-type-cloonar_hero .hero {
display: grid;
grid-template-columns: 1fr auto auto;
@@ -150,6 +155,6 @@
}
.frame-type-cloonar_hero .hero-image {
max-width: 300px; /* Slightly larger on desktop, but not too big */
max-width: 300px;
}
}

View File

@@ -6,27 +6,28 @@
<f:section name="Main">
<f:asset.css identifier="CBHero" href="{cb:assetPath()}/frontend.css" />
<div class="hero">
<div class="hero-subheader">{data.subheader}</div>
<h2 class="hero-title">{data.header}</h2>
<div class="hero-text">
<f:format.html>{data.bodytext}</f:format.html>
<div class="hero-inner">
<div class="hero">
<div class="hero-subheader">{data.subheader}</div>
<h2 class="hero-title">{data.header}</h2>
<div class="hero-text">
<f:format.html>{data.bodytext}</f:format.html>
</div>
<div class="hero-social-icons">
<a href="#" class="social-icon">X</a>
<a href="#" class="social-icon">Instagram</a>
<a href="#" class="social-icon">TikTok</a>
</div>
<div class="hero-image-wrapper">
<f:if condition="{data.image}">
<f:then>
<f:image image="{data.image.0}" alt="Hero Image" class="hero-image" />
</f:then>
<f:else>
<p>No image available</p>
</f:else>
</f:if>
</div>
</div>
<div class="hero-social-icons">
<a href="#" class="social-icon">X</a>
<a href="#" class="social-icon">Instagram</a>
<a href="#" class="social-icon">TikTok</a>
</div>
<div class="hero-image-wrapper">
<f:if condition="{data.image}">
<f:then>
<f:image image="{data.image.0}" alt="Hero Image" class="hero-image" />
</f:then>
<f:else>
<p>No image available</p>
</f:else>
</f:if>
</div>
<div class="next-section-overlap"></div>
</div>
</f:section>