Zoeken...  ⌘K GitHub

FooterGradient Footer

Footer met kleurgradiënt achtergrond en witte tekst.

/footer-gradient
src/components/footer/FooterGradient.astro
---
/**
 * FooterGradient
 * Footer met kleurgradiënt achtergrond en witte tekst.
 */
interface Props {
  logo: string;
  tagline?: string;
  links?: { label: string; href: string }[];
  columns?: { title: string; links: { label: string; href: string }[] }[];
  copyright?: string;
  gradient?: string;
}
const { logo, tagline, links = [], columns = [], copyright, gradient = 'linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)' } = Astro.props;
---
<footer class="fg2" style={`--grad:${gradient}`}>
  <div class="fg2-inner">
    <div class="fg2-brand">
      <a href="/" class="fg2-logo">{logo}</a>
      {tagline && <p class="fg2-tagline">{tagline}</p>}
      {links.length > 0 && (
        <nav class="fg2-links">
          {links.map(l => <a href={l.href} class="fg2-link">{l.label}</a>)}
        </nav>
      )}
    </div>
    {columns.map(col => (
      <div class="fg2-col">
        <h4 class="fg2-col-title">{col.title}</h4>
        <ul class="fg2-col-links">
          {col.links.map(l => <li><a href={l.href} class="fg2-col-link">{l.label}</a></li>)}
        </ul>
      </div>
    ))}
  </div>
  <div class="fg2-bottom">
    <div class="fg2-bottom-inner">
      <p class="fg2-copy">{copyright ?? `© ${new Date().getFullYear()} ${logo}`}</p>
    </div>
  </div>
</footer>
<style>
  .fg2 { background: var(--grad); }
  .fg2-inner { max-width: 1280px; margin: 0 auto; padding: 3.5rem 2rem 2.5rem; display: grid; grid-template-columns: 1fr repeat(auto-fit, minmax(130px, 1fr)); gap: 3rem; }
  .fg2-logo { font-weight: 900; font-size: 1.25rem; color: #fff; text-decoration: none; letter-spacing: -0.03em; display: block; margin-bottom: 0.875rem; }
  .fg2-tagline { font-size: 0.9375rem; color: rgba(255,255,255,0.7); line-height: 1.6; margin: 0 0 1.5rem; }
  .fg2-links { display: flex; flex-wrap: wrap; gap: 1rem; }
  .fg2-link { font-size: 0.875rem; color: rgba(255,255,255,0.65); text-decoration: none; transition: color 0.15s; }
  .fg2-link:hover { color: #fff; }
  .fg2-col-title { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin: 0 0 1rem; }
  .fg2-col-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
  .fg2-col-link { font-size: 0.875rem; color: rgba(255,255,255,0.65); text-decoration: none; transition: color 0.15s; }
  .fg2-col-link:hover { color: #fff; }
  .fg2-bottom { border-top: 1px solid rgba(255,255,255,0.15); }
  .fg2-bottom-inner { max-width: 1280px; margin: 0 auto; padding: 1.25rem 2rem; }
  .fg2-copy { font-size: 0.8125rem; color: rgba(255,255,255,0.5); margin: 0; }
  @media (max-width: 768px) { .fg2-inner { grid-template-columns: 1fr; } }
</style>

Props

Prop Type Default Beschrijving
logo * string Merknaam
columns { title: string; links: { label: string; href: string }[] }[] Footer kolommen
tagline string Tagline
gradient string CSS gradient string
copyright string Copyright tekst

* = verplicht