// ------------------------------------------------------------ // Editor // Slug: /ghost/editor/ // // Styles for the Editor // // * Post Title // * Container & Floating Headers // * Editor // * Markdown Help Icon // * Post Preview // * Zen Mode // * Publish Bar // * Post Settings Menu meta Data // * Markdown Help Modal // ------------------------------------------------------------ // // Post Title // -------------------------------------------------- .entry-container .entry-title { height: 60px; padding: 0; position: relative; input { width: 100%; height: 60px; border: 0; margin: 0; padding: 0; font-size: 3.2rem; font-weight: bold; letter-spacing: -1px; text-indent: 20px; background: transparent; &:focus { outline: 0; } } }//.entry-title // // Container & Floating Headers // -------------------------------------------------- .editor { .notifications.bottom { @media (min-width: 401px) { bottom: 40px; } } // The two content panel wrappers, positioned left/right .entry-markdown { left: 0; } .entry-preview { right: 0; border-left: $lightbrown 1px solid; } // The visual styles for both panels .entry-markdown, .entry-preview { width: 50%; padding: 15px; position: absolute; bottom: 40px; // height of the publish bar top: 60px; // height of the post title + margin border-top: $lightbrown 1px solid; background: #fff; // Hide markdown icon + wordcount when we hit mobile @media (max-width: 400px) { .markdown-help, .entry-word-count { display: none; } } @media (max-width: 1000px) { // Convert all content areas to small boxes top: 100px; left: 0; right: 0; width: 100%; border: none; z-index: 100; .markdown, .entry-preview-content { height: 50px; overflow: hidden; } // Correctly colour the markdown icon when inactive and hovered &:not(.active) .markdown-help:hover:before { color: #fff; } }//@media (max-width: 1000px) .floatingheader { a { color: $brown; } // Turn headers into tabs which act as links // both headers set to grey/inactive colour @media (max-width: 1000px) { cursor: pointer; width: 50%; color: #fff; font-weight: normal; background: $brown; position: absolute; top: -40px; left: 0; box-shadow: rgba(0,0,0,0.1) 0 -2px 3px inset; a { color: #fff; } } .entry-word-count { float: right; position: relative; top: 2px; } }//.floatingheader // Give the tab with the .active class the highest z-index &.active { z-index: 200; } // Restore the normal height of the .active tab (inactive tab stays small, hidden behind) &.active .markdown, &.active .entry-preview-content { height: auto; overflow: auto; -webkit-overflow-scrolling: touch; } // Restore the white bg of the currently .active tab, remove hand cursor from currently active tab &.active header { @media (max-width: 1000px) { border-top: $lightbrown 1px solid; cursor: auto; color: $brown; background: #fff; box-shadow: none; a { color: $brown; } } } }//.entry-markdown, .entry-preview } // // Editor // -------------------------------------------------- .editor { .entry-markdown-content { position: absolute; top: 0; right: 0; bottom: 0; left: 0; } .markdown-editor { position: absolute; top: 0; right: 0; bottom: 0; left: 0; height: 100%; max-width: 100%; overflow: auto; -webkit-overflow-scrolling: touch; resize: none; border: 0; font-size: 1.6rem; line-height: 2.5rem; font-family: $font-family-mono; color: lighten($darkgrey, 10%); &:focus { outline: 0; } @media (max-width: 450px) { padding: 15px; } @media (min-width: 451px) and (max-width: 1000px) { padding: 20px; } @media (min-width: 1001px) { padding: 62px 20px 36px 20px; } } .entry-preview { // Align the tab of entry-preview on the right .floatingheader { @media (max-width: 1000px) { right: 0; left: auto; border-right: none; } } } .entry-preview-content { position: absolute; top: 0; right: 0; bottom: 0; left: 0; padding: 60px 40px 37px 40px; overflow: auto; -webkit-overflow-scrolling: touch; word-break: break-word; hyphens: auto; user-select: none; cursor: default; @media (max-width: 400px) { padding: 15px; } @media (max-width: 1000px) { padding-top: 20px; } } // Special case, when scrolling, add shadows to content headers. @media (max-width: 1000px) { .scrolling { .floatingheader { box-shadow: none; &:before, &:after { display: none; } } } .entry-preview-content { @media (max-width: 1000px) { box-shadow: 0 5px 5px rgba(0, 0, 0, 0.05) inset; } } } }//.editor // // Firefox Editor Hacks // -------------------------------------------------- @-moz-document url-prefix() { .editor .markdown-editor { padding-top: 0; padding-bottom: 0; top: 40px; height: calc(100% - 40px); } } // // Markdown Help Icon // -------------------------------------------------- .markdown-help { position: relative; top: -3px; right: -5px; @include icon($i-markdown, '16px', lighten($brown, 15%)); float: right; padding: 5px; &:hover { @include icon($i-markdown, '', $brown); } } // // Post Preview // -------------------------------------------------- // The styles for the actual content inside the preview // TODO: These should just be defaults, overridden by editor.hbs in theme dir .entry-preview-content, .content-preview-content { font-size: 1.8rem; line-height: 1.5em; font-weight: 200; a { color: $blue; text-decoration: underline; } sup a { text-decoration: none; } .btn { text-decoration: none; color: $grey; } .img-placeholder { border: 5px dashed $grey; height: 100px; position: relative; span { display: block; height: 30px; position: absolute; margin-top: -15px; top: 50%; width: 100%; text-align: center; } } a { &.image-edit { width: 16px; height: 16px; } } img { max-width: 100%; height: auto; margin: 0 auto; } } // Placeholder objects for