Seven particle-based progress cards (hour, day, week, month, year, summer, fall) with work-time mode toggle and bridge days support. Light elegant design with accumulating particle animation. Express server proxies dagsmart.se API.
191 lines
3.2 KiB
CSS
191 lines
3.2 KiB
CSS
*, *::before, *::after {
|
|
box-sizing: border-box;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
:root {
|
|
--bg: #f7f6f2;
|
|
--border: rgba(0, 0, 0, 0.07);
|
|
--text: #1a1a1a;
|
|
--text-muted: #aaa;
|
|
--text-secondary: #666;
|
|
--header-height: 52px;
|
|
}
|
|
|
|
html, body {
|
|
height: 100%;
|
|
background: var(--bg);
|
|
font-family: 'Inter', system-ui, sans-serif;
|
|
font-weight: 300;
|
|
color: var(--text);
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* ── Header ─────────────────────────────────────── */
|
|
header {
|
|
height: var(--header-height);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
padding: 0 32px;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
.toggles {
|
|
display: flex;
|
|
gap: 28px;
|
|
align-items: center;
|
|
}
|
|
|
|
.toggle {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
cursor: pointer;
|
|
user-select: none;
|
|
}
|
|
|
|
.toggle input {
|
|
display: none;
|
|
}
|
|
|
|
.track {
|
|
position: relative;
|
|
width: 40px;
|
|
height: 22px;
|
|
background: #ddd;
|
|
border-radius: 11px;
|
|
transition: background 0.2s ease;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.track::after {
|
|
content: '';
|
|
position: absolute;
|
|
width: 16px;
|
|
height: 16px;
|
|
background: white;
|
|
border-radius: 50%;
|
|
top: 3px;
|
|
left: 3px;
|
|
transition: left 0.2s ease;
|
|
box-shadow: 0 1px 3px rgba(0,0,0,0.15);
|
|
}
|
|
|
|
.toggle input:checked + .track {
|
|
background: #1a1a1a;
|
|
}
|
|
|
|
.toggle input:checked + .track::after {
|
|
left: 21px;
|
|
}
|
|
|
|
.toggle-label {
|
|
font-size: 12px;
|
|
letter-spacing: 0.04em;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
#bridgeDaysLabel {
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transition: opacity 0.2s ease;
|
|
}
|
|
|
|
#bridgeDaysLabel.visible {
|
|
opacity: 1;
|
|
pointer-events: all;
|
|
}
|
|
|
|
/* ── Cards ───────────────────────────────────────── */
|
|
#cards {
|
|
height: calc(100vh - var(--header-height));
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.card {
|
|
position: relative;
|
|
flex: 1;
|
|
border-bottom: 1px solid var(--border);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.card:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.card canvas {
|
|
position: absolute;
|
|
inset: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.card-content {
|
|
position: absolute;
|
|
inset: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 0 32px;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.card-name {
|
|
font-size: 11px;
|
|
font-weight: 400;
|
|
letter-spacing: 0.12em;
|
|
text-transform: uppercase;
|
|
color: var(--text-muted);
|
|
transition: color 0.4s ease;
|
|
}
|
|
|
|
.card-remaining {
|
|
font-size: 13px;
|
|
font-weight: 300;
|
|
color: var(--text-secondary);
|
|
transition: color 0.4s ease;
|
|
}
|
|
|
|
/* State variants */
|
|
.card.state-not-work-time .card-name,
|
|
.card.state-not-work-time .card-remaining {
|
|
color: #ccc;
|
|
}
|
|
|
|
.card.state-summer .card-name {
|
|
color: #c4902a;
|
|
}
|
|
|
|
.card.state-summer .card-remaining {
|
|
color: #c4902a;
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.card.state-off-season .card-name,
|
|
.card.state-off-season .card-remaining {
|
|
color: #b0b8c8;
|
|
}
|
|
|
|
/* Loading state */
|
|
#loading {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: var(--bg);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 12px;
|
|
letter-spacing: 0.08em;
|
|
color: var(--text-muted);
|
|
z-index: 100;
|
|
transition: opacity 0.5s ease;
|
|
}
|
|
|
|
#loading.hidden {
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
}
|