Ghost/ghost/admin/app/styles/components/uploader.css
Kevin Ansfield 62553cdf92 Replace jQuery-based uploader.js with ember components
no issue
- adds `gh-image-uploader` that handles image uploads in a fully ember fashion and with no dependency on `uploader.js`
- adds `gh-image-uploader-with-preview` that can fully replace the old `gh-uploader`
- replace uses of `gh-uploader` in PSM & TSM with `gh-image-uploader-with-preview`
- updates the editor preview image handling to use the new `gh-image-uploader-with-preview` component
- updates the image upload modal to use `gh-image-uploader` (utilises the `saveButton=false` flag which means the preview has to be handled externally to avoid auto-replacement when typing a URL)
- removes all old `uploader.js` related code
- adds custom `RequestEntityTooLargeError` and `UnsupportedMediaTypeError` errors to our `ajax` service
2016-04-05 12:03:20 +01:00

163 lines
3.0 KiB
CSS

/* Image Uploader
/* ---------------------------------------------------------- */
.gh-image-uploader {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
overflow: hidden;
margin: 1.6em 0;
min-height: 130px;
width: 100%;
background: #f6f7f8;
border-radius: 4px;
color: #808284;
text-align: center;
}
.gh-image-uploader.--drag-over {
border: 2px solid;
}
.gh-image-uploader.--with-image {
background: rgba(0, 0, 0, 0.1);
border-radius: 2px;
}
.gh-image-uploader img {
display: block;
margin: 0 auto;
max-width: 100%;
line-height: 0;
}
.gh-image-uploader .image-cancel {
position: absolute;
top: 10px;
right: 10px;
z-index: 300;
display: block;
padding: 8px;
background: rgba(0, 0, 0, 0.6);
border-radius: var(--border-radius);
box-shadow: rgba(255, 255, 255, 0.2) 0 0 0 1px;
color: #fff;
text-decoration: none;
font-size: 13px;
line-height: 10px;
}
.gh-image-uploader .upload-form {
flex-grow: 1;
display: flex;
flex-direction: row;
}
.gh-image-uploader .x-file-input {
flex-grow: 1;
display: flex;
}
.gh-image-uploader .x-file-input label {
flex-grow: 1;
display: flex;
align-items: center;
outline: none;
}
.gh-image-uploader .description {
width: 100%;
text-align: center;
font-size: 1.6rem;
}
.gh-image-uploader .image-upload,
.gh-image-uploader .image-url {
position: absolute;
bottom: 0;
left: 0;
display: block;
padding: 10px;
color: var(--midgrey);
text-decoration: none;
font-size: 14px;
line-height: 12px;
}
.gh-image-uploader a {
color: var(--midgrey);
text-decoration: none;
}
.gh-image-uploader a:hover {
color: var(--darkgrey);
}
.gh-image-uploader .image-upload:hover,
.gh-image-uploader .image-url:hover {
cursor: pointer;
}
.gh-image-uploader form {
padding: 55px 60px;
width: 100%;
}
.gh-image-uploader input.url {
margin: 0 0 10px 0;
padding: 9px 7px;
outline: 0;
background: #fff;
vertical-align: middle;
font: -webkit-small-control;
font-size: 1.4rem;
}
.gh-image-uploader input.url + .btn.btn-blue {
color: #fff;
}
.gh-image-uploader .image-cancel:hover {
background: var(--red);
color: #fff;
cursor: pointer;
}
.gh-image-uploader .progress-container {
flex-grow: 1;
display: flex;
flex-direction: row;
align-items: center;
width: 100%;
}
.gh-image-uploader .progress {
overflow: hidden;
margin: 0 auto;
width: 60%;
background: linear-gradient(to bottom, #f5f5f5, #f9f9f9);
border-radius: 12px;
box-shadow: rgba(0, 0, 0, 0.1) 0 1px 2px inset;
}
.gh-image-uploader .failed {
margin: 1em 2em;
font-size: 16px;
}
.gh-image-uploader .bar {
height: 12px;
background: var(--blue);
}
.gh-image-uploader .bar.fail {
width: 100% !important;
background: var(--red);
}
/* Try Again button */
.gh-image-uploader .btn-green:last-child {
margin-top: 1em;
margin-bottom: 3em;
}