From b101205689c6c41a274f425fc5493d1aa4da7b4e Mon Sep 17 00:00:00 2001 From: Dekkia Date: Sun, 14 Apr 2024 16:42:55 +0200 Subject: [PATCH] added loading-spinner to thread view (closes #8) --- css/spinner.css | 92 ++++++++++++++++++++++++++++++++++++++++++++ thread/css/style.css | 12 ++++++ thread/index.html | 17 +++++++- thread/js/main.js | 1 + 4 files changed, 121 insertions(+), 1 deletion(-) create mode 100644 css/spinner.css diff --git a/css/spinner.css b/css/spinner.css new file mode 100644 index 0000000..203d9b2 --- /dev/null +++ b/css/spinner.css @@ -0,0 +1,92 @@ +/* Licensed under CC0 BY https: //loading.io/css/ */ + +/* +
+*/ + +.lds-grid, +.lds-grid div { + box-sizing: border-box; +} + +.lds-grid { + display: inline-block; + position: relative; + width: 80px; + height: 80px; +} + +.lds-grid div { + position: absolute; + width: 16px; + height: 16px; + border-radius: 50%; + background: currentColor; + animation: lds-grid 1.2s linear infinite; +} + +.lds-grid div:nth-child(1) { + top: 8px; + left: 8px; + animation-delay: 0s; +} + +.lds-grid div:nth-child(2) { + top: 8px; + left: 32px; + animation-delay: -0.4s; +} + +.lds-grid div:nth-child(3) { + top: 8px; + left: 56px; + animation-delay: -0.8s; +} + +.lds-grid div:nth-child(4) { + top: 32px; + left: 8px; + animation-delay: -0.4s; +} + +.lds-grid div:nth-child(5) { + top: 32px; + left: 32px; + animation-delay: -0.8s; +} + +.lds-grid div:nth-child(6) { + top: 32px; + left: 56px; + animation-delay: -1.2s; +} + +.lds-grid div:nth-child(7) { + top: 56px; + left: 8px; + animation-delay: -0.8s; +} + +.lds-grid div:nth-child(8) { + top: 56px; + left: 32px; + animation-delay: -1.2s; +} + +.lds-grid div:nth-child(9) { + top: 56px; + left: 56px; + animation-delay: -1.6s; +} + +@keyframes lds-grid { + + 0%, + 100% { + opacity: 1; + } + + 50% { + opacity: 0.5; + } +} \ No newline at end of file diff --git a/thread/css/style.css b/thread/css/style.css index aa0b160..29f37ff 100644 --- a/thread/css/style.css +++ b/thread/css/style.css @@ -33,6 +33,18 @@ body { width: 100%; } +.spinnerContainer { + height: 100%; + width: 100%; + display: grid; +} + +.spinnerContainer>.lds-grid { + align-self: center; + justify-self: center; + zoom: 1.5; +} + section { margin: unset; padding: unset; diff --git a/thread/index.html b/thread/index.html index 763ea9c..4f1b24c 100644 --- a/thread/index.html +++ b/thread/index.html @@ -10,6 +10,7 @@ + @@ -21,7 +22,21 @@

Unroll Ninja

-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+