mirror of https://github.com/docker/docs.git
Better spinners
This commit is contained in:
parent
84904652b5
commit
cb9a1b4f7f
|
@ -418,7 +418,6 @@ var ContainerDetails = React.createClass({
|
||||||
if (this.state.progress) {
|
if (this.state.progress) {
|
||||||
body = (
|
body = (
|
||||||
<div className="details-progress">
|
<div className="details-progress">
|
||||||
<h3>Downloading</h3>
|
|
||||||
<Radial progress={Math.round(this.state.progress * 100)}/>
|
<Radial progress={Math.round(this.state.progress * 100)}/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -10,12 +10,12 @@ var ContainerList = React.createClass({
|
||||||
var self = this;
|
var self = this;
|
||||||
var containers = this.props.containers.map(function (container) {
|
var containers = this.props.containers.map(function (container) {
|
||||||
return (
|
return (
|
||||||
<ContainerListItem container={container} start={self._start}/>
|
<ContainerListItem key={container.Id} container={container} start={self._start}/>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
return (
|
return (
|
||||||
<ul>
|
<ul>
|
||||||
<ContainerListNewItem containers={this.props.containers} />
|
<ContainerListNewItem key={'newcontainer'} containers={this.props.containers} />
|
||||||
{containers}
|
{containers}
|
||||||
</ul>
|
</ul>
|
||||||
);
|
);
|
||||||
|
|
|
@ -66,7 +66,7 @@ var ContainerListItem = React.createClass({
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Router.Link key={container.Name} data-container={name} to="container" params={{name: container.Name}}>
|
<Router.Link data-container={name} to="container" params={{name: container.Name}}>
|
||||||
<li onMouseEnter={self.handleItemMouseEnter} onMouseLeave={self.handleItemMouseLeave}>
|
<li onMouseEnter={self.handleItemMouseEnter} onMouseLeave={self.handleItemMouseLeave}>
|
||||||
{state}
|
{state}
|
||||||
<div className="info">
|
<div className="info">
|
||||||
|
|
|
@ -61,7 +61,6 @@ var Containers = React.createClass({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleNewContainer: function () {
|
handleNewContainer: function () {
|
||||||
console.log($(this.getDOMNode()).find('.new-container-item'));
|
|
||||||
$(this.getDOMNode()).find('.new-container-item').parent().fadeIn();
|
$(this.getDOMNode()).find('.new-container-item').parent().fadeIn();
|
||||||
this.transitionTo('new');
|
this.transitionTo('new');
|
||||||
},
|
},
|
||||||
|
|
|
@ -2,6 +2,7 @@ var $ = require('jquery');
|
||||||
var React = require('react/addons');
|
var React = require('react/addons');
|
||||||
var RetinaImage = require('react-retina-image');
|
var RetinaImage = require('react-retina-image');
|
||||||
var ContainerStore = require('./ContainerStore');
|
var ContainerStore = require('./ContainerStore');
|
||||||
|
var Radial = require('./Radial.react');
|
||||||
var assign = require('object-assign');
|
var assign = require('object-assign');
|
||||||
|
|
||||||
var NewContainer = React.createClass({
|
var NewContainer = React.createClass({
|
||||||
|
@ -118,10 +119,16 @@ var NewContainer = React.createClass({
|
||||||
var logoStyle = {
|
var logoStyle = {
|
||||||
backgroundImage: `linear-gradient(-180deg, ${r.gradient_start} 4%, ${r.gradient_end} 100%)`
|
backgroundImage: `linear-gradient(-180deg, ${r.gradient_start} 4%, ${r.gradient_end} 100%)`
|
||||||
};
|
};
|
||||||
|
var imgsrc;
|
||||||
|
if (r.img) {
|
||||||
|
imgsrc = `https://kitematic.com/recommended/${r.img}`;
|
||||||
|
} else {
|
||||||
|
imgsrc = 'https://kitematic.com/recommended/kitematic_html.png';
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<div key={r.name} className="image-item">
|
<div key={r.name} className="image-item">
|
||||||
<div className="logo" style={logoStyle}>
|
<div className="logo" style={logoStyle}>
|
||||||
<RetinaImage src={'https://kitematic.com/recommended/' + r.img}/>
|
<RetinaImage src={imgsrc}/>
|
||||||
</div>
|
</div>
|
||||||
<div className="card">
|
<div className="card">
|
||||||
<div className="name">
|
<div className="name">
|
||||||
|
@ -156,9 +163,7 @@ var NewContainer = React.createClass({
|
||||||
} else {
|
} else {
|
||||||
results = (
|
results = (
|
||||||
<div className="no-results">
|
<div className="no-results">
|
||||||
<h3>
|
<Radial spin="true" progress={90}/>
|
||||||
No Results
|
|
||||||
</h3>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -174,24 +179,22 @@ var NewContainer = React.createClass({
|
||||||
});
|
});
|
||||||
return (
|
return (
|
||||||
<div className="details">
|
<div className="details">
|
||||||
<div className="detail-panel">
|
<div className="new-container">
|
||||||
<div className="new-container">
|
<div className="new-container-header">
|
||||||
<div className="new-container-header">
|
<div className="text">
|
||||||
<div className="text">
|
Pick an image to create new container.
|
||||||
Pick an image to create new container.
|
</div>
|
||||||
</div>
|
<div className="search">
|
||||||
<div className="search">
|
<div className="search-bar">
|
||||||
<div className="search-bar">
|
<input type="search" ref="searchInput" className="form-control" placeholder="Find an existing image" onChange={this.handleChange}/>
|
||||||
<input type="search" ref="searchInput" className="form-control" placeholder="Find an existing image" onChange={this.handleChange}/>
|
<div className={magnifierClasses}></div>
|
||||||
<div className={magnifierClasses}></div>
|
<RetinaImage className={loadingClasses} src="loading.png"/>
|
||||||
<RetinaImage className={loadingClasses} src="loading.png"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="results">
|
</div>
|
||||||
<h4>{title}</h4>
|
<div className="results">
|
||||||
{results}
|
<h4>{title}</h4>
|
||||||
</div>
|
{results}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -23,10 +23,17 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: row wrap;
|
flex-flow: row wrap;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
margin-top: 20px;
|
margin-top: 10px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
.image-item {
|
.image-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
width: 320px;
|
||||||
|
height: 170px;
|
||||||
|
border-radius: 4px;
|
||||||
|
border: 1px solid @gray-lightest;
|
||||||
|
background-color: white;
|
||||||
|
margin-right: 20px;
|
||||||
|
margin-bottom: 20px;
|
||||||
.logo {
|
.logo {
|
||||||
flex: 1 auto;
|
flex: 1 auto;
|
||||||
min-width: 90px;
|
min-width: 90px;
|
||||||
|
@ -113,22 +120,28 @@
|
||||||
bottom: 0px;
|
bottom: 0px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
width: 320px;
|
|
||||||
height: 170px;
|
|
||||||
border-radius: 4px;
|
|
||||||
border: 1px solid @gray-lightest;
|
|
||||||
background-color: white;
|
|
||||||
margin-right: 20px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.new-container {
|
.new-container {
|
||||||
|
display: flex;
|
||||||
|
flex: 1 auto;
|
||||||
|
flex-direction: column;
|
||||||
padding: 35px 20px 32px 25px;
|
padding: 35px 20px 32px 25px;
|
||||||
.new-container-header {
|
.results {
|
||||||
margin-bottom: 28px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: 1;
|
flex-direction: column;
|
||||||
|
flex: 1 auto;
|
||||||
|
.no-results {
|
||||||
|
flex: 1 auto;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.new-container-header {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
display: flex;
|
||||||
|
flex: 0 auto;
|
||||||
.text {
|
.text {
|
||||||
flex: 1 auto;
|
flex: 1 auto;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
|
|
|
@ -15,7 +15,6 @@ html, body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
-webkit-font-smoothing: antialiased;
|
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
|
font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
|
||||||
|
|
||||||
|
|
|
@ -12,12 +12,12 @@
|
||||||
.radial-progress {
|
.radial-progress {
|
||||||
|
|
||||||
&.radial-spinner {
|
&.radial-spinner {
|
||||||
-webkit-animation: rotating 2.4s linear infinite;
|
-webkit-animation: rotating 1.6s linear infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
@circle-size: 140px;
|
@circle-size: 140px;
|
||||||
@circle-background: #F2F2F2;
|
@circle-background: #F2F2F2;
|
||||||
@inset-size: 136px;
|
@inset-size: @circle-size - 4;
|
||||||
@inset-color: white;
|
@inset-color: white;
|
||||||
@transition-length: 1s;
|
@transition-length: 1s;
|
||||||
// @percentage-color: #3FD899;
|
// @percentage-color: #3FD899;
|
||||||
|
@ -28,7 +28,6 @@
|
||||||
width: @circle-size;
|
width: @circle-size;
|
||||||
height: @circle-size;
|
height: @circle-size;
|
||||||
|
|
||||||
background-color: @circle-background;
|
|
||||||
border-radius: 100%;
|
border-radius: 100%;
|
||||||
.circle {
|
.circle {
|
||||||
.mask, .fill, .shadow {
|
.mask, .fill, .shadow {
|
||||||
|
|
Loading…
Reference in New Issue