diff --git a/src/components/Back/Back.scss b/src/components/Back/Back.scss index 892426d0..2937feaf 100644 --- a/src/components/Back/Back.scss +++ b/src/components/Back/Back.scss @@ -1,7 +1,7 @@ .Back { display: flex; align-items: center; - color: #3a3a3a; + color: inherit; transition: all 0.15s; font-weight: 600; font-size: 0.85rem; @@ -15,6 +15,6 @@ } &:hover { - background-color: #f0f0f0; + background-color: inherit; } } diff --git a/src/components/MultipleChoiceQuestion/MultipleChoiceQuestionOption.scss b/src/components/MultipleChoiceQuestion/MultipleChoiceQuestionOption.scss index 9e44a39e..839e05fd 100644 --- a/src/components/MultipleChoiceQuestion/MultipleChoiceQuestionOption.scss +++ b/src/components/MultipleChoiceQuestion/MultipleChoiceQuestionOption.scss @@ -6,7 +6,7 @@ border-style: solid; border-radius: 0.6rem; border-width: 0.1rem; - border-color: #c0c0c07f; + border-color: #4e4e4e7f; margin: 1rem 0rem; transition: all 0.15s; @@ -16,16 +16,16 @@ &:hover { &[data-interactive="true"] { - background-color: #ededed; - &[data-selected="false"] { - cursor: pointer; - } + background-color: #474747; + } + &[data-selected="false"] { + cursor: pointer; } } &[data-revealed="false"] { &[data-selected="true"] { - background-color: #eaeaea; + background-color: #474747; } } diff --git a/src/components/Page/Page.astro b/src/components/Page/Page.astro index b9cfe89a..3fbcfd72 100644 --- a/src/components/Page/Page.astro +++ b/src/components/Page/Page.astro @@ -1,7 +1,43 @@ --- import "./Page.scss"; +import ThemeIcon from "../ThemeIcon/ThemeIcon.astro"; ---
+
+ + diff --git a/src/components/Page/Page.scss b/src/components/Page/Page.scss index ce0bb4a6..a81264e9 100644 --- a/src/components/Page/Page.scss +++ b/src/components/Page/Page.scss @@ -10,3 +10,21 @@ $layout-width-inner-spacing-base: 1rem; $layout-width-inner-spacing-base ); } + +#themeToggle { + border: 0; + background: none; +} +.sun { + fill: black; +} +.moon { + fill: transparent; +} + +:global(.dark) .sun { + fill: transparent; +} +:global(.dark) .moon { + fill: white; +} diff --git a/src/components/RowCard/RowCard.scss b/src/components/RowCard/RowCard.scss index e2cdf107..e5b052fa 100644 --- a/src/components/RowCard/RowCard.scss +++ b/src/components/RowCard/RowCard.scss @@ -3,10 +3,10 @@ align-items: center; justify-content: space-between; gap: 0.75rem; - color: black; + color: inherit; border-radius: 0.6rem; border-width: 0.1rem; - border-color: #f1f1f1; + border-color: inherit; border-style: solid; padding: 0.2rem 0.6rem; transition: all 0.2s; @@ -15,7 +15,7 @@ cursor: grab; &:hover { - background-color: rgba(248, 248, 248, 0.753); + background-color: rgba(107, 107, 107, 0.753); .RowCard__icon { color: #e30614; } @@ -28,7 +28,7 @@ } &__icon { - background-color: #f2f2f2; + background-color: inherit; padding: 0.3rem 0.6rem; border-radius: 0.5rem; font-size: 1.4rem; diff --git a/src/components/Sidebar/Sidebar.scss b/src/components/Sidebar/Sidebar.scss index e0c32a97..7805bb6d 100644 --- a/src/components/Sidebar/Sidebar.scss +++ b/src/components/Sidebar/Sidebar.scss @@ -4,7 +4,7 @@ width: 14rem; height: 100vh; overflow: hidden; - background-color: #fafafa; + background-color: inherit; border-right: 0.1rem solid #f3f3f3; display: flex; padding: 0.5rem; @@ -26,7 +26,7 @@ padding-top: -0.3rem; font-size: 0.9rem; font-weight: 600; - color: #000000; + color: inherit; } &__sections { @@ -48,7 +48,7 @@ &--enabled { cursor: pointer; &:hover { - background-color: #f0f0f0; + background-color: inherit; .Sidebar__item__icon { color: #e30614; } @@ -61,19 +61,19 @@ } &--active { - background-color: #f3f3f3; + background-color: inherit; } &__icon { font-size: 1.5rem; - color: #000000; + color: inherit; } &__title { padding-left: 0.75rem; font-size: 1rem; font-weight: 500; - color: #000000; + color: inherit; } } @@ -97,38 +97,9 @@ width: 100vw; z-index: 1; position: fixed; - background-color: #ffffff; + background-color: inherit; bottom: 0; justify-content: center; border-top-width: 0.1rem; border-color: #f1f1f1; - border-style: solid; - @media (max-width: 768px) { - display: flex; - } - - &__inner { - display: flex; - justify-content: space-between; - min-width: 14rem; - padding: 0.5rem; - gap: 1rem; - } -} - -@media (max-width: 768px) { - .Sidebar__item { - flex-direction: column; - justify-content: center; - gap: 0.3rem; - min-width: 3rem; - } - .Sidebar__item__icon { - font-size: 2rem; - } - .Sidebar__item__title { - font-size: 0.6rem; - padding-left: 0rem; - text-align: center; - } } diff --git a/src/components/Them b/src/components/Them new file mode 100644 index 00000000..e69de29b diff --git a/src/components/ThemeIcon/ThemeIcon.astro b/src/components/ThemeIcon/ThemeIcon.astro new file mode 100644 index 00000000..4646bcd9 --- /dev/null +++ b/src/components/ThemeIcon/ThemeIcon.astro @@ -0,0 +1,18 @@ +--- +import "./ThemeIcon.scss"; +--- + +
+ + + + +
diff --git a/src/components/ThemeIcon/ThemeIcon.scss b/src/components/ThemeIcon/ThemeIcon.scss new file mode 100644 index 00000000..2cbca430 --- /dev/null +++ b/src/components/ThemeIcon/ThemeIcon.scss @@ -0,0 +1,17 @@ +#themeToggle { + border: 0; + background: none; +} +.sun { + fill: black; +} +.moon { + fill: transparent; +} + +:global(.light-mode) .sun { + fill: transparent; +} +:global(.dark-mode) .moon { + fill: white; +} diff --git a/src/layouts/Base/Base.scss b/src/layouts/Base/Base.scss index f0729ddb..b321b259 100644 --- a/src/layouts/Base/Base.scss +++ b/src/layouts/Base/Base.scss @@ -5,25 +5,29 @@ body { a { text-decoration: none; - color: #e30614; + color: inherit; } :root { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; +} - /* color-scheme: light dark; */ - // background-color: #1f2023; // var(--color-background); - // color: #1f2023; //var(--color-foreground); +.light-mode { + --color: #000000; + --color-background: #ffffff; + --color-foreground: #000000; + --color-accent: #5c6ac4; +} - // --color-background: #ffffff; - // --color-foreground: #1f2023; - // --color-accent: #5c6ac4; +.dark-mode { + --color: #ffffff; + --color-background: #000000; + --color-foreground: #ffffff; + --color-accent: #5c6ac4; } -// @media (prefers-color-scheme: light) { -// :root { -// --color-background: #1f2023; -// --color-foreground: #ffffff; -// } -// } +body { + background-color: var(--color-background); + color: var(--color); +}