From ed2c6b8a1afc0094892dcd7f09b41a379075edfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Z=C3=A1le=C5=A1=C3=A1k?= Date: Tue, 22 Dec 2020 18:37:02 +0100 Subject: [PATCH] add loading gif --- css/style.css | 15 +++++- img/arrow-down.svg | 114 --------------------------------------------- img/loading.gif | Bin 0 -> 7620 bytes index.php | 3 ++ js/controller.js | 3 ++ 5 files changed, 20 insertions(+), 115 deletions(-) delete mode 100644 img/arrow-down.svg create mode 100644 img/loading.gif diff --git a/css/style.css b/css/style.css index 8849789..12b2185 100644 --- a/css/style.css +++ b/css/style.css @@ -20,6 +20,7 @@ ul { ul:nth-child(1) { padding: 1em 1em; + position: absolute; } li:hover { @@ -39,7 +40,7 @@ li::before { } .caret-down::before { - transform: rotate(90deg); + transform: rotate(90deg); } .nested { display: none; @@ -72,6 +73,7 @@ aside { grid-area: aside; overflow-y: scroll; margin-right: 2px solid #c3c3c3; + position: relative; } footer { @@ -84,3 +86,14 @@ footer { sub { display: block; } + +.loading { + position: absolute; + z-index: 5; + display: none; + background-color: rgba(0, 0, 0, 0.438); + width: 100%; + height: 100%; + justify-items: center; + align-items: center; +} diff --git a/img/arrow-down.svg b/img/arrow-down.svg deleted file mode 100644 index f2feed0..0000000 --- a/img/arrow-down.svg +++ /dev/null @@ -1,114 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/img/loading.gif b/img/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..bc5497ec75ddfe2a2782017d84a537ed24a6fe2f GIT binary patch literal 7620 zcmd_vc{CLI-v{t9Gsa+O7|S4xeUiHL^K)sr7c*wYa;1`7NkT|SwuV$=EZL2vlzkaX zcCwqX$6!d(Lduc~sgRFJ2hcE5C}x! z102Z@zBRxfWb@x4unlU{_=aYmaS2=ZX1b!BkIahsn-Bri=uvuG!hzT-g&B)Yk8QDWcW)1y|ax))UCxu^GR zl%;ga@Hp7;po8h5Tf!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oRyMsB|Se^2_0#DRGF{hIG-vsIZg=Q(AccTPHwGl6z)`MkMB|LZDQT(R~qP6J5qsB z;jgjgS1pR;#ZL%NsXcx6mpsk*KK z)b@yKlS(o*&)Tkv@v z|%8)^-^9G3Ar*nI!h>MnFD4@|?c-40tW-qrNks{XN8)F->v zg}DICCHD&wAyj`_WN7dfl#7dz1oWIc6q|e{Me_Q&w4^J7S>hQUd1CojujLeCz#=16 z(tu&eFX?j*g@xxdOR}%DO0aGMjqTNuQzFc7^b03H_Cul~aUh zaV2w0s*7WK3_$|gB}ls!NefU(N*}KljS0EB?Rf5rqjy10s)k2*d*qaU8SE#zzzzeN f6% +
+ loading +
diff --git a/js/controller.js b/js/controller.js index 3695e5d..f41cd83 100644 --- a/js/controller.js +++ b/js/controller.js @@ -19,8 +19,11 @@ class Controller { cloneRep(repurl) { var that = this; + var loading = document.getElementsByClassName("loading")[0]; + loading.style.display = "grid"; this.model.cloneRep().then( function (value) { + loading.style.removeProperty("display"); that.redrawDirTree(that.view); }, function (error) {}