Ghost/ghost/admin/app/styles/components/uploader.css
Kevin Ansfield 762c3c4df0 SimpleMDE editor (#682)
no issue

* move "save on first change" behaviour into editor controller
* allow TAB events to be specified in keyEvents hash of gh-input
* replace mobiledoc-kit/gh-koenig with a SimpleMDE based editor
    - remove `gh-koenig` in-repo-addon from `package.json` so that test files etc aren't loaded
    - remove `mobiledoc-kit` dependencies
    - extends `gh-editor` to handle file drag/drop
    - adds `gh-uploader` and `gh-progress-bar` components to handle file uploads in a more composable manner
    - adds `gh-simplemde` component that wraps SimpleMDE
2017-05-08 11:35:42 +01:00

134 lines
2.6 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: #fff;
border-radius: 4px;
color: color(var(--midgrey) l(-18%));
text-align: center;
border-radius: 4px;
}
.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%;
min-width: 200px;
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;
display: flex;
align-items: center;
}
.gh-image-uploader .image-cancel svg {
fill: #fff;
height: 13px;
width: auto;
}
.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;
justify-content: center;
outline: none;
}
.gh-image-uploader .description {
width: 100%;
text-align: center;
font-size: 1.6rem;
}
.gh-image-uploader .image-cancel:hover {
background: var(--red);
color: #fff;
cursor: pointer;
}
.gh-image-uploader .failed {
margin: 1em 2em;
font-size: 16px;
}
/* TODO: remove the gh-image-uploader classes once it's using gh-progrss-bar */
.gh-image-uploader .progress-container,
.gh-progress-container {
flex-grow: 1;
display: flex;
flex-direction: row;
align-items: center;
width: 100%;
}
.gh-image-uploader .progress,
.gh-progress-container-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 .bar,
.gh-progress-bar {
height: 12px;
background: var(--blue);
}
.gh-image-uploader .bar.fail,
.gh-progress-bar.-error {
width: 100% !important;
background: var(--red);
}
/* Try Again button */
.gh-image-uploader .gh-btn-green:last-child {
margin-top: 1em;
margin-bottom: 3em;
}