Skip to content

best way to save what you love

web: use conditionals instead of special classes where it makes sense

dumbmorond170f619d2d1
diff --git a/web/src/components/misc/NotchSticker.svelte b/web/src/components/misc/NotchSticker.svelte
index 84c3cc76..7dd45af2 100644
--- a/web/src/components/misc/NotchSticker.svelte
+++ b/web/src/components/misc/NotchSticker.svelte
@@ -39,9 +39,11 @@
}
</script>
-<div id="cobalt-notch-sticker" aria-hidden="true" class={state}>
- <CobaltSticker />
-</div>
+{#if state !== "hidden"}
+ <div id="cobalt-notch-sticker" aria-hidden="true" class={state}>
+ <CobaltSticker />
+ </div>
+{/if}
<style>
#cobalt-notch-sticker {
@@ -54,10 +56,6 @@
z-index: 999;
}
- #cobalt-notch-sticker.hidden {
- display: none;
- }
-
#cobalt-notch-sticker.island {
padding-top: 15px;
}
diff --git a/web/src/routes/settings/+layout.svelte b/web/src/routes/settings/+layout.svelte
index a8d795ef..b76b3f8d 100644
--- a/web/src/routes/settings/+layout.svelte
+++ b/web/src/routes/settings/+layout.svelte
@@ -134,9 +134,11 @@
</nav>
</div>
- <main id="settings-page-content" class:hidden-mobile={isMobile && isHome}>
- <slot></slot>
- </main>
+ {#if !isMobile || !isHome}
+ <main id="settings-page-content">
+ <slot></slot>
+ </main>
+ {/if}
</div>
<style>
@@ -212,10 +214,6 @@
width: 22px;
}
- .hidden-mobile {
- display: none !important;
- }
-
@media screen and (max-width: 750px) {
#settings-page {
--settings-nav-width: 100%;