feat(01-02): welcome screen UI with onboarding flow
- Implement initWelcomeScreen with companion card rendering, layout toggle, start button - Update index.html with welcome screen structure (companion-grid, layout-toggle, start-btn) - Add CSS for companion cards, layout buttons, start button with hover/selected/disabled states - Selecting a companion enables start, clicking start saves progress to IndexedDB and navigates to forest Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -55,3 +55,109 @@ h3 {
|
||||
opacity: 1;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
/* Welcome screen */
|
||||
.welcome {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 2rem;
|
||||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.welcome h1 {
|
||||
font-family: "Quicksand", sans-serif;
|
||||
font-size: 2rem;
|
||||
color: var(--text-dark);
|
||||
}
|
||||
|
||||
.welcome__subtitle,
|
||||
.welcome__layout-label {
|
||||
font-size: 1.1rem;
|
||||
color: var(--text-warm);
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.welcome__companions {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 1rem;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.companion-card {
|
||||
background: white;
|
||||
border: 3px solid transparent;
|
||||
border-radius: 16px;
|
||||
padding: 1.5rem;
|
||||
cursor: pointer;
|
||||
transition: border-color 0.2s;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.companion-card:hover {
|
||||
border-color: var(--accent-gold);
|
||||
}
|
||||
|
||||
.companion-card--selected {
|
||||
border-color: var(--accent-green);
|
||||
background: var(--bg-forest);
|
||||
}
|
||||
|
||||
.companion-card__emoji {
|
||||
font-size: 3rem;
|
||||
}
|
||||
|
||||
.companion-card__name {
|
||||
font-family: "Quicksand", sans-serif;
|
||||
font-weight: 600;
|
||||
font-size: 1.2rem;
|
||||
color: var(--text-dark);
|
||||
}
|
||||
|
||||
.welcome__layout-toggle {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
.layout-btn {
|
||||
padding: 0.5rem 1.5rem;
|
||||
border-radius: 8px;
|
||||
border: 2px solid var(--text-light);
|
||||
background: white;
|
||||
cursor: pointer;
|
||||
font-family: "Nunito", sans-serif;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.layout-btn--active {
|
||||
background: var(--accent-green);
|
||||
color: white;
|
||||
border-color: var(--accent-green);
|
||||
}
|
||||
|
||||
.welcome__start-btn {
|
||||
margin-top: 1.5rem;
|
||||
padding: 1rem 3rem;
|
||||
border-radius: 12px;
|
||||
background: var(--accent-green);
|
||||
color: white;
|
||||
border: none;
|
||||
font-family: "Quicksand", sans-serif;
|
||||
font-weight: 700;
|
||||
font-size: 1.3rem;
|
||||
cursor: pointer;
|
||||
opacity: 1;
|
||||
transition: opacity 0.2s;
|
||||
}
|
||||
|
||||
.welcome__start-btn:disabled {
|
||||
opacity: 0.4;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user