Skip to content

Integrate live demo into hero section and add code toggle#10

Open
Theo-Steiner wants to merge 2 commits into
mainfrom
claude/marketing-atproto-comments-placement-o6y2v1
Open

Integrate live demo into hero section and add code toggle#10
Theo-Steiner wants to merge 2 commits into
mainfrom
claude/marketing-atproto-comments-placement-o6y2v1

Conversation

@Theo-Steiner

Copy link
Copy Markdown
Contributor

Summary

Restructured the homepage to integrate the live ATProto thread demo directly into the hero section, replacing the separate demo section. Added a toggle to show/hide the implementation code snippet.

Key Changes

  • Merged demo into hero: Moved the live thread rendering from a dedicated "demo-section" into the hero area, making it immediately visible alongside the pitch
  • Added code visibility toggle: Implemented a showCode state to allow users to toggle between viewing the live demo and the code implementation
  • Updated button styling: Enhanced the secondary button to function as a toggle with proper accessibility attributes (aria-expanded)
  • Refactored demo container: Renamed .hero-code to .hero-demo and restructured it to contain both the live component panel and optional code display
  • Improved demo UX:
    • Added "Open original" link in the code footer
    • Moved hint text into the demo container
    • Updated window bar label to reflect "Live ATProto thread"
    • Added styling for the demo panel and code sections
  • Removed separate demo section: Eliminated the demo-section with its heading and toolbar, consolidating all demo content into the hero
  • Updated responsive styles: Adjusted mobile breakpoints to accommodate the new layout structure

Implementation Details

  • The toggle uses a simple boolean state that controls visibility of the .hero-demo-code element via Svelte's conditional rendering
  • Button styling now includes cursor: pointer, border: none, and background: none to properly style the toggle button
  • The demo panel maintains white background with dark text for contrast against the dark hero background
  • Code snippet is conditionally rendered only when showCode is true, reducing initial DOM size

https://claude.ai/code/session_01VMmkwD4VkGZqB21wNoFGB6

claude added 2 commits July 25, 2026 10:17
The real, server-rendered ATProto thread now leads the page instead of
appearing near the bottom. A "View the code" button in the hero reveals
the install snippet inline next to the live thread, so visitors see
proof before pitch. Removes the now-redundant standalone demo section
further down the page.
…ch code

Headline becomes "Introducing <atproto-comments>" and the lede reads as
what the real launch reply will say, since the placeholder thread will
be swapped for the actual @svebcomponents.dev announcement. The live
comment panel is capped to the same height as the code snippet and
scrolls internally, so the two states in the hero card line up visually.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants