diff options
author | David Thompson <dthompson2@worcester.edu> | 2015-02-09 08:34:37 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2015-02-09 08:34:37 -0500 |
commit | 293294f2401f3dac6d07e9af65b5582ba893a777 (patch) | |
tree | 3f2b64f314d692e2359a613e3f0e2c5dd99e7f71 /css | |
parent | 6546b8cae1aead78da45dd269d13219257af04ab (diff) |
js: Overhaul UI with FRP!
* css/guix.css: New loading spinner.
* js/lib/kefir.js: New file.
* js/model/packages.js (guix.packages.Packages): Cache result.
(guix.packages.Sorter, guix.packages.Pager): Delete.
(guix.packages.installPackage): New function.
* js/utils.js (K): New variable.
(guix.withEmit, guix.withEmitAttr, guix.makeModule): New functions.
* js/view/ui.js (guix.ui.paginate, guix.ui.spinUntil): New functions.
(guix.ui.spinner): New variable.
* js/controller/generations.js: Rewrite.
* js/controller/packageInfo.js: Rewrite
* js/controller/packages.js: Rewrite.
* js/view/packages.js: Rewrite.
* js/view/generations.js: Delete.
* js/view/packageInfo.js: Delete.
* js/routes.js: Use new modules.
* guix/web/view/html.scm (javascripts): Update list.
Diffstat (limited to 'css')
-rw-r--r-- | css/guix.css | 129 |
1 files changed, 41 insertions, 88 deletions
diff --git a/css/guix.css b/css/guix.css index 2848fd5..0dca4c2 100644 --- a/css/guix.css +++ b/css/guix.css @@ -20,105 +20,58 @@ } /* Loading Spinner */ - -@-webkit-keyframes spinner { - 0% { - -webkit-transform: rotate(0deg); - -moz-transform: rotate(0deg); - -ms-transform: rotate(0deg); - -o-transform: rotate(0deg); - transform: rotate(0deg); - } - - 100% { - -webkit-transform: rotate(360deg); - -moz-transform: rotate(360deg); - -ms-transform: rotate(360deg); - -o-transform: rotate(360deg); - transform: rotate(360deg); - } +/* Copyright (c) 2014 Tobias Ahlin */ +/* https://raw.githubusercontent.com/tobiasahlin/SpinKit/master/LICENSE */ +.spinner { + margin: 100px auto; + width: 50px; + height: 30px; + text-align: center; + font-size: 10px; } -@-moz-keyframes spinner { - 0% { - -webkit-transform: rotate(0deg); - -moz-transform: rotate(0deg); - -ms-transform: rotate(0deg); - -o-transform: rotate(0deg); - transform: rotate(0deg); - } +.spinner > div { + background-color: #333; + height: 60px; + width: 7px; + margin: 0px 3px 0px 0px; + display: inline-block; - 100% { - -webkit-transform: rotate(360deg); - -moz-transform: rotate(360deg); - -ms-transform: rotate(360deg); - -o-transform: rotate(360deg); - transform: rotate(360deg); - } + -webkit-animation: stretchdelay 1.2s infinite ease-in-out; + animation: stretchdelay 1.2s infinite ease-in-out; } -@-o-keyframes spinner { - 0% { - -webkit-transform: rotate(0deg); - -moz-transform: rotate(0deg); - -ms-transform: rotate(0deg); - -o-transform: rotate(0deg); - transform: rotate(0deg); - } +.spinner .rect2 { + -webkit-animation-delay: -1.1s; + animation-delay: -1.1s; +} - 100% { - -webkit-transform: rotate(360deg); - -moz-transform: rotate(360deg); - -ms-transform: rotate(360deg); - -o-transform: rotate(360deg); - transform: rotate(360deg); - } +.spinner .rect3 { + -webkit-animation-delay: -1.0s; + animation-delay: -1.0s; } -@keyframes spinner { - 0% { - -webkit-transform: rotate(0deg); - -moz-transform: rotate(0deg); - -ms-transform: rotate(0deg); - -o-transform: rotate(0deg); - transform: rotate(0deg); - } +.spinner .rect4 { + -webkit-animation-delay: -0.9s; + animation-delay: -0.9s; +} - 100% { - -webkit-transform: rotate(360deg); - -moz-transform: rotate(360deg); - -ms-transform: rotate(360deg); - -o-transform: rotate(360deg); - transform: rotate(360deg); - } +.spinner .rect5 { + -webkit-animation-delay: -0.8s; + animation-delay: -0.8s; } -/* :not(:required) hides this rule from IE9 and below */ -.spinner:not(:required) { - -webkit-animation: spinner 1500ms infinite linear; - -moz-animation: spinner 1500ms infinite linear; - -ms-animation: spinner 1500ms infinite linear; - -o-animation: spinner 1500ms infinite linear; - animation: spinner 1500ms infinite linear; - -webkit-border-radius: 0.5em; - -moz-border-radius: 0.5em; - -ms-border-radius: 0.5em; - -o-border-radius: 0.5em; - border-radius: 0.5em; - -webkit-box-shadow: rgba(0, 0, 51, 0.3) 1.5em 0 0 0, rgba(0, 0, 51, 0.3) 1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) 0 1.5em 0 0, rgba(0, 0, 51, 0.3) -1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) -1.5em 0 0 0, rgba(0, 0, 51, 0.3) -1.1em -1.1em 0 0, rgba(0, 0, 51, 0.3) 0 -1.5em 0 0, rgba(0, 0, 51, 0.3) 1.1em -1.1em 0 0; - -moz-box-shadow: rgba(0, 0, 51, 0.3) 1.5em 0 0 0, rgba(0, 0, 51, 0.3) 1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) 0 1.5em 0 0, rgba(0, 0, 51, 0.3) -1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) -1.5em 0 0 0, rgba(0, 0, 51, 0.3) -1.1em -1.1em 0 0, rgba(0, 0, 51, 0.3) 0 -1.5em 0 0, rgba(0, 0, 51, 0.3) 1.1em -1.1em 0 0; - box-shadow: rgba(0, 0, 51, 0.3) 1.5em 0 0 0, rgba(0, 0, 51, 0.3) 1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) 0 1.5em 0 0, rgba(0, 0, 51, 0.3) -1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) -1.5em 0 0 0, rgba(0, 0, 51, 0.3) -1.1em -1.1em 0 0, rgba(0, 0, 51, 0.3) 0 -1.5em 0 0, rgba(0, 0, 51, 0.3) 1.1em -1.1em 0 0; - display: inline-block; - font-size: 18px; - width: 1em; - height: 1em; - margin: 1.5em; - overflow: hidden; - text-indent: 100%; +@-webkit-keyframes stretchdelay { + 0%, 40%, 100% { -webkit-transform: scaleY(0.4) } + 20% { -webkit-transform: scaleY(1.0) } } -.spinner-container { - width: 1em; - margin: 0 auto; - padding: 32px; +@keyframes stretchdelay { + 0%, 40%, 100% { + transform: scaleY(0.4); + -webkit-transform: scaleY(0.4); + } 20% { + transform: scaleY(1.0); + -webkit-transform: scaleY(1.0); + } } |