💄 Update loading spinner to take currentColor

This commit is contained in:
James Panther
2025-06-22 14:29:22 +10:00
parent 5fa4fb1a42
commit 53a7374659
2 changed files with 21 additions and 21 deletions
+1
View File
@@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Added ### Added
- Loading spinner while populating search results ([#1025](https://github.com/jpanther/congo/pull/1025))
- New `canonicalUrl` parameter support in article front matter ([#1046](https://github.com/jpanther/congo/pull/1046)) - New `canonicalUrl` parameter support in article front matter ([#1046](https://github.com/jpanther/congo/pull/1046))
- New icons for `goodreads`, `podcast` and `rss` ([#1057](https://github.com/jpanther/congo/pull/1057), [#1072](https://github.com/jpanther/congo/pull/1072)) - New icons for `goodreads`, `podcast` and `rss` ([#1057](https://github.com/jpanther/congo/pull/1057), [#1072](https://github.com/jpanther/congo/pull/1072))
+20 -21
View File
@@ -74,40 +74,40 @@ input.onkeyup = function (event) {
<a class="flex items-center px-3 py-2 rounded-md appearance-none bg-neutral-100 dark:bg-neutral-700 focus:bg-primary-100 hover:bg-primary-100 dark:hover:bg-primary-900 dark:focus:bg-primary-900 focus:outline-dotted focus:outline-transparent focus:outline-2" href="#" tabindex="0"> <a class="flex items-center px-3 py-2 rounded-md appearance-none bg-neutral-100 dark:bg-neutral-700 focus:bg-primary-100 hover:bg-primary-100 dark:hover:bg-primary-900 dark:focus:bg-primary-900 focus:outline-dotted focus:outline-transparent focus:outline-2" href="#" tabindex="0">
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"> <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
<g> <g>
<circle cx="12" cy="3" r="1" fill="white"> <circle cx="12" cy="3" r="1" fill="currentColor">
<animate id="spnDot0" attributeName="r" begin="0;spnDot2.end-0.5s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/> <animate id="spnDot0" attributeName="r" begin="0;spnDot2.end-0.5s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/>
</circle> </circle>
<circle cx="16.5" cy="4.21" r="1" fill="white"> <circle cx="16.5" cy="4.21" r="1" fill="currentColor">
<animate id="spnDot1" attributeName="r" begin="spnDot0.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/> <animate id="spnDot1" attributeName="r" begin="spnDot0.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/>
</circle> </circle>
<circle cx="7.5" cy="4.21" r="1" fill="white"> <circle cx="7.5" cy="4.21" r="1" fill="currentColor">
<animate id="spnDot2" attributeName="r" begin="spnDot4.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/> <animate id="spnDot2" attributeName="r" begin="spnDot4.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/>
</circle> </circle>
<circle cx="19.79" cy="7.5" r="1" fill="white"> <circle cx="19.79" cy="7.5" r="1" fill="currentColor">
<animate id="spnDot3" attributeName="r" begin="spnDot1.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/> <animate id="spnDot3" attributeName="r" begin="spnDot1.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/>
</circle> </circle>
<circle cx="4.21" cy="7.5" r="1" fill="white"> <circle cx="4.21" cy="7.5" r="1" fill="currentColor">
<animate id="spnDot4" attributeName="r" begin="spnDot6.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/> <animate id="spnDot4" attributeName="r" begin="spnDot6.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/>
</circle> </circle>
<circle cx="21" cy="12" r="1" fill="white"> <circle cx="21" cy="12" r="1" fill="currentColor">
<animate id="spnDot5" attributeName="r" begin="spnDot3.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/> <animate id="spnDot5" attributeName="r" begin="spnDot3.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/>
</circle> </circle>
<circle cx="3" cy="12" r="1" fill="white"> <circle cx="3" cy="12" r="1" fill="currentColor">
<animate id="spnDot6" attributeName="r" begin="spnDot8.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/> <animate id="spnDot6" attributeName="r" begin="spnDot8.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/>
</circle> </circle>
<circle cx="19.79" cy="16.5" r="1" fill="white"> <circle cx="19.79" cy="16.5" r="1" fill="currentColor">
<animate id="spnDot7" attributeName="r" begin="spnDot5.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/> <animate id="spnDot7" attributeName="r" begin="spnDot5.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/>
</circle> </circle>
<circle cx="4.21" cy="16.5" r="1" fill="white"> <circle cx="4.21" cy="16.5" r="1" fill="currentColor">
<animate id="spnDot8" attributeName="r" begin="spnDota.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/> <animate id="spnDot8" attributeName="r" begin="spnDota.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/>
</circle> </circle>
<circle cx="16.5" cy="19.79" r="1" fill="white"> <circle cx="16.5" cy="19.79" r="1" fill="currentColor">
<animate id="spnDot9" attributeName="r" begin="spnDot7.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/> <animate id="spnDot9" attributeName="r" begin="spnDot7.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/>
</circle> </circle>
<circle cx="7.5" cy="19.79" r="1" fill="white"> <circle cx="7.5" cy="19.79" r="1" fill="currentColor">
<animate id="spnDota" attributeName="r" begin="spnDotb.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/> <animate id="spnDota" attributeName="r" begin="spnDotb.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/>
</circle> </circle>
<circle cx="12" cy="21" r="1" fill="white"> <circle cx="12" cy="21" r="1" fill="currentColor">
<animate id="spnDotb" attributeName="r" begin="spnDot9.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/> <animate id="spnDotb" attributeName="r" begin="spnDot9.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/>
</circle> </circle>
<animateTransform attributeName="transform" dur="6s" repeatCount="indefinite" type="rotate" values="360 12 12;0 12 12"/> <animateTransform attributeName="transform" dur="6s" repeatCount="indefinite" type="rotate" values="360 12 12;0 12 12"/>
@@ -119,15 +119,15 @@ input.onkeyup = function (event) {
}; };
function throttle(func, time = 750) { function throttle(func, time = 750) {
let isFirstRun = throttle.timeout === undefined let isFirstRun = throttle.timeout === undefined;
if (!isFirstRun) { if (!isFirstRun) {
clearTimeout(throttle.timeout) clearTimeout(throttle.timeout);
} }
throttle.timeout = setTimeout(() => { throttle.timeout = setTimeout(() => {
func() func();
throttle.timeout = undefined throttle.timeout = undefined;
}, time) }, time);
return isFirstRun return isFirstRun;
} }
function displaySearch() { function displaySearch() {
@@ -210,8 +210,7 @@ function executeQuery(term) {
first = output.firstChild.firstElementChild; first = output.firstChild.firstElementChild;
last = output.lastChild.firstElementChild; last = output.lastChild.firstElementChild;
} } else {
else { output.innerHTML = "";
output.innerHTML = ""
} }
} }