diff options
author | Chocobozzz <me@florianbigard.com> | 2017-12-12 14:57:46 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2017-12-12 14:57:46 +0100 |
commit | c893d4514e6ecbf282c7985fe5f82b8acd8a1137 (patch) | |
tree | c7e9b9d53de5a8e8826e26785ae6019131036948 /client/src/sass | |
parent | 77d07d690968a9631fc0c8bafbaebd27a5ebaab6 (diff) | |
download | PeerTube-c893d4514e6ecbf282c7985fe5f82b8acd8a1137.tar.gz PeerTube-c893d4514e6ecbf282c7985fe5f82b8acd8a1137.tar.zst PeerTube-c893d4514e6ecbf282c7985fe5f82b8acd8a1137.zip |
Add beautiful loading bar
Diffstat (limited to 'client/src/sass')
-rw-r--r-- | client/src/sass/application.scss | 4 | ||||
-rw-r--r-- | client/src/sass/loading-bar.scss | 93 |
2 files changed, 96 insertions, 1 deletions
diff --git a/client/src/sass/application.scss b/client/src/sass/application.scss index 08131406a..968dc5f58 100644 --- a/client/src/sass/application.scss +++ b/client/src/sass/application.scss | |||
@@ -10,7 +10,9 @@ $FontPathSourceSansPro: '../../node_modules/npm-font-source-sans-pro/fonts'; | |||
10 | @import '~primeng/resources/themes/bootstrap/theme.css'; | 10 | @import '~primeng/resources/themes/bootstrap/theme.css'; |
11 | @import '~primeng/resources/primeng.css'; | 11 | @import '~primeng/resources/primeng.css'; |
12 | @import '~video.js/dist/video-js.css'; | 12 | @import '~video.js/dist/video-js.css'; |
13 | @import './video-js-custom.scss'; | 13 | |
14 | @import './video-js-custom'; | ||
15 | @import './loading-bar'; | ||
14 | 16 | ||
15 | [hidden] { | 17 | [hidden] { |
16 | display: none !important; | 18 | display: none !important; |
diff --git a/client/src/sass/loading-bar.scss b/client/src/sass/loading-bar.scss new file mode 100644 index 000000000..d34bf83ee --- /dev/null +++ b/client/src/sass/loading-bar.scss | |||
@@ -0,0 +1,93 @@ | |||
1 | // Thanks: https://github.com/aitboudad/ngx-loading-bar/blob/master/loading-bar.css | ||
2 | |||
3 | /* Make clicks pass-through */ | ||
4 | #loading-bar, | ||
5 | #loading-bar-spinner { | ||
6 | pointer-events: none; | ||
7 | -webkit-pointer-events: none; | ||
8 | -webkit-transition: 350ms linear all; | ||
9 | -moz-transition: 350ms linear all; | ||
10 | -o-transition: 350ms linear all; | ||
11 | transition: 350ms linear all; | ||
12 | color: #29d; | ||
13 | } | ||
14 | |||
15 | #loading-bar .bar { | ||
16 | -webkit-transition: width 350ms; | ||
17 | -moz-transition: width 350ms; | ||
18 | -o-transition: width 350ms; | ||
19 | transition: width 350ms; | ||
20 | |||
21 | background: #29d; | ||
22 | position: fixed; | ||
23 | z-index: 10002; | ||
24 | top: 0; | ||
25 | left: 0; | ||
26 | width: 100%; | ||
27 | height: 2px; | ||
28 | border-bottom-right-radius: 1px; | ||
29 | border-top-right-radius: 1px; | ||
30 | } | ||
31 | |||
32 | /* Fancy blur effect */ | ||
33 | #loading-bar .peg { | ||
34 | position: absolute; | ||
35 | width: 70px; | ||
36 | right: 0; | ||
37 | top: 0; | ||
38 | height: 2px; | ||
39 | opacity: .45; | ||
40 | -moz-box-shadow: 1px 0 6px 1px; | ||
41 | -ms-box-shadow: 1px 0 6px 1px; | ||
42 | -webkit-box-shadow: 1px 0 6px 1px; | ||
43 | box-shadow: 1px 0 6px 1px; | ||
44 | color: inherit; | ||
45 | -moz-border-radius: 100%; | ||
46 | -webkit-border-radius: 100%; | ||
47 | border-radius: 100%; | ||
48 | } | ||
49 | |||
50 | #loading-bar-spinner { | ||
51 | display: block; | ||
52 | position: fixed; | ||
53 | z-index: 10002; | ||
54 | top: 10px; | ||
55 | left: 10px; | ||
56 | } | ||
57 | |||
58 | #loading-bar-spinner .spinner-icon { | ||
59 | width: 14px; | ||
60 | height: 14px; | ||
61 | |||
62 | border: solid 2px transparent; | ||
63 | border-top-color: inherit; | ||
64 | border-left-color: inherit; | ||
65 | border-radius: 50%; | ||
66 | |||
67 | -webkit-animation: loading-bar-spinner 400ms linear infinite; | ||
68 | -moz-animation: loading-bar-spinner 400ms linear infinite; | ||
69 | -ms-animation: loading-bar-spinner 400ms linear infinite; | ||
70 | -o-animation: loading-bar-spinner 400ms linear infinite; | ||
71 | animation: loading-bar-spinner 400ms linear infinite; | ||
72 | } | ||
73 | |||
74 | @-webkit-keyframes loading-bar-spinner { | ||
75 | 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } | ||
76 | 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } | ||
77 | } | ||
78 | @-moz-keyframes loading-bar-spinner { | ||
79 | 0% { -moz-transform: rotate(0deg); transform: rotate(0deg); } | ||
80 | 100% { -moz-transform: rotate(360deg); transform: rotate(360deg); } | ||
81 | } | ||
82 | @-o-keyframes loading-bar-spinner { | ||
83 | 0% { -o-transform: rotate(0deg); transform: rotate(0deg); } | ||
84 | 100% { -o-transform: rotate(360deg); transform: rotate(360deg); } | ||
85 | } | ||
86 | @-ms-keyframes loading-bar-spinner { | ||
87 | 0% { -ms-transform: rotate(0deg); transform: rotate(0deg); } | ||
88 | 100% { -ms-transform: rotate(360deg); transform: rotate(360deg); } | ||
89 | } | ||
90 | @keyframes loading-bar-spinner { | ||
91 | 0% { transform: rotate(0deg); } | ||
92 | 100% { transform: rotate(360deg); } | ||
93 | } | ||