Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2.1 KiB
Mini Program Script Home Cosmic Background Implementation Plan
For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (
- [ ]) syntax for tracking.
Goal: Center the script generation headline and add subtle cosmic background motion without interfering with the page content.
Architecture: Add a decorative background layer inside ScriptView.vue and keep all interactive content above it. Use CSS-only planets, star speckles, and meteors so no assets or runtime logic are needed.
Tech Stack: Vue 3 single-file component, uni-app mini-program build, scoped CSS animations.
Task 1: Add Background Layer
Files:
-
Modify:
mini-program/src/pages/main/ScriptView.vue -
Add a non-interactive
cosmic-backgroundview as the first child of.script-view. -
Add child views for two planets, two star fields, and three meteors.
-
Ensure the decorative layer has no event handlers.
Task 2: Fix Layering and Headline Alignment
Files:
-
Modify:
mini-program/src/pages/main/ScriptView.vue -
Set
.script-viewtoposition: relativeandoverflow: hidden. -
Set
.wish-home,.generation-view, and.result-viewtoposition: relative; z-index: 1. -
Center
.hero-copywithjustify-content: centerandtext-align: center. -
Increase the spacing under
.hero-copyso the inspiration section breathes.
Task 3: Add Cosmic Styling
Files:
-
Modify:
mini-program/src/pages/main/ScriptView.vue -
Style
.cosmic-backgroundwith absolute positioning, low opacity, andpointer-events: none. -
Style planet elements with radial gradients and slow drift animations.
-
Style meteor elements with diagonal motion and staggered animation delays.
-
Style star fields with low-contrast radial gradients.
Task 4: Validate
Commands:
-
cd mini-program && npm run build:mp-weixin -
git diff --check -
Mini-program build passes.
-
Diff check reports no new whitespace errors.