Zoeken...  ⌘K GitHub

VideoSplit video

Split layout met video en tekst naast elkaar.

/video-split
src/components/video/VideoSplit.astro
---
/**
 * VideoSplit
 * Gesplitste layout: video aan één kant, tekst aan de andere
 */
interface Props {
  headline?: string;
  sub?: string;
  body?: string;
  videoUrl?: string;
}
const {
  headline = 'Van data naar beslissingen',
  sub = 'Onze werkwijze',
  body = 'We analyseren iedere campagne op zoekwoord-, advertentie- en landingspaginaniveau. Op basis van die data optimaliseren we dagelijks — zodat jij meer haalt uit elk geïnvesteerd euro.',
  videoUrl = 'https://www.w3schools.com/html/mov_bbb.mp4',
} = Astro.props;
---

<section class="vsp">
  <div class="vsp__inner">
    <div class="vsp__video-col">
      <div class="vsp__video-wrap">
        <video
          class="vsp__video"
          src={videoUrl}
          controls
          preload="metadata"
        ></video>
      </div>
    </div>
    <div class="vsp__text-col">
      {sub && <p class="vsp__sub">{sub}</p>}
      <h2 class="vsp__headline">{headline}</h2>
      <p class="vsp__body">{body}</p>
      <ul class="vsp__points">
        <li>Dagelijkse optimalisaties zonder extra kosten</li>
        <li>Transparant rapportage-dashboard</li>
        <li>Aantoonbare groei in 90 dagen of geld terug</li>
      </ul>
    </div>
  </div>
</section>

<style>
  .vsp {
    background: #fff;
    padding: 5rem 1.5rem;
  }
  .vsp__inner {
    max-width: 1060px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
  }
  .vsp__video-wrap {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.1);
    aspect-ratio: 16/9;
    background: #000;
  }
  .vsp__video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
  }
  .vsp__sub {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-accent, #6366f1);
    margin: 0 0 0.75rem;
  }
  .vsp__headline {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 800;
    color: var(--color-primary, #0a0a0a);
    margin: 0 0 1rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
  }
  .vsp__body {
    color: #555;
    font-size: 0.97rem;
    line-height: 1.7;
    margin: 0 0 1.5rem;
  }
  .vsp__points {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
  }
  .vsp__points li {
    font-size: 0.9rem;
    color: #444;
    padding-left: 1.4rem;
    position: relative;
  }
  .vsp__points li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-accent, #6366f1);
    font-weight: 700;
  }
  @media (max-width: 720px) {
    .vsp__inner { grid-template-columns: 1fr; gap: 2rem; }
  }
</style>

Props

Prop Type Default Beschrijving
headline string Headline
sub string Subtitel
body string Body tekst

* = verplicht