Skip to content

Commit

Permalink
Merge pull request #15 from grzegorzxpatyk/develop
Browse files Browse the repository at this point in the history
Merge develop into main: fix css styling and clean up code
  • Loading branch information
grzegorzxpatyk committed Oct 8, 2023
2 parents 31598b4 + e01296f commit 3c856b5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/lib/components/contact.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
let isMediumScreen: boolean | undefined;
const markIsMedium = () => {
console.log(window.innerWidth);
if (window.innerWidth > 768 && window.innerWidth < 1350) {
isMediumScreen = true;
} else {
Expand Down
2 changes: 0 additions & 2 deletions src/lib/components/themeSwitch.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
theme.set(localStorage?.theme);
theme.subscribe((value) => {
console.log(value);
localStorage.theme = value;
switch (value) {
case 'dark':
Expand All @@ -50,7 +49,6 @@
window
.matchMedia('(prefers-color-scheme: dark)')
.addEventListener('change', (event) => {
console.log(event);
if (localStorage.theme !== 'OSDefault') {
return;
}
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/themeSwitchButton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
<Sun size={16} />
{/if}
</button>
<label for="theme-{variant}-switch" class="{isLabelVisible ? 'absolute' : 'hidden'} top-16 p-2 dark:bg-zinc-300 dark:bg-opacity-50 bg-zinc-200 bg-opacity-50 rounded-md font-semibold text-sm w-full text-center">
<label for="theme-{variant}-switch" class="{isLabelVisible ? 'block' : 'hidden'} absolute top-16 p-2 dark:bg-zinc-300 dark:bg-opacity-50 bg-zinc-200 bg-opacity-50 rounded-md font-semibold text-sm w-full text-center ">
{#if isActive}
OSDefault
OS Default
{:else}
{variant} theme
{/if}
Expand Down

0 comments on commit 3c856b5

Please sign in to comment.