From cbefc2644f594bd7c4ef62c430f4c5786491c060 Mon Sep 17 00:00:00 2001 From: Nikola Ganchev Date: Thu, 9 Nov 2023 11:18:55 +0200 Subject: [PATCH 1/2] Render properly when there are no announcements and an announcement doesn't have an href --- src/lib/Announcements.svelte | 11 +++++++++-- src/lib/Navbar.svelte | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/lib/Announcements.svelte b/src/lib/Announcements.svelte index 8256bed..5f9c68c 100644 --- a/src/lib/Announcements.svelte +++ b/src/lib/Announcements.svelte @@ -6,7 +6,11 @@
{#each announcements as announcement}
- {announcement.text}
+ {#if announcement.href} + {announcement.text}
+ {:else} + {announcement.text} + {/if}
{/each}
@@ -27,7 +31,6 @@ display: flex; justify-content: center; align-items: center; - pointer-events: auto; min-height: 28px; padding-left: 1rem; padding-right: 1rem; @@ -41,6 +44,10 @@ } .announcement a { + pointer-events: auto; + } + + .announcement a, .announcement span { font-family: 'Roboto', serif; font-weight: 300; font-size: 18px; diff --git a/src/lib/Navbar.svelte b/src/lib/Navbar.svelte index a8b4735..51a7ddd 100644 --- a/src/lib/Navbar.svelte +++ b/src/lib/Navbar.svelte @@ -58,7 +58,7 @@