From 5b1aea4df5da58cb8fed1e432dadb588572cf954 Mon Sep 17 00:00:00 2001 From: Dallas Hoffman Date: Wed, 27 Sep 2023 00:22:37 -0400 Subject: [PATCH] Splash screen effect --- src/app.scss | 37 +++++++++++++++++++++++++++++-------- src/routes/+page.svelte | 6 +++++- static/favicon.svg | 1 + 3 files changed, 35 insertions(+), 9 deletions(-) create mode 100755 static/favicon.svg diff --git a/src/app.scss b/src/app.scss index 48e0ec0..e35bba4 100644 --- a/src/app.scss +++ b/src/app.scss @@ -24,6 +24,35 @@ --code-color: hsl(205 30% 30%); } +html { + min-height: 100vh; + background-image: url('/favicon.svg'); + background-color: var(--card-sectionning-background-color); + background-size: min(20vw, 150px); + background-position: center center; + background-repeat: no-repeat; + + &[data-theme] { + background-image: none; + } + + &.modal-is-open { + scrollbar-gutter: stable; + } +} + +body { + background-color: var(--background-color); + + html[data-theme] & { + min-height: 100vh; + } + + &:has(.bytemd-fullscreen) { + overflow: hidden; + } +} + h1, h2, h3, @@ -63,14 +92,6 @@ ol > li { list-style: decimal; } -html.modal-is-open { - scrollbar-gutter: stable; -} - -body:has(.bytemd-fullscreen) { - overflow: hidden; -} - .bytemd { --editor-bg: hsl(0 0% 100% / 0.1); --editor-text: black; diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index b0dff0b..e6878d6 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -28,6 +28,10 @@ diff --git a/static/favicon.svg b/static/favicon.svg new file mode 100755 index 0000000..3e7e686 --- /dev/null +++ b/static/favicon.svg @@ -0,0 +1 @@ + \ No newline at end of file