about/static/css/plugin-health.css

264 lines
4.9 KiB
CSS

.health-section {
--health-steps: #4ade80;
--health-calories: #f97316;
--health-workout: #8b5cf6;
--health-sleep: #6366f1;
--health-heart: #ef4444;
--health-hydration: #06b6d4;
}
.health-section .plugin-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12px;
}
.health-updated {
font-size: 11px;
color: var(--muted);
font-family: var(--mono);
}
.health-grid {
display: grid;
grid-template-columns:repeat(2, minmax(0, 1fr));
gap: 6px;
}
.health-card {
display: flex;
flex-direction: row;
align-items: center;
gap: 8px;
padding: 6px 8px;
border-radius: 8px;
background: transparent;
border: 1px solid var(--edge-0);
min-width: 0;
overflow: hidden;
transition: border-color .15s ease;
}
.health-card:hover {
border-color: var(--edge-1);
}
.health-card-icon {
width: 28px;
height: 28px;
min-width: 28px;
max-width: 28px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 6px;
flex-shrink: 0;
}
.health-card-icon svg {
width: 14px;
height: 14px;
flex-shrink: 0;
}
.health-card--steps .health-card-icon {
background: rgba(74, 222, 128, 0.12);
}
.health-card--steps .health-card-icon svg {
fill: #4ade80;
}
.health-card--calories .health-card-icon {
background: rgba(249, 115, 22, 0.12);
}
.health-card--calories .health-card-icon svg {
fill: #f97316;
}
.health-card--workouts .health-card-icon {
background: rgba(139, 92, 246, 0.12);
}
.health-card--workouts .health-card-icon svg {
fill: #8b5cf6;
}
.health-card--sleep .health-card-icon {
background: rgba(99, 102, 241, 0.12);
}
.health-card--sleep .health-card-icon svg {
fill: #6366f1;
}
.health-card--heart .health-card-icon {
background: rgba(239, 68, 68, 0.12);
}
.health-card--heart .health-card-icon svg {
fill: #ef4444;
}
.health-card--hydration .health-card-icon {
background: rgba(6, 182, 212, 0.12);
}
.health-card--hydration .health-card-icon svg {
fill: #06b6d4;
}
.health-card-content {
flex: 1;
min-width: 0;
overflow: hidden;
display: flex;
flex-direction: column;
}
.health-card-value {
font-size: 13px;
font-weight: 700;
line-height: 1.2;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.health-card-label {
font-size: 9px;
font-weight: 600;
color: var(--ink-2);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
text-transform: uppercase;
letter-spacing: .2px;
}
.health-card-sub {
font-size: 9px;
color: var(--muted);
font-family: var(--mono);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.health-card--steps .health-card-value {
color: var(--health-steps);
}
.health-card--calories .health-card-value {
color: var(--health-calories);
}
.health-card--workouts .health-card-value {
color: var(--health-workout);
}
.health-card--sleep .health-card-value {
color: var(--health-sleep);
}
.health-card--heart .health-card-value {
color: var(--health-heart);
}
.health-card--hydration .health-card-value {
color: var(--health-hydration);
}
.health-card-value.updated {
animation: health-pulse .4s ease;
}
@keyframes health-pulse {
0% {
transform: scale(1);
}
50% {
transform: scale(1.05);
}
100% {
transform: scale(1);
}
}
.health-heartbeat {
--heartbeat-duration: 857ms;
display: block;
}
.health-heartbeat.beating {
animation: heartbeat-pulse var(--heartbeat-duration) ease-out;
}
@keyframes heartbeat-pulse {
0% {
transform: scale(1);
}
15% {
transform: scale(1.2);
fill: #ff4444;
}
30% {
transform: scale(1);
}
45% {
transform: scale(1.15);
fill: #ff6666;
}
60% {
transform: scale(1);
}
100% {
transform: scale(1);
}
}
@media (min-width: 1100px) {
.health-section[data-w="2"] .health-grid,
.health-section[data-w="3"] .health-grid {
grid-template-columns:repeat(4, minmax(0, 1fr));
}
}
@media (max-width: 520px) {
.health-grid {
grid-template-columns:1fr;
}
}
@media (prefers-color-scheme: light) {
.health-card {
border: 1px solid var(--edge-1);
}
.health-card--steps .health-card-icon {
background: rgba(74, 222, 128, 0.1);
}
.health-card--calories .health-card-icon {
background: rgba(249, 115, 22, 0.1);
}
.health-card--workouts .health-card-icon {
background: rgba(139, 92, 246, 0.1);
}
.health-card--sleep .health-card-icon {
background: rgba(99, 102, 241, 0.1);
}
.health-card--heart .health-card-icon {
background: rgba(239, 68, 68, 0.1);
}
.health-card--hydration .health-card-icon {
background: rgba(6, 182, 212, 0.1);
}
}