Ghost-Admin/app/styles/layouts/editor.css

703 lines
13 KiB
CSS

/* Editor /ghost/editor/
/* ---------------------------------------------------------- */
/* Title
/* ---------------------------------------------------------- */
.entry-title {
position: relative;
padding: 0;
height: 60px;
}
.entry-title input {
margin: 0;
padding: 0;
width: 100%;
height: 60px;
border: 0;
background: transparent;
text-indent: 20px;
letter-spacing: -1px;
font-size: 3.2rem;
font-weight: bold;
}
.entry-title input:focus {
outline: 0;
}
/* Container & Headers
/* ---------------------------------------------------------- */
.editor {
/* The two content panel wrappers, positioned left/right */
/* The visual styles for both panels */
}
@media (min-width: 401px) {
.editor .notifications.bottom {
bottom: 40px;
}
}
.editor .entry-markdown {
left: 0;
}
.editor .entry-preview {
right: 0;
border-left: #e1e1e1 1px solid;
}
.editor .entry-markdown,
.editor .entry-preview {
position: absolute;
top: 60px;
bottom: 40px;
padding: 15px;
width: 50%;
border-top: #e1e1e1 1px solid;
background: #fff;
/* Hide markdown icon + wordcount when we hit mobile */
/* Give the tab with the .active class the highest z-index */
/* Restore the normal height of the .active tab (inactive tab stays small, hidden behind) */
/* Restore the white bg of the currently .active tab, remove hand cursor from currently active tab */
}
@media (max-width: 400px) {
.editor .entry-markdown .markdown-help,
.editor .entry-markdown .entry-word-count,
.editor .entry-preview .markdown-help,
.editor .entry-preview .entry-word-count {
display: none;
}
}
@media (max-width: 1000px) {
.editor .entry-markdown,
.editor .entry-preview {
/* Convert all content areas to small boxes */
top: 100px;
right: 0;
left: 0;
z-index: 100;
width: 100%;
border: none;
/* Correctly colour the markdown icon when inactive and hovered */
}
.editor .entry-markdown .markdown,
.editor .entry-markdown .entry-preview-content,
.editor .entry-preview .markdown,
.editor .entry-preview .entry-preview-content {
overflow: hidden;
height: 50px;
}
.editor .entry-markdown:not(.active) .markdown-help:hover:before,
.editor .entry-preview:not(.active) .markdown-help:hover:before {
color: #fff;
}
}
.editor .entry-markdown .floatingheader a,
.editor .entry-preview .floatingheader a {
color: var(--brown);
}
@media (max-width: 1000px) {
.editor .entry-markdown .floatingheader,
.editor .entry-preview .floatingheader {
position: absolute;
top: -40px;
left: 0;
width: 50%;
background: var(--brown);
box-shadow: rgba(0, 0, 0, 0.1) 0 -2px 3px inset;
color: #fff;
font-weight: normal;
cursor: pointer;
}
.editor .entry-markdown .floatingheader a,
.editor .entry-preview .floatingheader a {
color: #fff;
}
}
.editor .entry-markdown .floatingheader .entry-word-count,
.editor .entry-preview .floatingheader .entry-word-count {
position: relative;
top: 2px;
float: right;
}
.editor .entry-markdown.active,
.editor .entry-preview.active {
z-index: 200;
}
.editor .entry-markdown.active .markdown,
.editor .entry-markdown.active .entry-preview-content,
.editor .entry-preview.active .markdown,
.editor .entry-preview.active .entry-preview-content {
overflow: auto;
-webkit-overflow-scrolling: touch;
height: auto;
}
@media (max-width: 1000px) {
.editor .entry-markdown.active header,
.editor .entry-preview.active header {
border-top: #e1e1e1 1px solid;
background: #fff;
box-shadow: none;
color: var(--brown);
cursor: auto;
}
.editor .entry-markdown.active header a,
.editor .entry-preview.active header a {
color: var(--brown);
}
}
/* Editor (Left pane)
/* ---------------------------------------------------------- */
.editor .entry-markdown-content {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
.editor .markdown-editor {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: auto;
-webkit-overflow-scrolling: touch;
max-width: 100%;
height: 100%;
border: 0;
color: color(var(--darkgrey) lightness(+10%));
font-family: var(--font-family-mono);
font-size: 1.6rem;
line-height: 2.5rem;
resize: none;
}
.editor .markdown-editor:focus {
outline: 0;
}
@media (max-width: 450px) {
.editor .markdown-editor {
padding: 15px;
}
}
@media (min-width: 451px) and (max-width: 1000px) {
.editor .markdown-editor {
padding: 20px;
}
}
@media (min-width: 1001px) {
.editor .markdown-editor {
padding: 42px 20px 36px 20px;
}
}
@media (max-width: 1000px) {
.editor .entry-preview .floatingheader {
/* Align the tab of entry-preview on the right */
right: 0;
left: auto;
border-right: none;
}
}
.editor .entry-preview-content {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: auto;
-webkit-overflow-scrolling: touch;
padding: 40px 20px 37px 20px;
word-break: break-word;
hyphens: auto;
cursor: default;
}
@media (max-width: 400px) {
.editor .entry-preview-content {
padding: 15px;
}
}
@media (max-width: 1000px) {
.editor .scrolling .floatingheader {
box-shadow: none;
}
.editor .scrolling .floatingheader:before,
.editor .scrolling .floatingheader:after {
display: none;
}
}
@media (max-width: 1000px) and (max-width: 1000px) {
.editor .entry-preview-content {
box-shadow: 0 5px 5px rgba(0, 0, 0, 0.05) inset;
}
}
.markdown-help {
float: right;
padding: 5px;
}
/* FFF: Fucking Firefox Fixes
/* ---------------------------------------------------------- */
@-moz-document url-prefix() {
.editor .markdown-editor {
top: 40px;
padding-top: 0;
padding-bottom: 0;
height: calc(100% - 40px);
}
}
/* Preview (Right pane)
/* ---------------------------------------------------------- */
/* The styles for the actual content inside the preview */
.entry-preview-content,
.content-preview-content {
font-size: 1.8rem;
line-height: 1.5em;
font-weight: 200;
}
.entry-preview-content *,
.content-preview-content * {
user-select: all;
}
.entry-preview-content a,
.content-preview-content a {
color: var(--blue);
text-decoration: underline;
}
.entry-preview-content sup a,
.content-preview-content sup a {
text-decoration: none;
}
.entry-preview-content .btn,
.content-preview-content .btn {
color: var(--grey);
text-decoration: none;
}
.entry-preview-content .img-placeholder,
.content-preview-content .img-placeholder {
position: relative;
height: 100px;
border: 5px dashed var(--grey);
}
.entry-preview-content .img-placeholder span,
.content-preview-content .img-placeholder span {
position: absolute;
top: 50%;
display: block;
margin-top: -15px;
width: 100%;
height: 30px;
text-align: center;
}
.entry-preview-content a.image-edit,
.content-preview-content a.image-edit {
width: 16px;
height: 16px;
}
.entry-preview-content img,
.content-preview-content img {
margin: 0 auto;
max-width: 100%;
height: auto;
}
/* Placeholder objects for <script> & <iframe> */
.js-embed-placeholder,
.iframe-embed-placeholder {
padding: 100px 20px;
border: none;
background: #f9f9f9;
text-align: center;
font-family: var(--font-family);
font-size: 1.6rem;
font-weight: bold;
}
/* Zen Mode
/* ---------------------------------------------------------- */
body.zen {
background: color(#e1e1e1 lightness(+3%));
}
body.zen .usermenu {
display: none;
}
body.zen .global-nav,
body.zen .page-header,
body.zen #publish-bar {
overflow: hidden;
height: 0;
opacity: 0;
transition: all 0.5s ease-out;
}
body.zen .page-content {
top: 0;
transition: all 0.5s ease-out;
}
body.zen .entry-markdown,
body.zen .entry-preview {
bottom: 0;
transition: all 0.5s ease-out;
}
/* Publish Bar
/* ---------------------------------------------------------- */
#publish-bar {
position: absolute;
right: 0;
bottom: 0;
left: 0;
z-index: 900;
padding: 0;
height: 40px;
border-top: #e1e1e1 1px solid;
background: #fff;
color: var(--midgrey);
transform: translateZ(0);
}
@media (max-width: 1000px) {
#publish-bar {
font-weight: normal;
}
}
#publish-bar .post-settings:hover,
#publish-bar .post-settings.active {
color: var(--darkgrey);
}
#publish-bar .post-settings-menu {
position: absolute;
right: -3px;
bottom: 41px;
}
.extended-tags {
/* When the tag bar is expanded */
position: static;
min-height: 100%;
}
.extended-tags #entry-tags:after {
right: 10px;
}
.extended-tags .tags {
width: 281px;
}
.extended-tags .tag-input {
margin-top: 5px;
padding-top: 5px;
padding-left: 10px;
width: 100%;
border-top: 1px solid var(--darkgrey);
}
.extended-tags .right {
display: none;
}
#entry-tags input[type="text"].tag-input {
display: inline-block;
padding: 9px 9px 9px 0;
width: 100%;
border: none;
background: transparent;
color: var(--midgrey);
vertical-align: top;
line-height: 1;
font-weight: 300;
}
#entry-tags input[type="text"].tag-input:focus {
outline: none;
}
#entry-tags .tag {
display: inline;
margin-right: 3px;
padding: 2px 5px;
background: var(--darkgrey);
border-radius: 3px;
color: var(--lightgrey);
white-space: nowrap;
font-size: 1.2rem;
line-height: 1.2em;
}
#entry-tags .tag:hover {
cursor: pointer;
}
#entry-tags .tag i {
font-size: 0.7rem;
}
.suggestions {
top: auto;
bottom: calc(100% + 15px);
}
.suggestions li.selected,
.suggestions li.selected a {
background: var(--blue);
color: #fff;
text-decoration: none;
}
.suggestions li.selected mark {
color: #fff;
}
.suggestions mark {
background: none;
color: #000;
font-weight: bold;
}
#entry-actions {
position: relative;
display: flex;
justify-content: flex-end;
align-items: center;
align-content: center;
margin-right: 6px;
}
#entry-actions .dropdown {
position: absolute;
right: 0;
bottom: 49px;
}
#entry-actions .dropdown .dropdown-menu {
top: auto;
right: 100%;
bottom: 100%;
left: auto;
}
#entry-actions.unsaved {
padding-bottom: 0;
}
#entry-actions.unsaved .delete {
display: none;
}
#entry-actions-menu {
position: absolute;
right: -5px;
bottom: 50px;
}
.tags-wrapper {
white-space: nowrap;
}
.tags-wrapper span {
display: inline-block;
margin-right: 10px;
}
.tag-label {
position: relative;
display: block;
width: 40px;
height: 40px;
}
.tag-label:before {
position: absolute;
top: 50%;
left: 50%;
color: var(--midgrey);
font-size: 1.3rem;
transition: color 0.15s linear;
transform: translateX(-50%) translateY(-50%);
}
.tag-label:hover {
cursor: pointer;
}
.publish-bar-inner {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: center;
align-items: center;
align-content: space-between;
width: 100%;
height: 100%;
}
.publish-bar-tags-icon {
flex: 0 1 auto;
align-self: auto;
min-width: 40px;
max-width: 40px;
}
.publish-bar-tags {
flex: 0 1 auto;
align-self: auto;
overflow-y: hidden;
margin-right: 10px;
height: 40px;
}
.publish-bar-tags .tags-wrapper {
overflow: auto;
-webkit-overflow-scrolling: touch;
padding-top: 8px;
padding-bottom: 9px;
height: 70px;
white-space: nowrap;
}
.publish-bar-tags-input {
position: relative;
flex: 1 1 auto;
align-self: auto;
}
.publish-bar-actions {
flex: 1 0 auto;
align-self: auto;
display: flex;
text-align: right;
}
.post-settings {
position: relative;
display: inline-block;
padding: 8px 10px;
color: var(--midgrey);
transition: all 0.15s ease-out 0s;
}
.post-settings:hover,
.post-settings.active {
color: 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 i {
font-size: 10px;
}
/* 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;
}
/* Markdown Help Modal
/* ---------------------------------------------------------- */
.modal-markdown-help-table {
margin: 0 0 20px;
width: 100%;
}
.modal-markdown-help-table td,
.modal-markdown-help-table th {
padding: 8px 0;
}
.modal-markdown-help-table th {
text-align: left;
}