diff --git a/images/connect-to-hub.png b/images/connect-to-hub.png
new file mode 100644
index 0000000000..8153879a58
Binary files /dev/null and b/images/connect-to-hub.png differ
diff --git a/images/connect-to-hub@2x.png b/images/connect-to-hub@2x.png
new file mode 100644
index 0000000000..743c5bbe34
Binary files /dev/null and b/images/connect-to-hub@2x.png differ
diff --git a/package.json b/package.json
index 2fc733d444..b15fe0249e 100644
--- a/package.json
+++ b/package.json
@@ -83,7 +83,8 @@
"request": "^2.55.0",
"request-progress": "^0.3.1",
"rimraf": "^2.3.2",
- "underscore": "^1.8.3"
+ "underscore": "^1.8.3",
+ "validator": "^3.39.0"
},
"devDependencies": {
"babel": "^5.1.10",
diff --git a/src/actions/AccountActions.js b/src/actions/AccountActions.js
new file mode 100644
index 0000000000..ff2807de34
--- /dev/null
+++ b/src/actions/AccountActions.js
@@ -0,0 +1,20 @@
+import alt from '../alt';
+import hub from '../utils/HubUtil';
+
+class AccountActions {
+ login(username, password) {
+ this.dispatch({});
+ hub.login(username, password);
+ }
+
+ signup (username, password, email, subscribe) {
+ this.dispatch({});
+ hub.signup(username, password, email, subscribe);
+ }
+
+ skip () {
+ this.dispatch({});
+ }
+}
+
+export default alt.createActions(AccountActions);
diff --git a/src/actions/AccountServerActions.js b/src/actions/AccountServerActions.js
new file mode 100644
index 0000000000..c227e9fcec
--- /dev/null
+++ b/src/actions/AccountServerActions.js
@@ -0,0 +1,19 @@
+import alt from '../alt';
+import router from '../router';
+
+
+class AccountServerActions {
+ constructor () {
+ this.generateActions(
+ 'loggedin',
+ 'errors'
+ );
+ }
+
+ signedup ({username, verified}) {
+ router.get().transitionTo('search');
+ this.dispatch({username, verified});
+ }
+}
+
+export default alt.createActions(AccountServerActions);
diff --git a/src/actions/RepositoryActions.js b/src/actions/RepositoryActions.js
new file mode 100644
index 0000000000..092430ca24
--- /dev/null
+++ b/src/actions/RepositoryActions.js
@@ -0,0 +1,9 @@
+import alt from '../alt';
+
+class RepositoryActions {
+ fetch () {
+ this.dispatch({});
+ }
+}
+
+export default alt.createActions(RepositoryActions);
diff --git a/src/actions/RepositoryServerActions.js b/src/actions/RepositoryServerActions.js
new file mode 100644
index 0000000000..0fa5cb03d1
--- /dev/null
+++ b/src/actions/RepositoryServerActions.js
@@ -0,0 +1,12 @@
+import alt from '../alt';
+
+class RepositoryServerActions {
+ constructor () {
+ this.generateActions(
+ 'fetched',
+ 'error'
+ );
+ }
+}
+
+export default alt.createActions(RepositoryServerActions);
diff --git a/src/app.js b/src/app.js
index 3ef7360b02..9fb40133d7 100644
--- a/src/app.js
+++ b/src/app.js
@@ -13,6 +13,11 @@ var urlUtil = require ('./utils/URLUtil');
var app = remote.require('app');
var request = require('request');
var docker = require('./utils/DockerUtil');
+var hub = require('./utils/HubUtil');
+var Router = require('react-router');
+var routes = require('./routes');
+var routerContainer = require('./router');
+
webUtil.addWindowSizeSaving();
webUtil.addLiveReload();
@@ -27,12 +32,25 @@ setInterval(function () {
metrics.track('app heartbeat');
}, 14400000);
+var router = Router.create({
+ routes: routes
+});
router.run(Handler => React.render(, document.body));
+routerContainer.set(router);
SetupStore.setup().then(() => {
Menu.setApplicationMenu(Menu.buildFromTemplate(template()));
docker.init();
- router.transitionTo('search');
+ //if (!localStorage.getItem('account.prompted')) {
+ if (true) {
+ if (!hub.loggedin()) {
+ router.transitionTo('signup');
+ } else {
+ router.transitionTo('search');
+ }
+ } else {
+ router.transitionTo('search');
+ }
}).catch(err => {
metrics.track('Setup Failed', {
step: 'catch',
@@ -63,3 +81,7 @@ ipc.on('application:open-url', opts => {
urlUtil.openUrl(opts.url, flags, app.getVersion());
});
});
+
+module.exports = {
+ router: router
+};
diff --git a/src/components/Account.react.js b/src/components/Account.react.js
new file mode 100644
index 0000000000..d9320e1146
--- /dev/null
+++ b/src/components/Account.react.js
@@ -0,0 +1,57 @@
+var React = require('react/addons');
+var Router = require('react-router');
+var RetinaImage = require('react-retina-image');
+var Header = require('./Header.react');
+var metrics = require('../utils/MetricsUtil');
+var accountStore = require('../stores/AccountStore');
+var accountActions = require('../actions/AccountActions');
+
+module.exports = React.createClass({
+ mixins: [Router.Navigation],
+
+ getInitialState: function () {
+ return accountStore.getState();
+ },
+
+ handleSkip: function () {
+ accountActions.skip();
+ this.transitionTo('search');
+ metrics.track('Skipped Signup');
+ },
+
+ handleClose: function () {
+ this.transitionTo('search');
+ metrics.track('Closed Signup');
+ },
+
+ componentDidMount: function () {
+ accountStore.listen(this.update);
+ },
+
+ update: function () {
+ this.setState(accountStore.getState());
+ },
+
+ render: function () {
+ let close = this.state.prompted ?
+ Close :
+ Skip For Now;
+
+ return (
+
+
+
+
+
+
+
+
+
Connect to Docker Hub
+
Pull and run private Docker Hub images by connecting your Docker Hub account to Kitematic.
+ {close}
+
+
+
+ );
+ }
+});
diff --git a/src/components/AccountLogin.react.js b/src/components/AccountLogin.react.js
new file mode 100644
index 0000000000..9757664937
--- /dev/null
+++ b/src/components/AccountLogin.react.js
@@ -0,0 +1,81 @@
+var _ = require('underscore');
+var React = require('react/addons');
+var Router = require('react-router');
+var validator = require('validator');
+var accountActions = require('../actions/AccountActions');
+var metrics = require('../utils/MetricsUtil');
+var shell = require('shell');
+
+module.exports = React.createClass({
+ mixins: [Router.Navigation, React.addons.LinkedStateMixin],
+
+ getInitialState: function () {
+ return {
+ username: '',
+ password: '',
+ errors: {}
+ };
+ },
+
+ componentWillReceiveProps: function (nextProps) {
+ this.setState({errors: nextProps.errors});
+ },
+
+ validate: function () {
+ let errors = {};
+ if (!validator.isLowercase(this.state.username) || !validator.isAlphanumeric(this.state.username) || !validator.isLength(this.state.username, 4, 30)) {
+ errors.username = 'Must be 4-30 lower case letters or numbers';
+ }
+
+ if (!validator.isLength(this.state.password, 5)) {
+ errors.password = 'Must be at least 5 characters long';
+ }
+
+ return errors;
+ },
+
+ handleBlur: function () {
+ this.setState({errors: _.omit(this.validate(), (val, key) => !this.state[key].length)});
+ },
+
+ handleLogin: function () {
+ let errors = this.validate();
+ this.setState({errors});
+
+ if (_.isEmpty(errors)) {
+ accountActions.login(this.state.username, this.state.password);
+ }
+ metrics.track('Logged In to Docker Hub');
+ },
+
+ handleClickSignup: function () {
+ if (!this.props.loading) {
+ this.transitionTo('signup');
+ }
+ },
+
+ handleClickForgotPassword: function () {
+ shell.openExternal('https://hub.docker.com/account/forgot-password/');
+ },
+
+ render: function () {
+ console.log(this.state.errors);
+ let loading = this.props.loading ? : null;
+ return (
+
+ );
+ }
+});
diff --git a/src/components/AccountSignup.react.js b/src/components/AccountSignup.react.js
new file mode 100644
index 0000000000..162050b549
--- /dev/null
+++ b/src/components/AccountSignup.react.js
@@ -0,0 +1,86 @@
+var _ = require('underscore');
+var React = require('react/addons');
+var Router = require('react-router');
+var validator = require('validator');
+var accountActions = require('../actions/AccountActions');
+var metrics = require('../utils/MetricsUtil');
+
+module.exports = React.createClass({
+ mixins: [Router.Navigation, React.addons.LinkedStateMixin],
+
+ getInitialState: function () {
+ return {
+ username: '',
+ password: '',
+ email: '',
+ subscribe: true,
+ errors: {}
+ };
+ },
+
+ componentWillReceiveProps: function (nextProps) {
+ this.setState({errors: nextProps.errors});
+ },
+
+ validate: function () {
+ let errors = {};
+ if (!validator.isLowercase(this.state.username) || !validator.isAlphanumeric(this.state.username) || !validator.isLength(this.state.username, 4, 30)) {
+ errors.username = 'Must be 4-30 lower case letters or numbers';
+ }
+
+ if (!validator.isLength(this.state.password, 5)) {
+ errors.password = 'Must be at least 5 characters long';
+ }
+
+ if (!validator.isEmail(this.state.email)) {
+ errors.email = 'Must be a valid email address';
+ }
+ return errors;
+ },
+
+ handleBlur: function () {
+ this.setState({errors: _.omit(this.validate(), (val, key) => !this.state[key].length)});
+ },
+
+ handleSignUp: function () {
+ let errors = this.validate();
+ this.setState({errors});
+
+ if (_.isEmpty(errors)) {
+ accountActions.signup(this.state.username, this.state.password, this.state.email, this.state.subscribe);
+ }
+ metrics.track('Signed Up for Docker Hub');
+ },
+
+ handleClickLogin: function () {
+ if (!this.props.loading) {
+ this.transitionTo('login');
+ }
+ },
+
+ render: function () {
+ let loading = this.props.loading ? : null;
+ return (
+
+ );
+ }
+});
diff --git a/src/components/Containers.react.js b/src/components/Containers.react.js
index 03319d7d20..d79178acac 100644
--- a/src/components/Containers.react.js
+++ b/src/components/Containers.react.js
@@ -21,8 +21,8 @@ var Containers = React.createClass({
getInitialState: function () {
return {
sidebarOffset: 0,
- containers: {},
- sorted: [],
+ containers: containerStore.getState().containers,
+ sorted: this.sorted(containerStore.getState().containers),
updateAvailable: false,
currentButtonLabel: ''
};
@@ -43,9 +43,8 @@ var Containers = React.createClass({
containerStore.unlisten(this.update);
},
- update: function () {
- let containers = containerStore.getState().containers;
- let sorted = _.values(containers).sort(function (a, b) {
+ sorted: function (containers) {
+ return _.values(containers).sort(function (a, b) {
if (a.State.Downloading && !b.State.Downloading) {
return -1;
} else if (!a.State.Downloading && b.State.Downloading) {
@@ -60,6 +59,11 @@ var Containers = React.createClass({
}
}
});
+ },
+
+ update: function () {
+ let containers = containerStore.getState().containers;
+ let sorted = this.sorted(containerStore.getState().containers);
let name = this.context.router.getCurrentParams().name;
if (containerStore.getState().pending) {
diff --git a/src/router.js b/src/router.js
index d419f62176..ac32a86106 100644
--- a/src/router.js
+++ b/src/router.js
@@ -1,8 +1,11 @@
-var Router = require('react-router');
-var routes = require('./routes');
+module.exports = {
+ router: null,
-var router = Router.create({
- routes: routes
-});
+ get: function () {
+ return this.router;
+ },
-module.exports = router;
+ set: function (router) {
+ this.router = router;
+ }
+};
diff --git a/src/routes.js b/src/routes.js
index 63bdda0f0b..782a58ef16 100644
--- a/src/routes.js
+++ b/src/routes.js
@@ -1,5 +1,8 @@
var React = require('react/addons');
var Setup = require('./components/Setup.react');
+var Account = require('./components/Account.react');
+var AccountSignup = require('./components/AccountSignup.react');
+var AccountLogin = require('./components/AccountLogin.react');
var Containers = require('./components/Containers.react');
var ContainerDetails = require('./components/ContainerDetails.react');
var ContainerHome = require('./components/ContainerHome.react');
@@ -28,6 +31,10 @@ var App = React.createClass({
var routes = (
+
+
+
+
diff --git a/src/stores/AccountStore.js b/src/stores/AccountStore.js
new file mode 100644
index 0000000000..51c100255a
--- /dev/null
+++ b/src/stores/AccountStore.js
@@ -0,0 +1,57 @@
+import alt from '../alt';
+import accountServerActions from '../actions/AccountServerActions';
+import accountActions from '../actions/AccountActions';
+
+class AccountStore {
+ constructor () {
+ this.bindActions(accountServerActions);
+ this.bindActions(accountActions);
+
+ this.prompted = localStorage.getItem('account.prompted') || false;
+ this.loading = false;
+ this.errors = {};
+
+ this.verified = false;
+ this.username = null;
+ }
+
+ skip () {
+ this.setState({
+ prompted: true
+ });
+ localStorage.setItem('account.prompted', true);
+ }
+
+ login () {
+ this.setState({
+ loading: true,
+ errors: {}
+ });
+ }
+
+ signup () {
+ this.setState({
+ loading: true,
+ errors: {}
+ });
+ }
+
+ loggedin ({username}) {
+ this.setState({username, errors: {}, loading: false});
+ }
+
+ signedup ({username}) {
+ this.setState({username, errors: {}, loading: false});
+ }
+
+ verified ({verified}) {
+ this.setState({verified});
+ }
+
+ errors ({errors}) {
+ console.log(errors);
+ this.setState({errors, loading: false});
+ }
+}
+
+export default alt.createStore(AccountStore);
diff --git a/src/stores/RepositoryStore.js b/src/stores/RepositoryStore.js
new file mode 100644
index 0000000000..53208eede3
--- /dev/null
+++ b/src/stores/RepositoryStore.js
@@ -0,0 +1,29 @@
+import alt from '../alt';
+import repositoryServerActions from '../actions/RepositoryServerActions';
+
+class RepositoryStore {
+ constructor () {
+ this.bindActions(repositoryServerActions);
+ this.repos = [];
+ this.loading = false;
+ this.error = null;
+ }
+
+ fetch () {
+ this.setState({
+ repos: [],
+ error: null,
+ loading: true
+ });
+ }
+
+ fetched ({repos}) {
+ this.setState({repos, loading: false});
+ }
+
+ error ({error}) {
+ this.setState({error, loading: false});
+ }
+}
+
+export default alt.createStore(RepositoryStore);
diff --git a/src/utils/HubUtil.js b/src/utils/HubUtil.js
new file mode 100644
index 0000000000..a273929e2d
--- /dev/null
+++ b/src/utils/HubUtil.js
@@ -0,0 +1,70 @@
+var request = require('request');
+var accountServerActions = require('../actions/AccountServerActions');
+
+module.exports = {
+ // Returns the base64 encoded index token or null if no token exists
+ config: function () {
+ let config = localStorage.getItem('auth.config');
+ if (!config) {
+ return null;
+ }
+ return config;
+ },
+
+ // Retrives the current jwt hub token or null if no token exists
+ jwt: function () {
+ let jwt = localStorage.getItem('auth.jwt');
+ if (!jwt) {
+ return null;
+ }
+ return jwt;
+ },
+
+ loggedin: function () {
+ return this.jwt() && this.config();
+ },
+
+ // Places a token under ~/.dockercfg and saves a jwt to localstore
+ login: function (username, password) {
+ request.post('https://hub.docker.com/v2/users/login/', {form: {username, password}}, (err, response, body) => {
+ let data = JSON.parse(body);
+ if (response.statusCode === 200) {
+ accountServerActions.loggedin({username, verified: true});
+ // TODO: save username to localstorage
+ if (data.token) {
+ localStorage.setItem('auth.jwt', data.token);
+ }
+ } else if (response.statusCode === 401) {
+ if (data && data.detail && data.detail.indexOf('Account not active yet') !== -1) {
+ accountServerActions.loggedin({username, verified: false});
+ } else {
+ accountServerActions.errors({errors: data});
+ }
+ }
+ });
+ },
+
+ // Signs up and places a token under ~/.dockercfg and saves a jwt to localstore
+ signup: function (username, password, email, subscribe) {
+ request.post('https://hub.docker.com/v2/users/signup/', {
+ form: {
+ username,
+ password,
+ email,
+ subscribe
+ }
+ }, (err, response, body) => {
+ // TODO: save username to localstorage
+ if (response.statusCode === 204) {
+ accountServerActions.signedup({username, verified: false});
+ } else {
+ let data = JSON.parse(body);
+ let errors = {};
+ for (let key in data) {
+ errors[key] = data[key][0];
+ }
+ accountServerActions.errors({errors});
+ }
+ });
+ },
+};
diff --git a/src/utils/RegHubUtil.js b/src/utils/RegHubUtil.js
new file mode 100644
index 0000000000..b1c461764d
--- /dev/null
+++ b/src/utils/RegHubUtil.js
@@ -0,0 +1,45 @@
+var request = require('request');
+var async = require('async');
+var repositoryServerActions = require('../actions/RepositoryServerActions');
+
+module.exports = {
+ // Returns the base64 encoded index token or null if no token exists
+ repos: function (jwt) {
+
+ // TODO: provide jwt
+ request.get({
+ url: 'https://registry.hub.docker.com/v2/namespaces/',
+ headers: {
+ Authorization: `JWT ${jwt}`
+ }
+ }, (error, response, body) => {
+ if (error) {
+ repositoryServerActions.error({error});
+ }
+
+ let data = JSON.parse(body);
+ let namespaces = data.namespaces;
+ async.map(namespaces, (namespace, cb) => {
+ request.get({
+ url: `https://registry.hub.docker.com/v2/repositories/${namespace}`,
+ headers: {
+ Authorization: `JWT ${jwt}`
+ }
+ }, (error, response, body) => {
+ if (error) {
+ repositoryServerActions.error({error});
+ }
+
+ let data = JSON.parse(body);
+ cb(null, data.results);
+ });
+ }, (error, lists) => {
+ let repos = [];
+ for (let list of lists) {
+ repos = repos.concat(list);
+ }
+ repositoryServerActions.fetched({repos});
+ });
+ });
+ }
+};
diff --git a/styles/header.less b/styles/header.less
index 004d149f85..a02041f81d 100644
--- a/styles/header.less
+++ b/styles/header.less
@@ -1,7 +1,7 @@
.header {
position: absolute;
min-width: 100%;
- min-height: 40px;
+ min-height: 60px;
-webkit-app-region: drag;
-webkit-user-select: none;
&.no-drag {
diff --git a/styles/main.less b/styles/main.less
index 87f3db3143..9ec9503bcb 100644
--- a/styles/main.less
+++ b/styles/main.less
@@ -15,6 +15,7 @@
@import "container-home.less";
@import "container-logs.less";
@import "container-settings.less";
+@import "spinner.less";
@import "animation.less";
html, body {
@@ -23,6 +24,7 @@ html, body {
overflow: hidden;
background: none;
-webkit-user-select: none;
+ -webkit-user-drag: none;
font-family: @font-regular;
cursor: default;
img {
diff --git a/styles/setup.less b/styles/setup.less
index af842c24e0..833bf789af 100644
--- a/styles/setup.less
+++ b/styles/setup.less
@@ -30,6 +30,135 @@
}
}
+ .form-section {
+ display: flex;
+ width: 50%;
+ flex: 0 auto;
+ align-items: flex-end;
+ justify-content: center;
+ padding-right: 60px;
+ padding-left: 80px;
+ flex-direction: column;
+
+ img {
+ width: 323px;
+ height: 64px;
+ }
+
+ form {
+ margin-top: 40px;
+ text-align: right;
+ input[type="text"], input[type="password"] {
+ display: block;
+ border: 0;
+ border-bottom: 1px solid @gray-lightest;
+ color: @gray-normal;
+ font-weight: 300;
+ padding: 10px 5px;
+ transition: all 0.25s;
+ font-size: 18px;
+ width: 340px;
+ &.error {
+ border-bottom: 1px solid @brand-negative;
+ &:focus {
+ border-bottom: 1px solid @brand-negative;
+ }
+ }
+ &:focus {
+ outline: 0;
+ border-bottom: 1px solid @brand-action;
+ }
+ &::-webkit-input-placeholder {
+ color: @gray-lighter;
+ font-weight: 400;
+ }
+ }
+
+ div.checkbox {
+ text-align: left;
+ color: @gray-normal;
+ }
+
+ div.submit {
+ margin-top: 10px;
+ display: flex;
+ flex-direction: row;
+ justify-content: flex-end;
+ align-items: center;
+
+ .spinner {
+ margin-right: 10px;
+ flex: 0 auto;
+ }
+
+ button[type="submit"] {
+ flex: 0 auto;
+ display: block;
+ font-size: 18px;
+ padding: 10px 20px;
+ color: white;
+ background-color: @brand-action;
+ border: 0;
+ &:hover {
+ background-color: darken(@brand-action, 5%);
+ }
+ }
+ }
+
+ hr {
+ border-top: 1px solid #D7DFEA;
+ }
+
+ .extra {
+ text-align: center;
+ font-size: 14px;
+ color: @gray-normal;
+ margin-top: 16px;
+ .btn {
+ margin-left: 6px;
+ position: relative;
+ top: -3px;
+ }
+
+ a {
+ color: @brand-primary;
+ }
+ }
+ .link {
+ display: block;
+ font-size: 10px;
+ text-align: left;
+ position: relative;
+ top: -15px;
+ left: 5px;
+ }
+ .error-message {
+ font-size: 12px;
+ margin-top: 5px;
+ margin-bottom: 0;
+ min-height: 17px;
+ color: @brand-negative;
+ }
+ div.error {
+ font-size: 13px;
+ color: @gray-normal;
+ color: @brand-negative;
+ background-color: lighten(@brand-negative, 32%);
+ padding: 10px;
+ border-radius: 4px;
+ width: 340px;
+ display: none;
+ }
+ }
+ }
+
+ .btn-skip {
+ position: absolute;
+ bottom: 20px;
+ left: 20px;
+ font-size: 14px;
+ }
+
.desc {
display: flex;
width: 50%;
diff --git a/styles/spinner.less b/styles/spinner.less
new file mode 100644
index 0000000000..67588b20fe
--- /dev/null
+++ b/styles/spinner.less
@@ -0,0 +1,97 @@
+/*
+The MIT License (MIT)
+
+Copyright (c) 2014-2015 Daniel Cardoso
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+@import "variables.less";
+
+.la-ball-clip-rotate {
+ display: block;
+}
+.la-ball-clip-rotate > div {
+ box-sizing: content-box;
+ color: #fff;
+ background: #fff;
+ border-color: #fff;
+ border-style: solid;
+ border-width: 0;
+}
+.la-ball-clip-rotate:after {
+ display: table;
+ clear: both;
+ line-height: 0;
+ content: "";
+}
+.la-ball-clip-rotate.la-dark > div {
+ color: @brand-primary;
+ background: @brand-primary;
+ border-color: @brand-primary;
+}
+/*
+ * Animation
+ */
+@-webkit-keyframes ball-clip-rotate {
+ 0% {
+ transform: rotate(0deg);
+ }
+ 50% {
+ transform: rotate(180deg);
+ }
+ 100% {
+ transform: rotate(360deg);
+ }
+}
+.la-ball-clip-rotate {
+ width: 32px;
+ height: 32px;
+}
+.la-ball-clip-rotate > div {
+ display: block;
+ float: left;
+ width: 28px;
+ height: 28px;
+ margin: 0;
+ background: transparent !important;
+ border-style: solid;
+ border-width: 1.8px;
+ border-bottom-color: transparent !important;
+ border-radius: 100%;
+ -webkit-animation: ball-clip-rotate 0.9s linear infinite;
+}
+.la-ball-clip-rotate.la-sm {
+ width: 16px;
+ height: 16px;
+}
+.la-ball-clip-rotate.la-sm > div {
+ width: 14px;
+ height: 14px;
+ margin: 0;
+ border-width: 1px;
+}
+.la-ball-clip-rotate.la-lg {
+ width: 48px;
+ height: 48px;
+}
+.la-ball-clip-rotate.la-lg > div {
+ width: 42px;
+ height: 42px;
+ margin: 0;
+ border-width: 3px;
+}
+.la-ball-clip-rotate.la-2x {
+ width: 64px;
+ height: 64px;
+}
+.la-ball-clip-rotate.la-2x > div {
+ width: 56px;
+ height: 56px;
+ margin: 0;
+ border-width: 4px;
+}