mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 22:02:11 +03:00
762c3c4df0
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
320 lines
5.5 KiB
CSS
320 lines
5.5 KiB
CSS
/* Editor /ghost/editor/
|
|
/* ---------------------------------------------------------- */
|
|
|
|
.editor-options .dropdown-menu {
|
|
top: 35px;
|
|
right: 0;
|
|
left: auto;
|
|
}
|
|
|
|
|
|
/* Tags input CSS (TODO: needs some revision)
|
|
/* ------------------------------------------------------ */
|
|
.tags-input-list {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
margin: 0;
|
|
padding: 0;
|
|
list-style-type: none;
|
|
}
|
|
|
|
.tags-input-list li {
|
|
flex: 1 0 auto;
|
|
}
|
|
|
|
.label-tag {
|
|
margin-right: 0.3em;
|
|
padding: 0.2em 0.6em 0.3em;
|
|
background-color: var(--darkgrey);
|
|
border-radius: 0.25em;
|
|
color: var(--lightgrey);
|
|
text-align: center;
|
|
font-weight: 300;
|
|
}
|
|
|
|
.label-tag.highlight {
|
|
background: var(--midgrey);
|
|
color: #fff;
|
|
}
|
|
|
|
.tag-input {
|
|
margin-top: 5px;
|
|
border: none;
|
|
font-weight: 300;
|
|
cursor: default;
|
|
}
|
|
|
|
.tag-input:focus {
|
|
outline: 0;
|
|
}
|
|
|
|
.publish-bar-actions {
|
|
flex: 1 0 auto;
|
|
align-self: auto;
|
|
display: flex;
|
|
text-align: right;
|
|
}
|
|
|
|
.post-settings {
|
|
position: relative;
|
|
display: inline-block;
|
|
padding: 15px;
|
|
color: var(--midgrey);
|
|
transition: all 0.15s ease-out 0s;
|
|
line-height: 0;
|
|
z-index: 1000;
|
|
}
|
|
|
|
.post-settings:hover,
|
|
.post-settings.active {
|
|
color: var(--darkgrey);
|
|
}
|
|
|
|
.post-settings svg {
|
|
width: 16px;
|
|
height: 16px;
|
|
fill: var(--midgrey);
|
|
}
|
|
|
|
.post-settings svg:hover,
|
|
.post-settings.active svg {
|
|
fill: var(--darkgrey);
|
|
}
|
|
|
|
.post-settings-menu .dropdown-menu {
|
|
top: auto;
|
|
right: 100%;
|
|
bottom: 100%;
|
|
left: auto;
|
|
}
|
|
|
|
.post-view-link {
|
|
position: absolute;
|
|
top: 1px;
|
|
right: 0;
|
|
font-size: 1.3rem;
|
|
}
|
|
|
|
.post-view-link svg {
|
|
display: inline;
|
|
height: 10px;
|
|
width: auto;
|
|
fill: var(--blue);
|
|
}
|
|
|
|
|
|
/* Post settings meta
|
|
/* ---------------------------------------------------------- */
|
|
|
|
/* Google Imitation */
|
|
.seo-preview {
|
|
font-family: Arial, sans-serif;
|
|
}
|
|
|
|
.seo-preview-title {
|
|
color: #1e0fbe;
|
|
text-overflow: ellipses;
|
|
word-wrap: break-word;
|
|
font-size: 1.8rem;
|
|
line-height: 2.16rem;
|
|
|
|
-webkit-text-overflow: ellipsis;
|
|
}
|
|
|
|
.seo-preview-link {
|
|
margin: 1px 0 2px 0;
|
|
color: #006621;
|
|
word-wrap: break-word;
|
|
font-size: 1.3rem;
|
|
line-height: 1.6rem;
|
|
}
|
|
|
|
.seo-preview-description {
|
|
color: #545454;
|
|
word-wrap: break-word;
|
|
font-size: 1.3rem;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
|
|
|
|
/* NEW editor
|
|
/* ---------------------------------------------------------- */
|
|
|
|
.gh-editor-header {
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
left: 0;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 0 30px;
|
|
height: 80px;
|
|
}
|
|
@media (max-width: 750px) {
|
|
.gh-editor-header { padding: 0 4vw; }
|
|
}
|
|
|
|
.gh-editor-header-small {
|
|
height: 43px;
|
|
padding: 0;
|
|
padding-left: 15px;
|
|
background: #fff;
|
|
border-bottom: 1px solid color(var(--lightgrey) l(+4%));
|
|
z-index: 100;
|
|
}
|
|
|
|
.gh-editor-header-small .gh-publishmenu {
|
|
line-height: 0;
|
|
}
|
|
|
|
.gh-editor-header-small .post-settings {
|
|
padding: 13px 15px;
|
|
}
|
|
|
|
.gh-editor-status {
|
|
color: var(--midgrey);
|
|
font-weight: 300;
|
|
}
|
|
|
|
.gh-editor-container {
|
|
position: absolute;
|
|
overflow-y: auto;
|
|
padding: 10vw 4vw;
|
|
width: 100%;
|
|
height: 100%;
|
|
z-index: 0;
|
|
}
|
|
|
|
.gh-editor-inner {
|
|
margin: 0 auto;
|
|
max-width: 760px;
|
|
height: 100%;
|
|
}
|
|
|
|
.gh-editor-title {
|
|
width: 100%;
|
|
min-height: 1.3em;
|
|
margin-bottom: 2vw;
|
|
border: none;
|
|
letter-spacing: 0.8px;
|
|
font-weight: bold;
|
|
font-size: 3.2rem;
|
|
line-height: 1.3em;
|
|
|
|
}
|
|
|
|
.gh-editor-wordcount {
|
|
position: fixed;
|
|
bottom: 0px;
|
|
padding:10px;
|
|
}
|
|
|
|
@media (max-width: 1200px) {
|
|
.gh-editor-wordcount {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
/* SimpleMDE editor
|
|
/* ---------------------------------------------------------- */
|
|
|
|
.gh-editor-container {
|
|
position: relative;
|
|
}
|
|
|
|
.gh-editor-footer {
|
|
height: 48px;
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
border-top: 1px solid var(--lightgrey);
|
|
}
|
|
|
|
.gh-editor-footer .editor-toolbar {
|
|
border: none;
|
|
border-radius: 0;
|
|
background-color: #fff;
|
|
opacity: 1;
|
|
}
|
|
|
|
.gh-editor-footer .editor-toolbar:before,
|
|
.gh-editor-footer .editor-toolbar:after {
|
|
content: none;
|
|
}
|
|
|
|
.gh-editor-footer .editor-toolbar a:focus {
|
|
outline: none;
|
|
}
|
|
|
|
.gh-editor .CodeMirror {
|
|
padding: 0;
|
|
overflow: visible;
|
|
}
|
|
|
|
.gh-editor .gh-editor-title,
|
|
.gh-editor .CodeMirror-wrap {
|
|
max-width: 760px;
|
|
margin: 0 auto;
|
|
border: none;
|
|
}
|
|
|
|
.gh-editor .CodeMirror pre {
|
|
padding: 0;
|
|
}
|
|
|
|
.gh-editor .editor-preview {
|
|
height: auto;
|
|
margin-top: 4px;
|
|
padding: 0;
|
|
background-color: #fff;
|
|
}
|
|
|
|
.gh-editor-drop-target,
|
|
.gh-editor-image-upload {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border: 2px solid blue;
|
|
content: '';
|
|
z-index: 9999;
|
|
background-color: rgba(255,255,255,0.6);
|
|
}
|
|
|
|
.gh-editor-drop-target .drop-target-message {
|
|
padding: 1em;
|
|
background-color: #fff;
|
|
border-radius: 1em;
|
|
}
|
|
|
|
.gh-editor-image-upload.-error {
|
|
border: 2px solid red;
|
|
}
|
|
|
|
.gh-editor-image-upload-content {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-direction: column;
|
|
padding: 1em;
|
|
background-color: #fff;
|
|
border-radius: 1em;
|
|
max-width: 80%;
|
|
}
|
|
|
|
.gh-editor-image-upload .gh-progress-container-progress {
|
|
width: 100%;
|
|
}
|
|
|
|
/* TODO: need a way to make stroke + fill global without causing issues with certain icons */
|
|
.gh-editor-image-upload .gh-btn-grey svg path {
|
|
stroke: color(var(--darkgrey) l(+15%));
|
|
}
|