Liveweave: Generative AI Web Editor & HTML/CSS/JS Playground
Initializing
Liveweave
Web
expand_more
home
Home
Palette
Color Explorer
arrow_outward
Polyline
Graphics Editor
arrow_outward
frame_source
Python Playground
arrow_outward
build
Tools
expand_more
restart_alt
Load "Hello Weaver!"
post_add
Generate Lorem ipsum...
code
Format HTML
code_blocks
Format CSS
data_object
Format JavaScript
library_add
Library
expand_more
A
Algolia JS
Animate CSS
Apex Charts JS
B
Bulma CSS
Bootstrap
C
Chart JS
Chartist
Create JS
D
D3
Dojo
F
Foundation
Fullpage JS
G
Granim JS
Google Charts
H
Halfmoon
J
jQuery
M
Materialize
Moment JS
Masonry JS
Milligram CSS
P
Pure CSS
Primer CSS
Popper JS
Pattern CSS
Picnic CSS
R
React JS
Raphael JS
Raisin CSS
S
Semantic UI
Skeleton CSS
Spectre CSS
Tachyons CSS
T
Tailwind
Three JS
U
UI Kit
Vis JS
W
Water CSS
download
Download
expand_more
developer_mode
Download as HTML
folder_zip
Download as .ZIP
cloud_upload
Fork
account_circle
Login
settings
Settings
expand_more
Editor font
14
px
A
A
Night mode
Line number
Mini map
Word wrap
sync_alt
Reset Settings
smart_display
Run
left_panel_close
AI Assistant
dashboard
All
HTML
CSS
JS
visibility
Preview
bolt
Live Preview
terminal
JS Console
<!DOCTYPE html> <html> <head> <title>Timeline Template</title> </head> <body> <!-- Start your code here --> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400&display=swap" rel="stylesheet"> <div class="chronicle"> <header class="topbar"> <div class="brand">CHRONICLE<span>®</span></div> <div class="top-center">AN INTERACTIVE HISTORY OF INNOVATION</div> <div class="issue">VOL. 001 — 2026</div> </header> <section class="intro"> <div class="eyebrow"> <span class="small-dot"></span> A JOURNEY THROUGH TIME </div> <h1>Moments that<br><em>changed everything.</em></h1> <div class="intro-bottom"> <p>From the first powered flight to the digital revolution. Explore the breakthroughs that transformed our world.</p> <span class="explore">EXPLORE THE TIMELINE ↓</span> </div> </section> <section class="timeline-section"> <div class="section-heading"> <span>01 / THE TIMELINE</span> <span>1903 — 2007</span> </div> <div class="timeline-nav" id="timelineNav"> <div class="timeline-track"></div> <div class="timeline-progress" id="timelineProgress"></div> <button class="time-point active" data-index="0"> <span class="point"></span> <strong>1903</strong> <small>AVIATION</small> </button> <button class="time-point" data-index="1"> <span class="point"></span> <strong>1928</strong> <small>MEDICINE</small> </button> <button class="time-point" data-index="2"> <span class="point"></span> <strong>1969</strong> <small>SPACE</small> </button> <button class="time-point" data-index="3"> <span class="point"></span> <strong>1989</strong> <small>INTERNET</small> </button> <button class="time-point" data-index="4"> <span class="point"></span> <strong>2007</strong> <small>MOBILE</small> </button> </div> <div class="story" id="story"> <div class="story-copy"> <div class="story-index"> <span id="storyNumber">01 / 05</span> <span id="storyCategory">AVIATION</span> </div> <div class="story-year" id="storyYear">1903</div> <h2 id="storyTitle">The world<br>takes flight.</h2> <div class="story-rule"></div> <p id="storyDescription"> On December 17, 1903, the Wright brothers achieved the first sustained, controlled flight of a powered, heavier-than-air aircraft, changing transportation forever. </p> <div class="story-controls"> <button id="prevBtn" aria-label="Previous event">←</button> <button id="nextBtn" aria-label="Next event">→</button> <span>USE ARROWS TO EXPLORE</span> </div> </div> <div class="story-visual"> <div class="image-frame"> <img id="storyImage" src="https://upload.wikimedia.org/wikipedia/commons/8/86/First_flight2.jpg" alt="Wright brothers' first powered flight"> </div> <div class="image-caption"> <span id="imageCaption">THE WRIGHT FLYER / 1903</span> <span>ARCHIVE / 001</span> </div> <div class="visual-decoration">C.</div> </div> </div> <div class="bottom-progress"> <span>BEGINNING</span> <div class="progress-line"> <div id="bottomProgressFill"></div> </div> <span>PRESENT</span> </div> </section> <footer> <span>CHRONICLE — AN EXPERIMENT IN INTERACTIVE STORYTELLING</span> <span>BUILT WITH HTML / CSS / JS</span> </footer> </div> <!-- End your code here --> </body> </html>
:root { --bg: #f4f1e9; --ink: #263d35; --accent: #c46f51; --muted: #849088; --line: #d4d8cf; } * { box-sizing: border-box; } html { scroll-behavior: smooth; } body { margin: 0; background: var(--bg); color: var(--ink); font-family: "DM Sans", sans-serif; } button { font: inherit; } .chronicle { max-width: 1600px; margin: auto; padding: 0 5vw; overflow: hidden; } /* NAV */ .topbar { height: 78px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); } .brand { font-size: 20px; font-weight: 700; letter-spacing: -1px; } .brand span { font-size: 8px; vertical-align: top; margin-left: 3px; } .top-center, .issue, .eyebrow, .explore, .section-heading, .story-index, .image-caption, .bottom-progress, footer { font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: 1px; } .top-center, .issue { color: var(--muted); } /* INTRO */ .intro { padding: 85px 0 95px; } .eyebrow { display: flex; align-items: center; gap: 10px; color: var(--accent); } .small-dot { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; } .intro h1 { font-family: "Playfair Display", serif; font-weight: 400; font-size: clamp(54px, 7.6vw, 115px); line-height: 1.06; letter-spacing: -.055em; margin: 25px 0 45px; } .intro h1 em { font-weight: 400; color: var(--accent); } .intro-bottom { display: flex; justify-content: space-between; align-items: end; gap: 30px; } .intro-bottom p { max-width: 440px; font-size: 14px; line-height: 1.8; color: #66776e; margin: 0; } .explore { color: var(--accent); } /* TIMELINE */ .timeline-section { border-top: 1px solid var(--line); padding-top: 25px; } .section-heading { display: flex; justify-content: space-between; color: var(--muted); } .timeline-nav { position: relative; display: flex; justify-content: space-between; margin: 65px 0 90px; } .timeline-track, .timeline-progress { position: absolute; top: 9px; left: 10%; width: 80%; height: 2px; background: var(--line); } .timeline-progress { width: 0; background: var(--accent); transition: width .65s cubic-bezier(.2,.8,.2,1); } .time-point { position: relative; z-index: 2; width: 20%; background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; text-align: center; } .point { display: block; width: 20px; height: 20px; margin: 0 auto 16px; background: var(--bg); border: 2px solid #b7c1b8; border-radius: 50%; transition: .3s ease; } .time-point:hover .point { border-color: var(--accent); transform: scale(1.2); } .time-point.active .point { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 6px rgba(196,111,81,.13); } .time-point strong { display: block; font-family: "Playfair Display", serif; font-size: 26px; font-weight: 400; transition: color .3s; } .time-point.active strong { color: var(--ink); } .time-point small { display: block; margin-top: 7px; font-family: "DM Mono", monospace; font-size: 8px; letter-spacing: 1px; } /* STORY */ .story { display: grid; grid-template-columns: .85fr 1.15fr; gap: 7%; min-height: 500px; align-items: center; } .story-copy { padding: 15px 0; } .story-index { display: flex; justify-content: space-between; max-width: 350px; color: var(--accent); } .story-year { font-family: "Playfair Display", serif; font-size: clamp(100px, 13vw, 200px); line-height: 1; letter-spacing: -.08em; color: rgba(38,61,53,.09); margin: 10px 0 -35px -8px; } .story h2 { position: relative; font-family: "Playfair Display", serif; font-size: clamp(45px, 5vw, 75px); line-height: 1.07; letter-spacing: -.05em; font-weight: 400; margin: 0; } .story-rule { width: 55px; height: 2px; background: var(--accent); margin: 35px 0 25px; } .story-copy p { max-width: 400px; font-size: 14px; line-height: 1.85; color: #687970; } .story-controls { display: flex; align-items: center; gap: 12px; margin-top: 35px; } .story-controls button { width: 45px; height: 45px; border: 1px solid var(--line); background: transparent; border-radius: 50%; color: var(--ink); cursor: pointer; font-size: 18px; transition: .25s; } .story-controls button:hover:not(:disabled) { background: var(--ink); color: white; transform: translateY(-2px); } .story-controls button:disabled { opacity: .3; cursor: not-allowed; } .story-controls span { font-family: "DM Mono", monospace; font-size: 8px; color: var(--muted); margin-left: 10px; letter-spacing: 1px; } /* IMAGE */ .story-visual { position: relative; min-width: 0; } .image-frame { height: 470px; overflow: hidden; background: #d9d6cb; } .image-frame img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(35%) contrast(1.04); transition: transform .7s ease, opacity .35s ease; } .image-frame:hover img { transform: scale(1.04); } .image-caption { display: flex; justify-content: space-between; margin-top: 15px; color: var(--muted); } .visual-decoration { position: absolute; top: -65px; right: -20px; font-family: "Playfair Display", serif; font-size: 110px; font-style: italic; color: var(--accent); opacity: .18; pointer-events: none; } /* ANIMATION */ .story.changing .story-copy, .story.changing .story-visual { animation: storyEnter .5s ease both; } .story.changing .story-visual { animation-delay: .08s; } @keyframes storyEnter { from { opacity: .35; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } } /* BOTTOM PROGRESS */ .bottom-progress { display: flex; align-items: center; gap: 20px; color: var(--muted); margin: 75px 0 45px; } .progress-line { flex: 1; height: 3px; background: var(--line); overflow: hidden; } .progress-line div { width: 0%; height: 100%; background: var(--accent); transition: width .65s ease; } footer { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding: 25px 0; color: var(--muted); } /* RESPONSIVE */ @media (max-width: 800px) { .top-center { display: none; } .intro { padding: 60px 0; } .timeline-nav { margin: 45px 0 60px; } .time-point strong { font-size: 20px; } .story { grid-template-columns: 1fr; gap: 35px; } .story-year { font-size: 110px; } .image-frame { height: 350px; } } @media (max-width: 500px) { .chronicle { padding: 0 20px; } .intro h1 { font-size: 48px; } .intro-bottom { flex-direction: column; align-items: flex-start; } .time-point strong { font-size: 16px; } .time-point small { font-size: 6px; } .timeline-nav { margin-bottom: 40px; } .story h2 { font-size: 46px; } .image-frame { height: 270px; } .story-controls span { display: none; } footer { flex-wrap: wrap; } } @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
const events = [ { year: "1903", category: "AVIATION", title: "The world<br>takes flight.", description: "On December 17, 1903, the Wright brothers achieved the first sustained, controlled flight of a powered, heavier-than-air aircraft, changing transportation forever.", image: "https://upload.wikimedia.org/wikipedia/commons/8/86/First_flight2.jpg", alt: "Wright brothers' first powered flight", caption: "THE WRIGHT FLYER / 1903" }, { year: "1928", category: "MEDICINE", title: "A discovery<br>that saved millions.", description: "Alexander Fleming observed the antibacterial effect of Penicillium mold, leading to the discovery of penicillin and eventually transforming modern medicine.", image: "https://images.unsplash.com/photo-1532094349884-543bc11b234d?auto=format&fit=crop&w=1200&q=85", alt: "Scientific laboratory glassware", caption: "THE AGE OF ANTIBIOTICS / 1928" }, { year: "1969", category: "SPACE", title: "One giant<br>leap for mankind.", description: "Apollo 11 successfully landed humans on the Moon. Neil Armstrong and Buzz Aldrin walked on the lunar surface, marking a defining moment in space exploration.", image: "https://images.unsplash.com/photo-1446776811953-b23d57bd21aa?auto=format&fit=crop&w=1200&q=85", alt: "Earth seen from space", caption: "APOLLO 11 / 1969" }, { year: "1989", category: "INTERNET", title: "The web<br>is imagined.", description: "Tim Berners-Lee proposed the system that would become the World Wide Web at CERN, laying the foundation for a new era of global information sharing.", image: "https://images.unsplash.com/photo-1518770660439-4636190af475?auto=format&fit=crop&w=1200&q=85", alt: "Close-up of electronic circuitry", caption: "WORLD WIDE WEB / 1989" }, { year: "2007", category: "MOBILE", title: "A computer<br>in every pocket.", description: "Apple introduced the first iPhone, bringing a multi-touch interface, internet communication, and a new model of mobile computing to a mass-market smartphone.", image: "https://images.unsplash.com/photo-1511707171634-5f897ff02aa9?auto=format&fit=crop&w=1200&q=85", alt: "Modern smartphone", caption: "THE SMARTPHONE ERA / 2007" } ]; const points = [...document.querySelectorAll(".time-point")]; const story = document.getElementById("story"); const nav = document.getElementById("timelineNav"); const progress = document.getElementById("timelineProgress"); const bottomFill = document.getElementById("bottomProgressFill"); let current = 0; function showEvent(index) { if (index < 0 || index >= events.length) return; current = index; const event = events[index]; document.getElementById("storyNumber").textContent = String(index + 1).padStart(2, "0") + " / " + String(events.length).padStart(2, "0"); document.getElementById("storyCategory").textContent = event.category; document.getElementById("storyYear").textContent = event.year; document.getElementById("storyTitle").innerHTML = event.title; document.getElementById("storyDescription").textContent = event.description; const img = document.getElementById("storyImage"); img.src = event.image; img.alt = event.alt; document.getElementById("imageCaption").textContent = event.caption; points.forEach((point, i) => { point.classList.toggle("active", i === index); point.setAttribute("aria-pressed", String(i === index)); }); // Connect the first marker to the active marker. const firstDot = points[0].querySelector(".point"); const activeDot = points[index].querySelector(".point"); const navRect = nav.getBoundingClientRect(); const firstRect = firstDot.getBoundingClientRect(); const activeRect = activeDot.getBoundingClientRect(); const startX = firstRect.left + firstRect.width / 2 - navRect.left; const endX = activeRect.left + activeRect.width / 2 - navRect.left; progress.style.left = startX + "px"; progress.style.width = Math.max(0, endX - startX) + "px"; // Keep the track aligned with the markers. const track = nav.querySelector(".timeline-track"); const lastRect = points[points.length - 1] .querySelector(".point").getBoundingClientRect(); const lastX = lastRect.left + lastRect.width / 2 - navRect.left; track.style.left = startX + "px"; track.style.width = (lastX - startX) + "px"; bottomFill.style.width = (index / (events.length - 1)) * 100 + "%"; document.getElementById("prevBtn").disabled = index === 0; document.getElementById("nextBtn").disabled = index === events.length - 1; story.classList.remove("changing"); void story.offsetWidth; story.classList.add("changing"); } points.forEach((point, index) => { point.addEventListener("click", () => showEvent(index)); }); document.getElementById("prevBtn").addEventListener( "click", () => showEvent(current - 1) ); document.getElementById("nextBtn").addEventListener( "click", () => showEvent(current + 1) ); document.addEventListener("keydown", (event) => { if (event.altKey || event.ctrlKey || event.metaKey) return; if (event.key === "ArrowRight") showEvent(current + 1); if (event.key === "ArrowLeft") showEvent(current - 1); }); window.addEventListener("resize", () => showEvent(current)); showEvent(0);
terminal
JavaScript Console
Preview
Clear
close
›
Run