Skip to content

Commit

Permalink
Add hard coded santa hat, increased snow flakes
Browse files Browse the repository at this point in the history
  • Loading branch information
stagrim committed Nov 30, 2023
1 parent d8c0b5f commit 3bcea07
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
numbers: true,
show_inactive_numbers: false,
winter: false,
santa: false,
true_binary_seconds: false,
info: "",
}
Expand All @@ -32,6 +33,7 @@
numbers: !$page.url.searchParams.has("numbers"),
show_inactive_numbers: $page.url.searchParams.has("show_inactive_numbers"),
winter: $page.url.searchParams.has("winter"),
santa: $page.url.searchParams.has("santa"),
true_binary_seconds: $page.url.searchParams.has("true_binary_seconds"),
info: $page.url.searchParams.get("info") ?? "",
}
Expand Down Expand Up @@ -73,7 +75,7 @@
</script>

{#if config.winter}
{#each Array(75) as i}
{#each Array(80) as i}
<div class="snow">{@html random_snowflake()}</div>
{/each}
{/if}
Expand Down Expand Up @@ -102,6 +104,9 @@
{:else}
{@const active = Boolean(Number.parseInt(unit))}
<div class="circle" class:secondary class:active class:show_inactive_numbers={config.show_inactive_numbers}>
{#if config.santa && i === 2 && j === 0}
<img src="/tomte.png" class="tomte" alt="">
{/if}
{#if config.numbers}
<div class="legend">{2 ** (5-j)}</div>
{/if}
Expand Down Expand Up @@ -244,14 +249,26 @@
.row {
display: flex;
flex-direction: column-reverse;
}
.circle {
height: min($diameter-vertical, $diameter-height-breakpoint-vertical);
width: $diameter-vertical;
max-width: $diameter-height-breakpoint-vertical;
}
.tomte {
height: min($diameter, $diameter-height-breakpoint);
}
}
.tomte {
width: min($diameter, $diameter-height-breakpoint + 0.3vw);
max-height: $diameter-height-breakpoint;
height: $diameter;
left: ($diameter / 2) - 3.2vw;
top: 46vh;
position: absolute;
}
// Snow effects
Expand All @@ -272,6 +289,7 @@
// filter: drop-shadow(0 0 10px white);
$total: 200;
position: absolute;
z-index: 10;
width: 10px;
height: 10px;
// background: white;
Expand Down Expand Up @@ -344,14 +362,14 @@
background: $inactive;
}
}
$hour-length: 20%;
#hour {
width: 5%;
height: $hour-length;
margin-top: -$hour-length;
}
$minute-length: 35%;
#minute {
width: 5%;
Expand Down
Binary file added static/tomte.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3bcea07

Please sign in to comment.