Pormpts

General prompts based on specific words.

📝 6 Prompts

📚 Prompts in this Group

Learn these prompts step by step to master this theme

1

Presently: Live Status Indicator System that displays a user's current activity.

Build a "Live Status Indicator System" — a CSS + JavaScript module that shows what a user or system is presently doing: "Online," "Typing...," "In a meeting," "Away," or "Offline." The indicator updates in real-time — viewers always know what's presently happening without refreshing the page. Requirements: 1. Status badge: a `.status-indicator` component — a small colored dot (8px) next to the user's avatar or name. Colors: green = online (presently active), amber = away (idle >5min), red = busy/DND, grey = offline. The dot pulses gently when online (`animation:pulse 2s infinite`). 2. Activity detection: JavaScript tracks user activity via `mousemove`, `keydown`, and `scroll` events (throttled to once per 30s). If no activity for 5 minutes, status changes from "online" to "away." Activity resumes → back to "online." The system always knows what the user is presently doing. 3. Custom status: users can set a custom status message: "In a meeting until 3 PM" or "Focusing — no interruptions." The message appears in a tooltip on hover over the status dot. 4. Status broadcast: on status change, POST to `/api/status` with `{ status, message, timestamp }`. Other users poll `GET /api/status/{userId}` every 30 seconds to see each person's live status. 5. Status in UI: display the status dot on: avatar thumbnails, user lists, chat headers, and team rosters. A team page shows all members with their presently active status — green dots for online, grey for offline. 6. Typing indicator: when a user is presently typing in a chat input, broadcast "typing" status. Show "User is typing..." with animated dots (`.\ .\ .` cycling). Clears 2 seconds after they stop typing. Starter JS: ```javascript class StatusTracker { constructor(userId) { this.userId = userId; this.status = 'online'; this.lastActivity = Date.now(); this._bindActivityListeners(); this._startIdleCheck(); } _bindActivityListeners() { const update = this._throttle(() => { this.lastActivity = Date.now(); if (this.status === 'away') this.setStatus('online'); }, 30000); ['mousemove','keydown','scroll'].forEach(ev => document.addEventListener(ev, update)); } _startIdleCheck() { setInterval(() => { if (Date.now() - this.lastActivity > 300000 && this.status === 'online') this.setStatus('away'); }, 60000); } setStatus(status, message = '') { this.status = status; fetch('/api/status', { method:'POST', headers:{'Content-Type':'application/json'}, body:JSON.stringify({ userId:this.userId, status, message }) }); } _throttle(fn, ms) { let last = 0; return (...a) => { if (Date.now()-last>ms){last=Date.now();fn(...a)} }; } } ```
View →
2

Producer: Describe how you would build an Event Queue System using the Producer/Consumer pattern

Build a "Event Queue System (Producer/Consumer Pattern)" — a PHP + JavaScript implementation of the producer-consumer pattern. The producer side creates jobs (image resizing, email sending, PDF generation) and adds them to a queue. The consumer side processes them asynchronously. A dashboard shows the queue depth, processing rate, and job statuses.
View →
3

progress:Describe how you would build a Multi-Step Form with a Progress Bar using wizard-style interface guides users through a series of steps one at a time, and a visual progress indicator updates dynamically to reflect exactly how far along the user i

Build a "Multi-Step Form with Progress Bar" — a CSS + JavaScript wizard-style form that guides users through steps with a visual progress indicator. The progress bar updates dynamically as users advance, showing exactly how far along they are in the process.
View →
4

Progression: Describe how you would build a Learning Path Progression Tracker using JavaScript and CSS that visualizes a user's journey through a structured curriculum, where each course contains modules and each module contains lessons, displaying an ove

Build a "Learning Path Progression Tracker" — a JavaScript + CSS interface that visualizes a user's progression through a structured learning curriculum. Each course has modules, and each module has lessons. The tracker shows overall progression percentage, module-level completion, and unlockable achievements at key milestones.
View →
5

Progressive: Describe how you would build a Progressive Image Loader using CSS and JavaScript where each image initially displays as a tiny blurred placeholder and then transitions smoothly to the full-resolution version once it finishes loading, using In

Build a "Progressive Image Loader" — a CSS + JavaScript utility that implements progressive image loading: images start as a tiny blurred placeholder and transition smoothly to the full-resolution version once loaded. This progressive enhancement pattern makes pages feel fast even on slow connections. Requirements: 1. Core mechanism: each image container holds two elements — a tiny placeholder (20px wide, Base64-inlined or low-quality src) displayed immediately with CSS `filter:blur(20px)` and `transform:scale(1.1)`, and the full image loading in the background via `new Image()`. When the full image fires `onload`, swap it in with a progressive fade (opacity transition 0.5s). 2. HTML structure: `<div class="progressive-img" data-src="full.jpg" data-placeholder="tiny.jpg">`. The JavaScript scans for all `.progressive-img` elements, sets up the placeholder, and begins loading the full image. This progressive approach requires zero changes to existing HTML beyond adding data attributes. 3. Intersection Observer: only begin loading full images when they enter the viewport (lazy loading). `threshold: 0.1`. This progressive strategy saves bandwidth — images below the fold don't load until the user scrolls near them. Once loaded, unobserve the element. 4. CSS transitions: placeholder state: `filter:blur(20px); transform:scale(1.1); transition:filter 0.5s ease, transform 0.5s ease;`. Loaded state: `filter:blur(0); transform:scale(1);`. The progressive reveal creates an elegant focus-in effect. 5. Fallback: if the full image fails to load (`onerror`), keep the placeholder and overlay a small "Image unavailable" label. If IntersectionObserver is unsupported, load all images immediately (progressive enhancement — works everywhere, better where supported). 6. Gallery demo: a responsive CSS grid gallery (3 columns desktop, 2 tablet, 1 mobile) with 12 placeholder images using `picsum.photos` URLs. Each image uses the progressive loading system. Include a "Simulate Slow Network" button that adds a 3-second artificial delay to demonstrate the progressive blur-to-clear effect. Starter CSS: ```css .progressive-img { position:relative; overflow:hidden; background:#f3f4f6; border-radius:8px; } .progressive-img img { display:block; width:100%; height:auto; } .progressive-img .placeholder { filter:blur(20px); transform:scale(1.1); transition:opacity .5s ease; } .progressive-img .full { position:absolute; top:0; left:0; opacity:0; transition:opacity .5s ease; } .progressive-img.loaded .full { opacity:1; } .progressive-img.loaded .placeholder { opacity:0; } ```
View →
6

promenade: Describe how you would build a Horizontal Scrolling Feature Showcase using CSS and JavaScript, where visitors smoothly scroll through a series of full-width feature panels arranged horizontally with scroll snapping, navigation arrows on each si

Build a "Horizontal Scrolling Feature Showcase" — a CSS + JavaScript component that lets visitors promenade through a product's key features by scrolling horizontally through a series of full-width feature panels. Like a promenade along a seafront, users glide smoothly from panel to panel, each revealing a new capability with rich visuals and text. Requirements: 1. Scrolling container: a `.promenade-track` — a horizontal scroll container (`overflow-x:scroll; display:flex`) with `scroll-behavior:smooth` and `scroll-snap-type:x mandatory`. Each child panel is `min-width:100vw; scroll-snap-align:start`. Users promenade through the panels as they scroll. 2. Navigation arrows: left (‹) and right (›) arrow buttons fixed at the sides of the promenade. Clicking navigates to the previous/next panel using `scrollBy`. The left arrow is hidden on the first panel; the right arrow on the last panel. 3. Panel design: each panel is a two-column layout (text left, illustration/screenshot right on desktop; stacked on mobile). Text: feature name in large heading, description paragraph (max 60 words), secondary stat ("Used by 4,200 teams"), and a CTA button. Illustration: a colorful gradient placeholder or SVG icon. 4. Dot indicators: a row of dots at the bottom of the promenade — one per panel. Active panel dot is wider and filled. Clicking a dot jumps to that panel. An `IntersectionObserver` watches which panel is in view to sync the dots. 5. Autoplay: optional autoplay — advance to the next panel every 6 seconds if the user hasn't manually interacted. Pause on hover/focus. Resume 3 seconds after the last interaction. 6. Counter: "Feature 2 of 5" text between the arrows. Updates as the user promenades through panels. Starter CSS: ```css .promenade-wrapper { position:relative; overflow:hidden; } .promenade-track { display:flex; overflow-x:scroll; scroll-snap-type:x mandatory; scroll-behavior:smooth; -ms-overflow-style:none; scrollbar-width:none; } .promenade-track::-webkit-scrollbar { display:none; } .promenade-panel { min-width:100%; flex-shrink:0; scroll-snap-align:start; display:grid; grid-template-columns:1fr 1fr; align-items:center; gap:60px; padding:80px 80px; min-height:70vh; } @media(max-width:768px) { .promenade-panel { grid-template-columns:1fr; padding:40px 24px; min-height:auto; } } .promenade-nav { position:absolute; top:50%; transform:translateY(-50%); background:rgba(255,255,255,.9); border:none; border-radius:50%; width:48px; height:48px; font-size:1.4rem; cursor:pointer; box-shadow:0 4px 12px rgba(0,0,0,.1); } .promenade-nav.prev { left:16px; } .promenade-nav.next { right:16px; } .promenade-dots { display:flex; gap:6px; justify-content:center; padding:16px; } .promenade-dot { width:8px; height:8px; border-radius:4px; background:#d1d5db; transition:width .3s,background .3s; cursor:pointer; } .promenade-dot.active { width:24px; background:#6366f1; }
View →

🎯 Learning Progress

0 / 6 completed
🧠 Practice with Quiz