alignment and now
This commit is contained in:
@@ -489,8 +489,8 @@
|
||||
/* full state only: gap above the icons, and the day / night icon offsets
|
||||
that tighten the pair around the cell centre */
|
||||
--icon-gap-full: 2px;
|
||||
--day-icon-nudge: 2px;
|
||||
--night-icon-nudge: 4px;
|
||||
--day-icon-nudge: 3px;
|
||||
--night-icon-nudge: 0px;
|
||||
/* compact only: signed shift that lands the lone icon dead centre in the
|
||||
square tile (measured against the tile's mid-line) */
|
||||
--icon-lift: 1px;
|
||||
@@ -534,7 +534,7 @@
|
||||
--tmax-nudge: 0px;
|
||||
--tmin-nudge: 8px;
|
||||
--icon-gap-full: 6px;
|
||||
--day-icon-nudge: 3px;
|
||||
--day-icon-nudge: 4px;
|
||||
--night-icon-nudge: 6px;
|
||||
--pb-full: 10px;
|
||||
--pb-min: 3px;
|
||||
@@ -769,11 +769,11 @@
|
||||
and melts away completely when compact so the day icon re-centers. */
|
||||
.night-icon {
|
||||
display: block;
|
||||
width: calc(var(--icon) * 0.42 * var(--rel));
|
||||
height: calc(var(--icon) * 0.42 * var(--rel));
|
||||
width: calc(var(--icon) * 0.55 * var(--rel));
|
||||
height: calc(var(--icon) * 0.55 * var(--rel));
|
||||
opacity: var(--rel);
|
||||
margin-left: calc(-4px * var(--rel));
|
||||
margin-bottom: calc(6px * var(--rel));
|
||||
margin-bottom: calc(-4px * var(--rel));
|
||||
transform: translateX(calc(-1 * var(--night-icon-nudge) * var(--k)));
|
||||
}
|
||||
/* weekday centered when full, pushed to the edges when compact */
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
} from '$lib/stores/settings';
|
||||
|
||||
import { formatUtcOffset, formatZoned, getZonedHour, isSameDayInZone } from '$lib/utils/date';
|
||||
import { useNow } from '$lib/utils/now.svelte';
|
||||
|
||||
import { groupHover, setGroupHover } from '$lib/charts';
|
||||
import * as m from '$lib/paraglide/messages';
|
||||
@@ -74,7 +75,10 @@
|
||||
$storedVariablePrefs.table?.[key] ?? defaultVariablePrefs.table[key] ?? true
|
||||
);
|
||||
|
||||
const today = new Date();
|
||||
// Ticks every minute, so the NOW line/label and the highlighted current-hour
|
||||
// column keep up with the clock instead of freezing at page load.
|
||||
const clock = useNow();
|
||||
let today = $derived(clock.current);
|
||||
const tempUnit = $derived(getTempUnit(units));
|
||||
const windUnit = $derived(getWindUnit(units));
|
||||
const precipUnit = $derived(getPrecipUnit(units));
|
||||
|
||||
Reference in New Issue
Block a user