fix(home): drop greeting date; fix touch scroll; tokenize TopBar icons
Some checks failed
Deploy / deploy (push) Has been cancelled
Some checks failed
Deploy / deploy (push) Has been cancelled
- Removes the date label from the greeting row (user request — тoo dense on tablet and redundant with TopBar clock). - Scrolling: drops overflowY: auto on the inner Events/Notes cards and removes flex: 1 / minHeight: 0 from their grid. On iPad-class touch nested scroll containers fought the root scroll; now only the root scrolls, which the browser handles natively. - TopBar: replaces hardcoded rgba(255,255,255,X) on sensor icons, chip background, chip border and header bottom-border with semantic tokens (--text-tertiary, --surface-2, --border-subtle, --hairline) so the thermometer/humidity/wind icons are visible in light theme.
This commit is contained in:
29
app/page.tsx
29
app/page.tsx
@@ -424,22 +424,13 @@ function HomeTab({ weather, sensors }: { weather: WeatherData | null; sensors: S
|
||||
padding: '18px 22px 24px',
|
||||
display: 'flex', flexDirection: 'column', gap: 14,
|
||||
}}>
|
||||
{/* ───── Greeting row ───── */}
|
||||
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 16 }}>
|
||||
<h1 style={{
|
||||
fontSize: 28, fontWeight: 800, color: 'var(--text-primary)',
|
||||
letterSpacing: '-0.6px', margin: 0, lineHeight: 1.1,
|
||||
}}>
|
||||
{greeting} <span style={{ fontSize: 26 }}>👋</span>
|
||||
</h1>
|
||||
<div style={{
|
||||
fontSize: 12, color: 'var(--text-secondary)', fontWeight: 600,
|
||||
textTransform: 'capitalize', textAlign: 'right',
|
||||
letterSpacing: '-0.1px',
|
||||
}}>
|
||||
{new Date().toLocaleDateString('ru-RU', { weekday: 'long', day: 'numeric', month: 'long' })}
|
||||
</div>
|
||||
</div>
|
||||
{/* ───── Greeting ───── */}
|
||||
<h1 style={{
|
||||
fontSize: 28, fontWeight: 800, color: 'var(--text-primary)',
|
||||
letterSpacing: '-0.6px', margin: 0, lineHeight: 1.1,
|
||||
}}>
|
||||
{greeting} <span style={{ fontSize: 26 }}>👋</span>
|
||||
</h1>
|
||||
|
||||
{/* ───── Bento row: Hero weather + Tram ───── */}
|
||||
<div style={{ display: 'grid', gridTemplateColumns: '1fr 1.1fr', gap: 14, minHeight: 230 }}>
|
||||
@@ -577,10 +568,10 @@ function HomeTab({ weather, sensors }: { weather: WeatherData | null; sensors: S
|
||||
)}
|
||||
|
||||
{/* ───── Events + Notes row ───── */}
|
||||
<div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 14, flex: 1, minHeight: 0 }}>
|
||||
<div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 14 }}>
|
||||
|
||||
{/* Events — today + tomorrow in one card */}
|
||||
<div className="card" style={{ padding: '18px 20px', display: 'flex', flexDirection: 'column', gap: 14, overflowY: 'auto' }}>
|
||||
<div className="card" style={{ padding: '18px 20px', display: 'flex', flexDirection: 'column', gap: 14 }}>
|
||||
{/* Today */}
|
||||
<div>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 8, marginBottom: 10 }}>
|
||||
@@ -659,7 +650,7 @@ function HomeTab({ weather, sensors }: { weather: WeatherData | null; sensors: S
|
||||
</div>
|
||||
|
||||
{/* Notes */}
|
||||
<div className="card" style={{ padding: '18px 20px', display: 'flex', flexDirection: 'column', gap: 12, overflowY: 'auto' }}>
|
||||
<div className="card" style={{ padding: '18px 20px', display: 'flex', flexDirection: 'column', gap: 12 }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
|
||||
<StickyNote size={13} color="var(--text-secondary)" />
|
||||
<span style={{ fontSize: 10, color: 'var(--text-secondary)', textTransform: 'uppercase', letterSpacing: '0.1em', fontWeight: 700 }}>Заметки</span>
|
||||
|
||||
Reference in New Issue
Block a user