diff --git a/CHANGELOG.md b/CHANGELOG.md index 8eb8b5b..e9d3a61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2 +1,5 @@ Fixed: -- Weird pill-shaped background on Playlist pages title (#137) \ No newline at end of file +- Weird pill-shaped background on Playlist pages title (#137) + +Improved: +- Changed default `sidebar` color to be darker, so you won't get flashed green on startup \ No newline at end of file diff --git a/src/js/Loader.js b/src/js/Loader.js index f318fbb..dbefd4b 100644 --- a/src/js/Loader.js +++ b/src/js/Loader.js @@ -5,17 +5,20 @@ export default class Loader { constructor() { this.#container = document.createElement("div"); this.#container.id = "dribbblish-loader"; - this.#container.innerHTML = ` - - - + this.#container.innerHTML = /* html */ ` +
+ + + + Loading... +
`; document.body.appendChild(this.#container); } show(text) { - this.#container.setAttribute("text", text ?? ""); + this.#container.querySelector("span").innerText = text ?? ""; this.#container.setAttribute("active", ""); } diff --git a/src/styles/Colors.scss b/src/styles/Colors.scss index e948dc9..a39fc86 100644 --- a/src/styles/Colors.scss +++ b/src/styles/Colors.scss @@ -3,7 +3,7 @@ $colors: ( subtext: #f0f0f0, sidebar-text: #ffffff, main: #000000, - sidebar: #1ed760, + sidebar: #121212, player: #000000, card: #000000, shadow: #202020, diff --git a/src/styles/Loader.scss b/src/styles/Loader.scss index 8329155..9a447eb 100644 --- a/src/styles/Loader.scss +++ b/src/styles/Loader.scss @@ -14,6 +14,8 @@ $duration: 1.4s; pointer-events: none; opacity: 0; transition: opacity 1s ease-in; + color: spiceColor("subtext"); + @include spiceFont("glue", 32px, "Bold"); &[active] { opacity: 1; @@ -21,6 +23,7 @@ $duration: 1.4s; } &::before { + z-index: -1; content: ""; position: absolute; inset: 0px; @@ -28,23 +31,22 @@ $duration: 1.4s; backdrop-filter: blur(10px); } - &::after { - content: attr(text); - position: absolute; - bottom: 40%; - color: spiceColor("subtext"); - @include spiceFont("glue", 32px, "Bold"); - } + & > div { + display: flex; + flex-direction: column; + gap: 16px; + align-items: center; - svg { - animation: rotator $duration linear infinite; + svg { + animation: rotator $duration linear infinite; - circle { - stroke: spiceColor("sidebar"); - stroke-dasharray: $offset; - stroke-dashoffset: 0; - transform-origin: center; - animation: dash $duration ease-in-out infinite; + circle { + stroke: spiceColor("text"); + stroke-dasharray: $offset; + stroke-dashoffset: 0; + transform-origin: center; + animation: dash $duration ease-in-out infinite; + } } } }