fix incons

This commit is contained in:
Vincent van der Wal
2026-08-03 11:05:34 +02:00
parent f66e259e32
commit 9fc17e7417
13 changed files with 384 additions and 39 deletions
@@ -6,7 +6,7 @@
import * as m from '$lib/paraglide/messages';
import { getTempStyle } from '../../utils/colors';
import { getWeatherIconName } from '../../utils/weather-codes';
import { getWeatherDescription, getWeatherIconName } from '../../utils/weather-codes';
import { precipIsSignificant, sunIsSignificant, windIsSignificant } from './significance';
import { type FetchedDaily, type WeatherUnits, getWindArrowRotation } from './types';
@@ -196,6 +196,7 @@
height="100px"
style="filter: url(#thin-day-icon)"
>
<title>{getWeatherDescription(dayCode)}</title>
<use
xlink:href="/images/weather-icons/{getWeatherIconName(
dayCode,
@@ -208,6 +209,7 @@
width="42px"
height="42px"
>
<title>{getWeatherDescription(nightCode)}</title>
<use
xlink:href="/images/weather-icons/{getWeatherIconName(
nightCode,
@@ -7,7 +7,7 @@
import * as m from '$lib/paraglide/messages';
import { getTempStyle } from '../../utils/colors';
import { getWeatherIconName } from '../../utils/weather-codes';
import { getWeatherDescription, getWeatherIconName } from '../../utils/weather-codes';
import {
getSunshineColor,
getSunshinePercent,
@@ -276,6 +276,7 @@
<div class="icon-row flex w-full items-center justify-center">
<div class="icon-wrap">
<svg class="day-icon fill-foreground">
<title>{getWeatherDescription(dayCode)}</title>
<use
xlink:href="/images/weather-icons/{getWeatherIconName(
dayCode,
@@ -285,6 +286,7 @@
</svg>
</div>
<svg class="night-icon self-end fill-foreground/60">
<title>{getWeatherDescription(nightCode)}</title>
<use
xlink:href="/images/weather-icons/{getWeatherIconName(
nightCode,
@@ -16,7 +16,7 @@
import * as m from '$lib/paraglide/messages';
import { getTempStyle } from '../../utils/colors';
import { getWeatherIconName } from '../../utils/weather-codes';
import { getWeatherDescription, getWeatherIconName } from '../../utils/weather-codes';
import {
type FetchedDaily,
type FetchedHourly,
@@ -425,8 +425,9 @@
});
</script>
{#snippet weatherIcon(name: string, size: number = 16)}
{#snippet weatherIcon(name: string, size: number = 16, description: string = '')}
<svg class="inline-block fill-foreground" width={size} height={size}>
{#if description}<title>{description}</title>{/if}
<use xlink:href="/images/weather-icons/{name}.svg#Layer_1"></use>
</svg>
{/snippet}
@@ -678,7 +679,11 @@
!cellData[i + 1].isDaytime}
>
{#if finite(wCode)}
{@render weatherIcon(getWeatherIconName(wCode, cell.isDaytime), iconPx)}
{@render weatherIcon(
getWeatherIconName(wCode, cell.isDaytime),
iconPx,
getWeatherDescription(wCode)
)}
{/if}
</td>
{/each}
@@ -9,7 +9,7 @@
import { type NearbyCity, findNearbyCities } from '$lib/services/nearby-cities';
import { type NearbyDaily, fetchNearbyDaily } from '$lib/services/weather';
import { getWeatherIconName } from '../../utils/weather-codes';
import { getWeatherDescription, getWeatherIconName } from '../../utils/weather-codes';
import type { UnitPrefs } from '$lib/stores/settings';
@@ -113,6 +113,7 @@
>
<svg class="shrink-0 fill-foreground/80" width="34px" height="34px">
{#if day}
<title>{getWeatherDescription(day.weatherCode)}</title>
<use
xlink:href="/images/weather-icons/{getWeatherIconName(
day.weatherCode,