feat: integrate Tailwind CSS and remove legacy styles

This commit is contained in:
2025-04-19 20:49:35 +02:00
parent 700066b2b2
commit 6c9d8966b0
17 changed files with 1618 additions and 563 deletions

View File

@@ -1,167 +0,0 @@
.frame-type-cloonar_hero {
position: relative;
z-index: 1;
/* Use a relative path to correctly load the image */
background: #cecece;
background-repeat: repeat;
background: url('../../../Images/background.jpg') repeat;
}
.frame-type-cloonar_hero + .frame {
margin-top: -10.4rem;
}
.frame-type-cloonar_hero .container {
padding-bottom: 3rem;
}
/* Inner container with white background and padding */
.frame-type-cloonar_hero .hero-inner {
padding: 3rem 1rem;
max-width: 1140px;
margin: 0 auto;
}
.frame-type-cloonar_hero .hero {
display: flex;
flex-direction: column;
align-items: flex-start;
}
.frame-type-cloonar_hero .hero-subheader {
font-size: 2rem;
color: var(--bs-primary);
margin-bottom: 0rem;
line-height: 1;
}
.frame-type-cloonar_hero .hero-title {
text-transform: uppercase;
font-size: 4rem;
color: var(--bs-primary);
line-height: 1;
margin-bottom: 2rem;
}
.frame-type-cloonar_hero h4 {
text-transform: uppercase;
}
.frame-type-cloonar_hero .hero-text {
font-size: 1rem;
color: #333;
line-height: 1.4;
margin-bottom: 1rem;
max-width: 45ch;
}
.frame-type-cloonar_hero .hero-social-icons {
display: flex;
gap: 0.5rem;
margin-bottom: 1rem;
}
/* Smaller icons on mobile */
.frame-type-cloonar_hero .social-icon {
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 1rem;
padding: 1rem;
text-decoration: none;
border-radius: 50%;
transition: background 0.3s;
}
.frame-type-cloonar_hero .hero-image-wrapper {
margin-top: 1rem;
align-self: flex-end;
width: 100%;
}
.frame-type-cloonar_hero .hero-image {
width: 100%;
height: auto;
border-radius: 0.5rem;
}
.frame-type-cloonar_hero img {
width: 100%;
}
@media (min-width: 768px) {
.frame-type-cloonar_hero .container {
padding-bottom: 4rem;
}
.frame-type-cloonar_hero .hero-subheader {
font-size: 3rem;
}
.frame-type-cloonar_hero .hero-title {
font-size: 5rem;
}
.frame-type-cloonar_hero .hero-text {
font-size: 1rem;
}
.frame-type-cloonar_hero .social-icon {
width: 2.5rem;
height: 2rem;
font-size: 2rem;
padding: 2.375rem;
}
.frame-type-cloonar_hero .hero-image {
}
}
@media (min-width: 992px) {
.frame-type-cloonar_hero .hero {
display: grid;
grid-template-columns: 1fr 40% 7.125rem;
grid-template-rows: auto auto 1fr;
grid-template-areas:
"subheader image social"
"title image social"
"text image social";
align-items: start;
justify-items: start;
text-align: left;
}
.frame-type-cloonar_hero .hero-subheader {
grid-area: subheader;
}
.frame-type-cloonar_hero .hero-title {
grid-area: title;
}
.frame-type-cloonar_hero .hero-text {
grid-area: text;
font-size: 1rem;
max-width: 40ch;
margin-bottom: 1.5rem;
}
.frame-type-cloonar_hero .hero-social-icons {
grid-area: social;
flex-direction: column;
gap: 1rem;
margin-bottom: 0;
align-items: flex-start;
align-self: center;
}
.frame-type-cloonar_hero .hero-image-wrapper {
grid-area: image;
margin-top: 0;
display: flex;
align-items: center;
justify-content: center;
}
.frame-type-cloonar_hero .hero-image {
}
}

View File

@@ -4,20 +4,18 @@
<f:section name="Header" />
<f:section name="Main">
<f:asset.css identifier="CBHero" href="{cb:assetPath()}/frontend.css" />
<div class="hero-inner">
<div class="hero">
<h2 class="hero-subheader">{data.subheader}</h2>
<h1 class="hero-title">{data.header}</h1>
<div class="hero-text">
<div class="py-12 px-4 max-w-6xl mx-auto">
<div class="flex flex-col items-start lg:grid lg:grid-cols-[1fr_auto_auto] lg:grid-rows-[auto_auto_1fr] lg:gap-x-8 lg:items-start lg:justify-items-start lg:text-left">
<h2 class="text-3xl text-primary mb-0 leading-none lg:text-5xl lg:col-start-1 lg:row-start-1">{data.subheader}</h2>
<h1 class="uppercase text-6xl text-primary leading-none mb-8 lg:text-7xl lg:col-start-1 lg:row-start-2">{data.header}</h1>
<div class="text-base text-gray-700 leading-snug mb-4 max-w-[45ch] lg:text-base lg:max-w-[40ch] lg:mb-6 lg:col-start-1 lg:row-start-3">
<f:format.html>{data.bodytext}</f:format.html>
</div>
<div class="hero-social-icons">
<a href="https://www.instagram.com/lena.ats/" target="_blank" aria-label="Lena Schillings Instagram" class="btn social-icon"><i class="ci ci-instagram"></i></a>
<a href="https://www.tiktok.com/@dieschilling" target="_blank" aria-label="Lena Schillings TikTok" class="btn social-icon"><i class="ci ci-tiktok"></i></a>
<div class="flex gap-2 mb-4 lg:flex-col lg:gap-4 lg:mb-0 lg:items-start lg:self-center lg:col-start-3 lg:row-start-1 lg:row-span-3">
<a href="https://www.instagram.com/lena.ats/" target="_blank" aria-label="Lena Schillings Instagram" class="btn inline-flex items-center justify-center text-base p-4 rounded-full transition duration-300 bg-yellow text-primary hover:bg-primary-light hover:text-white md:p-6 md:text-3xl"><i class="ci ci-instagram"></i></a>
<a href="https://www.tiktok.com/@dieschilling" target="_blank" aria-label="Lena Schillings TikTok" class="btn inline-flex items-center justify-center text-base p-4 rounded-full transition duration-300 bg-yellow text-primary hover:bg-primary-light hover:text-white md:p-6 md:text-3xl"><i class="ci ci-tiktok"></i></a>
</div>
<div class="hero-image-wrapper">
<div class="mt-4 self-end w-full lg:mt-0 lg:flex lg:items-center lg:justify-center lg:col-start-2 lg:row-start-1 lg:row-span-3">
<f:if condition="{data.image}">
<f:then>
<figure>
@@ -31,7 +29,6 @@
sizes="(max-width: 320px) 80vw,
(max-width: 768px) 80px,
430px" />
<!-- Fallback source -->
<source
srcset="
@@ -49,7 +46,7 @@
width="430c"
alt="Hero Image"
loading="lazy"
class="hero-image" />
class="w-full h-auto rounded-lg" />
</figure>
</f:then>
<f:else>