Sticky footer
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 9s

This commit is contained in:
2026-03-31 14:05:52 +02:00
parent df6a0fa504
commit 23b6490532
3 changed files with 9 additions and 5 deletions

View File

@@ -2,7 +2,7 @@
// src/layouts/MainLayout.astro // src/layouts/MainLayout.astro
import Header from "../components/Header.astro"; import Header from "../components/Header.astro";
import Footer from "../components/Footer.astro"; import Footer from "../components/Footer.astro";
import '../styles/global.css'; import "../styles/global.css";
interface Props { interface Props {
title?: string; title?: string;
@@ -26,8 +26,8 @@ const {
<body class="flex flex-col min-h-screen"> <body class="flex flex-col min-h-screen">
<Header /> <Header />
<main class="flex-grow container mx-auto px-6 py-12"> <main class="flex-grow w-full pb-6">
<slot /> <div class="container mx-auto px-6 py-6"><slot /></div>
</main> </main>
<Footer /> <Footer />

View File

@@ -1,6 +1,5 @@
--- ---
import MainLayout from './MainLayout.astro'; import MainLayout from './MainLayout.astro';
import '../styles/global.css';
const { frontmatter } = Astro.props; const { frontmatter } = Astro.props;
--- ---
<MainLayout title={frontmatter.title}> <MainLayout title={frontmatter.title}>

View File

@@ -36,9 +36,14 @@
} }
.main-footer { .main-footer {
@apply w-full bg-linear-to-b from-white to-header-bg py-2 mt-auto shadow-top; @apply fixed bottom-0 left-0 w-full z-50 py-2 shadow-top bg-linear-to-b from-white to-header-bg;
} }
/* .main-footer {
@apply w-full bg-linear-to-b from-white to-header-bg py-2 mt-auto shadow-top;
} */
.footer-container { .footer-container {
@apply container mx-auto px-6 flex flex-col md:flex-row justify-between items-center gap-4; @apply container mx-auto px-6 flex flex-col md:flex-row justify-between items-center gap-4;
} }