feat(02-05): add avatar images to welcome screen with emoji fallback
- Extend CompanionDefinition with avatarUrl field using Vite static imports - Replace emoji-only companion cards with avatar img + onerror emoji fallback - Add companion-card__avatar CSS (80px round) and companion-area styles (48px) - Add vite-env.d.ts for PNG import type declarations Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -109,6 +109,14 @@ h3 {
|
||||
background: var(--bg-forest);
|
||||
}
|
||||
|
||||
.companion-card__avatar {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-radius: 50%;
|
||||
object-fit: cover;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.companion-card__emoji {
|
||||
font-size: 3rem;
|
||||
}
|
||||
@@ -344,6 +352,32 @@ h3 {
|
||||
}
|
||||
}
|
||||
|
||||
/* Companion area (forest greeting + lesson avatar) */
|
||||
.companion-area {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
padding: 0.75rem 1rem;
|
||||
background: var(--bg-cream);
|
||||
border-radius: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.companion-area__avatar {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border-radius: 50%;
|
||||
object-fit: cover;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.companion-area__text {
|
||||
font-family: "Nunito", sans-serif;
|
||||
font-size: 1rem;
|
||||
color: var(--text-warm);
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
/* Keyboard */
|
||||
.keyboard {
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user