Skip to content

The design language that makes your AI harness better at design.

JavaScript
4.1 KB
Raw Blame
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <title>Content hidden at rest: sliders that never started (browser-only)</title>
  <style>
    body { font-family: system-ui, sans-serif; margin: 0; color: #1a1a1a; background: #ffffff; font-size: 16px; line-height: 1.6; }
    main { width: 1120px; margin: 0 auto; }
    h1 { font-size: 36px; line-height: 1.2; }
    h2 { font-size: 24px; line-height: 1.3; }
    p { width: 640px; }
    /* A thumbnail slider its script fades in once it has laid the slides out. */
    .slider { opacity: 0; transition: opacity 0.3s; width: 1000px; }
    .slider.is-ready { opacity: 1; }
    /* Slider Revolution: every slide hidden until the plugin picks one. */
    .rev_slider { position: relative; height: 0; }
    .rev_slider ul { list-style: none; margin: 0; padding: 0; }
    .rev_slider li { position: absolute; top: 0; left: 0; width: 1000px; visibility: hidden; }
    /* A slider that started: one slide shows, the others wait their turn. */
    .swiper { position: relative; height: 120px; margin-top: 48px; }
    .swiper-slide { position: absolute; top: 0; left: 0; width: 640px; opacity: 0; }
    .swiper-slide-active { opacity: 1; }
    /* An image-only carousel that started: the current image shows, every caption waits hidden. */
    .carousel { position: relative; height: 120px; margin-top: 48px; }
    .carousel-item { position: absolute; top: 0; left: 0; width: 640px; opacity: 0; }
    .carousel-item.active { opacity: 1; }
    .carousel-item img { display: block; width: 640px; height: 120px; }
    .carousel-caption { visibility: hidden; }
  </style>
</head>
<body>
  <main>
    <h1>Sliders that never started</h1>
    <p>Two sliders on this page never started: one is still faded out waiting for its script, the
    other has every slide hidden. Whether a visitor meets their text is a question about the
    capture, so the scan says so in a note and leaves them out of the hidden share.</p>

    <!-- PASS: a slider whose script never ran, every slide transparent with it -->
    <div class="slider slider--thumbnails js-slider" id="dead-thumbnails">
      <article><h2>Stage 1: the opening time trial</h2><p>Riders set off one minute apart on a flat course along the coast, and the first yellow jersey goes to the fastest of them.</p></article>
      <article><h2>Stage 2: into the hills</h2><p>A rolling stage with four categorised climbs, where the sprinters' teams try to keep the breakaway within reach.</p></article>
      <article><h2>Stage 3: the long run north</h2><p>The longest day of the race, flat until the final ten kilometres and a short climb to the line.</p></article>
    </div>

    <!-- PASS: every slide hidden in a slider with no height -->
    <div class="rev_slider_wrapper"><div class="rev_slider" id="dead-banner"><ul>
      <li><h2>Eastern Cement</h2><p>Four decades of supplying the region's largest projects.</p></li>
      <li><h2>Quality certified</h2><p>Every batch tested at the plant before it ships.</p></li>
    </ul></div></div>

    <!-- FLAG: a started slider's waiting slides still count -->
    <div class="swiper" id="live-slider">
      <div class="swiper-slide swiper-slide-active"><p>Current offer: free delivery this week.</p></div>
      <div class="swiper-slide"><p>Next offer: two years of warranty on every order.</p></div>
      <div class="swiper-slide"><p>Later offer: a trade-in price for your old machine.</p></div>
    </div>

    <!-- FLAG: an image-only carousel that started; its hidden captions still count -->
    <div class="carousel" id="image-carousel">
      <div class="carousel-item active"><img alt="" src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='120'%3E%3Crect width='640' height='120' fill='%23cfd8e3'/%3E%3C/svg%3E"><p class="carousel-caption">Spring range.</p></div>
      <div class="carousel-item"><img alt="" src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='120'%3E%3Crect width='640' height='120' fill='%23e3d8cf'/%3E%3C/svg%3E"><p class="carousel-caption">Summer range.</p></div>
    </div>
  </main>
</body>
</html>