diff options
| author | Zephyrrus <[email protected]> | 2020-07-10 01:17:00 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-07-10 01:17:00 +0300 |
| commit | a721681944e9eb06742e5b3f71c71aed9c1c117d (patch) | |
| tree | 93ff9fd13a0434d91fb1ae7ca0da48d6929c4d00 /src/site/components/loading | |
| parent | feat: backend pagination for albums (diff) | |
| parent | refactor: finish refactoring all the components to use vuex (diff) | |
| download | host.fuwn.me-a721681944e9eb06742e5b3f71c71aed9c1c117d.tar.xz host.fuwn.me-a721681944e9eb06742e5b3f71c71aed9c1c117d.zip | |
Merge pull request #1 from Zephyrrus/feature/store_refactor
Feature/store refactor
Diffstat (limited to 'src/site/components/loading')
| -rw-r--r-- | src/site/components/loading/BulmaLoading.vue | 33 | ||||
| -rw-r--r-- | src/site/components/loading/CubeShadow.vue | 17 | ||||
| -rw-r--r-- | src/site/components/loading/Origami.vue | 18 | ||||
| -rw-r--r-- | src/site/components/loading/PingPong.vue | 26 | ||||
| -rw-r--r-- | src/site/components/loading/RotateSquare.vue | 13 |
5 files changed, 73 insertions, 34 deletions
diff --git a/src/site/components/loading/BulmaLoading.vue b/src/site/components/loading/BulmaLoading.vue new file mode 100644 index 0000000..37cc5a5 --- /dev/null +++ b/src/site/components/loading/BulmaLoading.vue @@ -0,0 +1,33 @@ +<template> + <div class="loader-wrapper"> + <div class="loader is-loading" /> + </div> +</template> + +<style lang="scss" scoped> + .loader-wrapper { + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; + background: #fff; + opacity: 0; + z-index: -1; + transition: opacity .3s; + display: flex; + justify-content: center; + align-items: center; + border-radius: 6px; + + .loader { + height: 80px; + width: 80px; + } + + &.is-active { + opacity: 1; + z-index: 1; + } + } +</style> diff --git a/src/site/components/loading/CubeShadow.vue b/src/site/components/loading/CubeShadow.vue index af31dac..bbfdb52 100644 --- a/src/site/components/loading/CubeShadow.vue +++ b/src/site/components/loading/CubeShadow.vue @@ -1,5 +1,6 @@ <template> - <div :style="styles" + <div + :style="styles" class="spinner spinner--cube-shadow" /> </template> @@ -8,16 +9,16 @@ export default { props: { size: { type: String, - default: '60px' + default: '60px', }, background: { type: String, - default: '#9C27B0' + default: '#9C27B0', }, duration: { type: String, - default: '1.8s' - } + default: '1.8s', + }, }, computed: { styles() { @@ -25,10 +26,10 @@ export default { width: this.size, height: this.size, backgroundColor: this.background, - animationDuration: this.duration + animationDuration: this.duration, }; - } - } + }, + }, }; </script> diff --git a/src/site/components/loading/Origami.vue b/src/site/components/loading/Origami.vue index d1b523d..cd1c087 100644 --- a/src/site/components/loading/Origami.vue +++ b/src/site/components/loading/Origami.vue @@ -1,7 +1,9 @@ <template> - <div :style="styles" + <div + :style="styles" class="spinner spinner-origami"> - <div :style="innerStyles" + <div + :style="innerStyles" class="spinner-inner loading"> <span class="slice" /> <span class="slice" /> @@ -18,21 +20,21 @@ export default { props: { size: { type: String, - default: '40px' - } + default: '40px', + }, }, computed: { innerStyles() { - let size = parseInt(this.size); + const size = parseInt(this.size, 10); return { transform: `scale(${(size / 60)})` }; }, styles() { return { width: this.size, - height: this.size + height: this.size, }; - } - } + }, + }, }; </script> diff --git a/src/site/components/loading/PingPong.vue b/src/site/components/loading/PingPong.vue index ac33e28..d562e9f 100644 --- a/src/site/components/loading/PingPong.vue +++ b/src/site/components/loading/PingPong.vue @@ -1,12 +1,14 @@ <template> - <div :style="styles" + <div + :style="styles" class="spinner spinner--ping-pong"> - <div :style="innerStyles" + <div + :style="innerStyles" class="spinner-inner"> <div class="board"> - <div class="left"/> - <div class="right"/> - <div class="ball"/> + <div class="left" /> + <div class="right" /> + <div class="ball" /> </div> </div> </div> @@ -17,22 +19,22 @@ export default { props: { size: { type: String, - default: '60px' - } + default: '60px', + }, }, computed: { innerStyles() { - let size = parseInt(this.size); + const size = parseInt(this.size, 10); return { transform: `scale(${size / 250})` }; }, styles() { return { width: this.size, - height: this.size + height: this.size, }; - } - } -} + }, + }, +}; </script> <style lang="scss" scoped> diff --git a/src/site/components/loading/RotateSquare.vue b/src/site/components/loading/RotateSquare.vue index 4da8300..089e01a 100644 --- a/src/site/components/loading/RotateSquare.vue +++ b/src/site/components/loading/RotateSquare.vue @@ -1,5 +1,6 @@ <template> - <div :style="styles" + <div + :style="styles" class="spinner spinner--rotate-square-2" /> </template> @@ -8,18 +9,18 @@ export default { props: { size: { type: String, - default: '40px' - } + default: '40px', + }, }, computed: { styles() { return { width: this.size, height: this.size, - display: 'inline-block' + display: 'inline-block', }; - } - } + }, + }, }; </script> |