Ghost/ghost/admin/app/styles/layouts/editor.css
2015-05-22 19:05:09 +01:00

702 lines
13 KiB
CSS

/* Editor /ghost/editor/
/* ---------------------------------------------------------- */
/* Title
/* ---------------------------------------------------------- */
.entry-title {
height: 60px;
padding: 0;
position: relative;
}
.entry-title 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;
}
.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 {
width: 50%;
padding: 15px;
position: absolute;
bottom: 40px;
top: 60px;
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;
left: 0;
right: 0;
width: 100%;
border: none;
z-index: 100;
/* 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 {
height: 50px;
overflow: hidden;
}
.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 {
cursor: pointer;
width: 50%;
color: #fff;
font-weight: normal;
background: var(--brown);
position: absolute;
top: -40px;
left: 0;
box-shadow: rgba(0, 0, 0, 0.1) 0 -2px 3px inset;
}
.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 {
float: right;
position: relative;
top: 2px;
}
.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 {
height: auto;
overflow: auto;
-webkit-overflow-scrolling: touch;
}
@media (max-width: 1000px) {
.editor .entry-markdown.active header,
.editor .entry-preview.active header {
border-top: #e1e1e1 1px solid;
cursor: auto;
color: var(--brown);
background: #fff;
box-shadow: none;
}
.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;
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: var(--font-family-mono);
color: color(var(--darkgrey) lightness(+10%));
}
.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;
padding: 40px 20px 37px 20px;
overflow: auto;
-webkit-overflow-scrolling: touch;
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 {
padding-top: 0;
padding-bottom: 0;
top: 40px;
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 {
text-decoration: none;
color: var(--grey);
}
.entry-preview-content .img-placeholder,
.content-preview-content .img-placeholder {
border: 5px dashed var(--grey);
height: 100px;
position: relative;
}
.entry-preview-content .img-placeholder span,
.content-preview-content .img-placeholder span {
display: block;
height: 30px;
position: absolute;
margin-top: -15px;
top: 50%;
width: 100%;
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 {
max-width: 100%;
height: auto;
margin: 0 auto;
}
/* Placeholder objects for <script> & <iframe> */
.js-embed-placeholder,
.iframe-embed-placeholder {
background: #f9f9f9;
border: none;
padding: 100px 20px;
font-family: var(--font-family);
font-weight: bold;
font-size: 1.6rem;
text-align: center;
}
/* 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 {
opacity: 0;
height: 0;
overflow: hidden;
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 {
height: 40px;
padding: 0;
border-top: #e1e1e1 1px solid;
color: var(--midgrey);
background: #fff;
position: absolute;
bottom: 0;
left: 0;
right: 0;
z-index: 900;
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;
bottom: 41px;
right: -3px;
}
.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 {
width: 100%;
margin-top: 5px;
padding-top: 5px;
padding-left: 10px;
border-top: 1px solid var(--darkgrey);
}
.extended-tags .right {
display: none;
}
#entry-tags input[type="text"].tag-input {
display: inline-block;
vertical-align: top;
color: var(--midgrey);
font-weight: 300;
background: transparent;
border: none;
width: 100%;
line-height: 1;
padding: 9px 9px 9px 0;
}
#entry-tags input[type="text"].tag-input:focus {
outline: none;
}
#entry-tags .tag {
display: inline;
margin-right: 3px;
padding: 2px 5px;
color: var(--lightgrey);
font-size: 1.2rem;
line-height: 1.2em;
white-space: nowrap;
background: var(--darkgrey);
border-radius: 3px;
}
#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 {
text-decoration: none;
color: #fff;
background: var(--blue);
}
.suggestions li.selected mark {
color: #fff;
}
.suggestions mark {
background: none;
color: #000;
font-weight: bold;
}
#entry-actions {
display: flex;
justify-content: flex-end;
align-content: center;
align-items: center;
margin-right: 6px;
position: relative;
}
#entry-actions .dropdown {
position: absolute;
bottom: 49px;
right: 0;
}
#entry-actions .dropdown .dropdown-menu {
top: auto;
left: auto;
right: 100%;
bottom: 100%;
}
#entry-actions.unsaved {
padding-bottom: 0;
}
#entry-actions.unsaved .delete {
display: none;
}
#entry-actions-menu {
position: absolute;
bottom: 50px;
right: -5px;
}
.tags-wrapper {
white-space: nowrap;
}
.tags-wrapper span {
display: inline-block;
margin-right: 10px;
}
.tag-label {
display: block;
width: 40px;
height: 40px;
position: relative;
}
.tag-label:before {
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
font-size: 1.3rem;
color: var(--midgrey);
transition: color 0.15s linear;
}
.tag-label:hover {
cursor: pointer;
}
.publish-bar-inner {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-content: space-between;
align-items: center;
justify-content: center;
height: 100%;
width: 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;
margin-right: 10px;
height: 40px;
overflow-y: hidden;
}
.publish-bar-tags .tags-wrapper {
white-space: nowrap;
overflow: auto;
-webkit-overflow-scrolling: touch;
padding-top: 8px;
padding-bottom: 9px;
height: 70px;
}
.publish-bar-tags-input {
flex: 1 1 auto;
align-self: auto;
position: relative;
}
.publish-bar-actions {
display: flex;
flex: 1 0 auto;
align-self: auto;
text-align: right;
}
.post-settings {
display: inline-block;
padding: 8px 10px;
color: var(--midgrey);
transition: all 0.15s ease-out 0s;
position: relative;
}
.post-settings:hover,
.post-settings.active {
color: var(--darkgrey);
}
.post-settings-menu .dropdown-menu {
top: auto;
bottom: 100%;
left: auto;
right: 100%;
}
.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 {
font-size: 1.8rem;
line-height: 2.16rem;
color: #1E0FBE;
text-overflow: ellipses;
-webkit-text-overflow: ellipsis;
word-wrap: break-word;
}
.seo-preview-link {
margin: 1px 0 2px 0;
font-size: 1.3rem;
line-height: 1.6rem;
color: #006621;
word-wrap: break-word;
}
.seo-preview-description {
font-size: 1.3rem;
line-height: 1.4;
color: #545454;
word-wrap: break-word;
}
/* 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;
}