Skip to content

Commit

Permalink
Show rain in size L
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelroth committed Oct 2, 2023
1 parent f7a1cbb commit 599b24f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions client/src/lib/SingleDay.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
export let symbol;
export let dimensions;
export let currentTime;
export let rainInMM;
export let size;
const isNow = currentTime === "Jetzt";
const fontWeight = isNow ? "font-bold" : "font-light";
Expand All @@ -14,4 +16,7 @@
<div class={fontWeight}>{currentTime}</div>
<WeatherIcons {symbol} {dimensions} />
<div>{dailyTemp}°</div>
{#if size === "L"}
<div>{rainInMM}</div>
{/if}
</div>
6 changes: 4 additions & 2 deletions client/src/lib/WeatherOverview.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,18 @@
<SingleDay
currentTime={new Date(hours.date_time).toLocaleTimeString([], {
hour: "2-digit",
minute: "2-digit",
minute: "2-digit"
})}
symbol={hours.symbol_code}
dimensions="w-6 h-6"
dailyTemp={hours.TTT_C}
rainInMM={hours.RRR_MM}
{size}
/>
{/if}
{/each}
</div>
{:else if size === "L"}{/if}
{/if}
</div>

<style>
Expand Down

0 comments on commit 599b24f

Please sign in to comment.