Changes to confetti.scroll.pub

root
root
1 day ago
Initial commit
index.scroll
Changed around line 1
+ buildHtml
+ baseUrl https://confetti.scroll.pub
+ metaTags
+ editButton /edit.html
+ title Confetti Magic - Interactive Confetti Experience
+ style.css
+ header
+ class hero
+ h1 Confetti Magic
+ p Click anywhere or scroll to celebrate!
+ main
+ section
+ class confetti-controls
+ button Make it Rain!
+ class trigger-button
+ id mainButton
+ div
+ class scroll-indicator
+ span Scroll down for more fun!
+ class bounce
+ section
+ class info-section
+ div
+ class card
+ h2 About this Magic
+ p Every scroll and click brings a burst of joy! This interactive confetti experience demonstrates the beauty of simple web animations.
+ section
+ class features
+ div
+ class feature-card
+ h3 Interactive
+ p Click anywhere on the page
+ div
+ class feature-card
+ h3 Responsive
+ p Works on all devices
+ div
+ class feature-card
+ h3 Pure JavaScript
+ p No external dependencies
+ footer
+ p Made with joy and creativity
+ script.js
prompt.json
Changed around line 1
+ {
+ "id": "msg_01KjjwULR11ynykHxDjPeUAY",
+ "type": "message",
+ "role": "assistant",
+ "model": "claude-3-5-sonnet-20241022",
+ "content": [
+ {
+ "type": "text",
+ "text": "Let me create a fun confetti website with an appropriate domain.\n\n---domain---\nconfetti.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://confetti.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Confetti Magic - Interactive Confetti Experience\nstyle.css\nheader\n class hero\n h1 Confetti Magic\n p Click anywhere or scroll to celebrate!\nmain\n section\n class confetti-controls\n button Make it Rain!\n class trigger-button\n id mainButton\n div\n class scroll-indicator\n span Scroll down for more fun!\n class bounce\n section\n class info-section\n div\n class card\n h2 About this Magic\n p Every scroll and click brings a burst of joy! This interactive confetti experience demonstrates the beauty of simple web animations.\n section\n class features\n div\n class feature-card\n h3 Interactive\n p Click anywhere on the page\n div\n class feature-card\n h3 Responsive\n p Works on all devices\n div\n class feature-card\n h3 Pure JavaScript\n p No external dependencies\nfooter\n p Made with joy and creativity\nscript.js\n---style.css---\n:root {\n --primary: #FF6B6B;\n --secondary: #4ECDC4;\n --dark: #2C3E50;\n --light: #ECF0F1;\n}\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n font-family: 'Segoe UI', system-ui, sans-serif;\n line-height: 1.6;\n color: var(--dark);\n overflow-x: hidden;\n background: linear-gradient(135deg, var(--light) 0%, #fff 100%);\n}\n\n.hero {\n min-height: 100vh;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n text-align: center;\n padding: 2rem;\n background: radial-gradient(circle at center, rgba(78,205,196,0.1) 0%, rgba(255,107,107,0.1) 100%);\n}\n\nh1 {\n font-size: 4rem;\n margin-bottom: 1rem;\n background: linear-gradient(45deg, var(--primary), var(--secondary));\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n animation: titleFloat 3s ease-in-out infinite;\n}\n\n.trigger-button {\n padding: 1rem 2rem;\n font-size: 1.2rem;\n border: none;\n border-radius: 50px;\n background: linear-gradient(45deg, var(--primary), var(--secondary));\n color: white;\n cursor: pointer;\n transition: transform 0.3s ease;\n box-shadow: 0 4px 15px rgba(0,0,0,0.1);\n}\n\n.trigger-button:hover {\n transform: translateY(-2px);\n}\n\n.scroll-indicator {\n position: absolute;\n bottom: 2rem;\n left: 50%;\n transform: translateX(-50%);\n}\n\n.bounce {\n display: block;\n animation: bounce 2s infinite;\n}\n\n.info-section {\n padding: 4rem 2rem;\n}\n\n.card {\n max-width: 800px;\n margin: 0 auto;\n padding: 2rem;\n background: white;\n border-radius: 15px;\n box-shadow: 0 10px 30px rgba(0,0,0,0.1);\n}\n\n.features {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\n gap: 2rem;\n padding: 2rem;\n max-width: 1200px;\n margin: 0 auto;\n}\n\n.feature-card {\n background: white;\n padding: 2rem;\n border-radius: 15px;\n box-shadow: 0 4px 15px rgba(0,0,0,0.1);\n transition: transform 0.3s ease;\n}\n\n.feature-card:hover {\n transform: translateY(-5px);\n}\n\nfooter {\n text-align: center;\n padding: 2rem;\n background: var(--dark);\n color: var(--light);\n}\n\n@keyframes titleFloat {\n 0%, 100% { transform: translateY(0); }\n 50% { transform: translateY(-10px); }\n}\n\n@keyframes bounce {\n 0%, 20%, 50%, 80%, 100% { transform: translateY(0); }\n 40% { transform: translateY(-30px); }\n 60% { transform: translateY(-15px); }\n}\n\n@media (max-width: 768px) {\n h1 { font-size: 2.5rem; }\n .features { grid-template-columns: 1fr; }\n}\n---script.js---\nclass ConfettiParticle {\n constructor() {\n this.reset();\n }\n\n reset() {\n this.x = Math.random() * window.innerWidth;\n this.y = Math.random() * -100;\n this.velocity = {\n x: Math.random() * 6 - 3,\n y: Math.random() * 3 + 7\n };\n this.rotation = Math.random() * 360;\n this.rotationSpeed = Math.random() * 10 - 5;\n this.size = Math.random() * 10 + 5;\n this.color = `hsl(${Math.random() * 360}, 80%, 60%)`;\n }\n\n update() {\n this.y += this.velocity.y;\n this.x += this.velocity.x;\n this.rotation += this.rotationSpeed;\n this.velocity.y += 0.1;\n\n if (this.y > window.innerHeight) {\n this.reset();\n }\n }\n\n draw(ctx) {\n ctx.save();\n ctx.translate(this.x, this.y);\n ctx.rotate(this.rotation * Math.PI / 180);\n ctx.fillStyle = this.color;\n ctx.fillRect(-this.size / 2, -this.size / 2, this.size, this.size);\n ctx.restore();\n }\n}\n\nclass ConfettiSystem {\n constructor() {\n this.canvas = document.createElement('canvas');\n this.ctx = this.canvas.getContext('2d');\n this.particles = [];\n this.isActive = false;\n\n this.canvas.style.position = 'fixed';\n this.canvas.style.top = '0';\n this.canvas.style.left = '0';\n this.canvas.style.pointerEvents = 'none';\n this.canvas.style.zIndex = '1000';\n document.body.appendChild(this.canvas);\n\n this.resize();\n window.addEventListener('resize', () => this.resize());\n\n for (let i = 0; i < 100; i++) {\n this.particles.push(new ConfettiParticle());\n }\n\n this.bindEvents();\n this.animate();\n }\n\n resize() {\n this.canvas.width = window.innerWidth;\n this.canvas.height = window.innerHeight;\n }\n\n bindEvents() {\n document.addEventListener('click', () => this.burst());\n document.addEventListener('scroll', () => {\n if (!this.isActive) this.burst();\n }, { passive: true });\n \n document.getElementById('mainButton').addEventListener('click', (e) => {\n e.stopPropagation();\n this.burst(200);\n });\n }\n\n burst(amount = 50) {\n this.isActive = true;\n setTimeout(() => this.isActive = false, 1000);\n \n for (let i = 0; i < amount; i++) {\n const particle = new ConfettiParticle();\n particle.y = window.innerHeight / 2;\n particle.x = window.innerWidth / 2;\n this.particles.push(particle);\n }\n }\n\n animate() {\n this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n \n this.particles.forEach(particle => {\n particle.update();\n particle.draw(this.ctx);\n });\n\n requestAnimationFrame(() => this.animate());\n }\n}\n\ndocument.addEventListener('DOMContentLoaded', () => {\n new ConfettiSystem();\n});\n---end---\n\nThis creates a delightful, interactive confetti website that features:\n- Confetti bursts on click and scroll\n- A main \"Make it Rain\" button for extra confetti\n- Smooth animations and gradients\n- Responsive design\n- Beautiful cards with hover effects\n- Canvas-based confetti system\n- Optimized performance\n- Accessible controls\n- Modern CSS features including CSS Grid and Flexbox\n- Clean, semantic HTML structure\n\nThe confetti particles are rendered using Canvas for better performance, and the animation system is optimized to handle many particles simultaneously. The design is modern and playful while maintaining professionalism, with a color scheme that complements the festive nature of confetti."
+ }
+ ],
+ "stop_reason": "end_turn",
+ "stop_sequence": null,
+ "usage": {
+ "input_tokens": 822,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0,
+ "output_tokens": 2376
+ }
+ }
readme.scroll
Changed around line 1
+ # confetti.scroll.pub
+
+ Prompt: website
+ Agent: claude
+ Model: claude-3-5-sonnet-20241022
+
+ ## User prompt
+ A website that shoots confetti
+
+ ## System prompt
+ You are an expert web developer. Create a website based on this request: "A website that shoots confetti"
+
+ Requirements:
+ - Use only Scroll, CSS, and JavaScript (NO frameworks, NO external dependencies)
+ - Create clean, semantic HTML5
+ - Make it mobile-responsive
+ - Follow modern best practices and accessibility guidelines
+ - Keep it simple but professional
+ - Use only relative links and no external resources
+ - Do not put a copyright symbol or all rights reserved in the footer.
+ - Make it beautiful. Dazzling. Advanced used of CSS.
+
+ As a refresher, for doing the html body, Scroll is a whitespace based language that uses a single indented space to mark a line (aka particle) as a subparticle of a parent line.
+
+ For example:
+
+ header
+ class hero
+ nav
+ div Scroll
+ class logo
+ div
+ class nav-links
+ a Features
+ href #features
+ a Examples
+ href #examples
+ a Edit
+ href edit.html
+ a GitHub
+ class cta-button
+ href https://github.com/breck7/scroll
+ div
+ class hero-content
+ h1 Write Better with Scroll
+ p The extendible markup language that makes source beautiful and compiles to anything
+ a Get Started
+ class primary-button
+ href https://hub.scroll.pub/
+ main
+ section
+ id features
+ class features
+ h2 Why Scroll?
+ div
+ class feature-grid
+ div
+ class feature-card
+ div ⚡
+ class feature-icon
+ h3 Simple Syntax
+ p Like Markdown, but more powerful. No parentheses needed.
+ div
+ class feature-card
+ div 🧩
+ class feature-icon
+ h3 Extendible
+ p Build your own custom parsers.
+ div
+ class feature-card
+ div 🎨
+ class feature-icon
+ h3 Beautiful Output
+ p Create stunning documents with minimal effort.
+ div
+ class feature-card
+ div 🚀
+ class feature-icon
+ h3 Fast & Light
+ p Built on the efficient PPS Stack.
+ section
+ id examples
+ class code-demo
+ h2 See It In Action
+ div
+ class code-container
+ pre
+ class code-example
+ div
+ class code-output
+ footer
+ div
+ class footer-content
+ div
+ class footer-links
+ a Documentation
+ href https://scroll.pub/tutorial.html
+ a Community
+ href https://www.reddit.com/r/WorldWideScroll/
+ a Blog
+ href https://scroll.pub/blog
+ p Started by Breck Yunits. Evolved by a community.
+ https://twitter.com/breckyunits Breck Yunits
+ https://github.com/breck7/scroll/graphs/contributors community
+
+
+ First suggest a short, memorable domain name ending in scroll.pub that represents this website. Then provide the website files. Use this exact format:
+
+ ---domain---
+ (domainscroll.pub here)
+ ---index.scroll---
+ buildHtml
+ baseUrl https://(domainscroll.pub here)
+ metaTags
+ editButton /edit.html
+ title (Title here)
+ style.css
+
+ (body content here. no blank lines please.)
+
+ script.js
+ ---style.css---
+ (CSS content here)
+ ---script.js---
+ (JavaScript content here)
+ ---end---
script.js
Changed around line 1
+ class ConfettiParticle {
+ constructor() {
+ this.reset();
+ }
+
+ reset() {
+ this.x = Math.random() * window.innerWidth;
+ this.y = Math.random() * -100;
+ this.velocity = {
+ x: Math.random() * 6 - 3,
+ y: Math.random() * 3 + 7
+ };
+ this.rotation = Math.random() * 360;
+ this.rotationSpeed = Math.random() * 10 - 5;
+ this.size = Math.random() * 10 + 5;
+ this.color = `hsl(${Math.random() * 360}, 80%, 60%)`;
+ }
+
+ update() {
+ this.y += this.velocity.y;
+ this.x += this.velocity.x;
+ this.rotation += this.rotationSpeed;
+ this.velocity.y += 0.1;
+
+ if (this.y > window.innerHeight) {
+ this.reset();
+ }
+ }
+
+ draw(ctx) {
+ ctx.save();
+ ctx.translate(this.x, this.y);
+ ctx.rotate(this.rotation * Math.PI / 180);
+ ctx.fillStyle = this.color;
+ ctx.fillRect(-this.size / 2, -this.size / 2, this.size, this.size);
+ ctx.restore();
+ }
+ }
+
+ class ConfettiSystem {
+ constructor() {
+ this.canvas = document.createElement('canvas');
+ this.ctx = this.canvas.getContext('2d');
+ this.particles = [];
+ this.isActive = false;
+
+ this.canvas.style.position = 'fixed';
+ this.canvas.style.top = '0';
+ this.canvas.style.left = '0';
+ this.canvas.style.pointerEvents = 'none';
+ this.canvas.style.zIndex = '1000';
+ document.body.appendChild(this.canvas);
+
+ this.resize();
+ window.addEventListener('resize', () => this.resize());
+
+ for (let i = 0; i < 100; i++) {
+ this.particles.push(new ConfettiParticle());
+ }
+
+ this.bindEvents();
+ this.animate();
+ }
+
+ resize() {
+ this.canvas.width = window.innerWidth;
+ this.canvas.height = window.innerHeight;
+ }
+
+ bindEvents() {
+ document.addEventListener('click', () => this.burst());
+ document.addEventListener('scroll', () => {
+ if (!this.isActive) this.burst();
+ }, { passive: true });
+
+ document.getElementById('mainButton').addEventListener('click', (e) => {
+ e.stopPropagation();
+ this.burst(200);
+ });
+ }
+
+ burst(amount = 50) {
+ this.isActive = true;
+ setTimeout(() => this.isActive = false, 1000);
+
+ for (let i = 0; i < amount; i++) {
+ const particle = new ConfettiParticle();
+ particle.y = window.innerHeight / 2;
+ particle.x = window.innerWidth / 2;
+ this.particles.push(particle);
+ }
+ }
+
+ animate() {
+ this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
+
+ this.particles.forEach(particle => {
+ particle.update();
+ particle.draw(this.ctx);
+ });
+
+ requestAnimationFrame(() => this.animate());
+ }
+ }
+
+ document.addEventListener('DOMContentLoaded', () => {
+ new ConfettiSystem();
+ });
style.css
Changed around line 1
+ :root {
+ --primary: #FF6B6B;
+ --secondary: #4ECDC4;
+ --dark: #2C3E50;
+ --light: #ECF0F1;
+ }
+
+ * {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+ }
+
+ body {
+ font-family: 'Segoe UI', system-ui, sans-serif;
+ line-height: 1.6;
+ color: var(--dark);
+ overflow-x: hidden;
+ background: linear-gradient(135deg, var(--light) 0%, #fff 100%);
+ }
+
+ .hero {
+ min-height: 100vh;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ text-align: center;
+ padding: 2rem;
+ background: radial-gradient(circle at center, rgba(78,205,196,0.1) 0%, rgba(255,107,107,0.1) 100%);
+ }
+
+ h1 {
+ font-size: 4rem;
+ margin-bottom: 1rem;
+ background: linear-gradient(45deg, var(--primary), var(--secondary));
+ -webkit-background-clip: text;
+ -webkit-text-fill-color: transparent;
+ animation: titleFloat 3s ease-in-out infinite;
+ }
+
+ .trigger-button {
+ padding: 1rem 2rem;
+ font-size: 1.2rem;
+ border: none;
+ border-radius: 50px;
+ background: linear-gradient(45deg, var(--primary), var(--secondary));
+ color: white;
+ cursor: pointer;
+ transition: transform 0.3s ease;
+ box-shadow: 0 4px 15px rgba(0,0,0,0.1);
+ }
+
+ .trigger-button:hover {
+ transform: translateY(-2px);
+ }
+
+ .scroll-indicator {
+ position: absolute;
+ bottom: 2rem;
+ left: 50%;
+ transform: translateX(-50%);
+ }
+
+ .bounce {
+ display: block;
+ animation: bounce 2s infinite;
+ }
+
+ .info-section {
+ padding: 4rem 2rem;
+ }
+
+ .card {
+ max-width: 800px;
+ margin: 0 auto;
+ padding: 2rem;
+ background: white;
+ border-radius: 15px;
+ box-shadow: 0 10px 30px rgba(0,0,0,0.1);
+ }
+
+ .features {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
+ gap: 2rem;
+ padding: 2rem;
+ max-width: 1200px;
+ margin: 0 auto;
+ }
+
+ .feature-card {
+ background: white;
+ padding: 2rem;
+ border-radius: 15px;
+ box-shadow: 0 4px 15px rgba(0,0,0,0.1);
+ transition: transform 0.3s ease;
+ }
+
+ .feature-card:hover {
+ transform: translateY(-5px);
+ }
+
+ footer {
+ text-align: center;
+ padding: 2rem;
+ background: var(--dark);
+ color: var(--light);
+ }
+
+ @keyframes titleFloat {
+ 0%, 100% { transform: translateY(0); }
+ 50% { transform: translateY(-10px); }
+ }
+
+ @keyframes bounce {
+ 0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
+ 40% { transform: translateY(-30px); }
+ 60% { transform: translateY(-15px); }
+ }
+
+ @media (max-width: 768px) {
+ h1 { font-size: 2.5rem; }
+ .features { grid-template-columns: 1fr; }
+ }