Ghost/ghost/admin/app/styles/layouts/main.css

614 lines
12 KiB
CSS
Raw Normal View History

2015-05-14 16:45:37 +03:00
/* Global Layout
/* ---------------------------------------------------------- */
2015-04-24 16:44:18 +03:00
/* Main viewport, contains main content, and alerts */
/* Use `position: fixed`, covering full window area so scrolling on mobile doesn't trigger elastic scroll */
.gh-app {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
2015-04-24 16:44:18 +03:00
display: flex;
flex-direction: column;
2015-04-24 16:44:18 +03:00
overflow: hidden;
height: 100%;
2015-04-24 16:44:18 +03:00
}
2015-05-18 18:37:33 +03:00
/* Content viewport, contains everything else */
2015-05-19 11:15:16 +03:00
.gh-viewport {
flex-grow: 1;
display: flex;
overflow: hidden;
max-height: 100%;
}
2015-04-24 16:44:18 +03:00
.gh-main {
2015-05-12 17:30:35 +03:00
position: relative;
2015-04-24 16:44:18 +03:00
flex-grow: 1;
2015-05-12 15:55:24 +03:00
display: flex;
2015-05-25 22:13:00 +03:00
background: #fff;
overflow-y: auto;
/* prevent horizontal scroll in IE11 */
overflow-x: hidden;
-webkit-overflow-scrolling: touch;
2015-04-24 16:44:18 +03:00
}
/* Flexbox fix. https://github.com/TryGhost/Ghost/issues/5804#issuecomment-141416812 */
.gh-main > section {
width: 1px;
position: relative; /* for the editor in safari */
}
2015-05-14 16:45:37 +03:00
/* Global Nav
/* ---------------------------------------------------------- */
2015-04-24 16:44:18 +03:00
.gh-nav {
2015-05-20 19:52:55 +03:00
position: relative;
z-index: 800;
flex: 0 0 312px;
display: flex;
flex-direction: column;
min-width: 0; /* TODO: This is a bullshit Firefox hack */
background: color-mod(var(--lightgrey) l(+5%) s(-2%));
transform: translateX(0);
border-right: 1px solid var(--lightgrey);
}
2015-04-24 16:44:18 +03:00
.gh-nav-menu {
flex-shrink: 0;
display: flex;
align-items: center;
padding: 24px;
cursor: pointer;
outline: none;
}
.gh-nav-menu-dropdown.ember-basic-dropdown--transitioning-in {
animation: fade-in-scale 0.2s;
animation-fill-mode: forwards;
}
.gh-nav-menu-dropdown.ember-basic-dropdown--transitioning-out {
animation: fade-out 0.5s;
animation-fill-mode: forwards;
2015-05-14 16:45:37 +03:00
}
.gh-nav-menu svg {
margin-right: 8px;
width: 12px;
height: 12px;
transition: margin-top 0.2s ease;
}
.gh-nav-menu svg path {
stroke-width: 1.5px;
stroke: color-mod(var(--midlightgrey) l(-5%));
}
2015-04-24 16:44:18 +03:00
.gh-nav-menu-icon {
flex-shrink: 0;
margin-right: 10px;
width: 32px;
height: 32px;
background-color: transparent;
background-size: 32px;
2015-04-24 16:44:18 +03:00
border-radius: 4px;
}
.gh-nav-menu-details {
flex-grow: 1;
padding-right: 10px;
min-width: 0; /* TODO: This is a bullshit Firefox hack */
2015-04-24 16:44:18 +03:00
}
.gh-nav-menu-details-blog {
2015-05-16 14:43:12 +03:00
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 1.5rem;
2015-04-24 16:44:18 +03:00
line-height: 1.3em;
font-weight: 600;
}
.gh-nav-menu-details-user {
2015-05-16 14:43:12 +03:00
overflow: hidden;
2015-05-14 16:45:37 +03:00
color: var(--midgrey);
2015-04-24 16:44:18 +03:00
text-overflow: ellipsis;
white-space: nowrap;
2015-05-16 14:43:12 +03:00
font-size: 1.2rem;
line-height: 1.2em;
2015-04-24 16:44:18 +03:00
}
.gh-nav-body {
display: flex;
flex-direction: column;
justify-content: space-between;
2015-04-24 16:44:18 +03:00
flex-grow: 1;
overflow-y: auto;
}
.gh-nav-search {
position: relative;
margin: 0 24px 15px;
2015-04-24 16:44:18 +03:00
}
.gh-nav-search .ember-power-select-trigger {
outline: 0;
background: #fff;
2015-09-02 10:57:29 +03:00
}
2015-04-24 16:44:18 +03:00
.gh-nav-search-button {
position: absolute;
2015-09-02 10:57:29 +03:00
top: 0;
2015-04-24 16:44:18 +03:00
right: 0;
bottom: 0;
z-index: 1;
2015-09-02 10:57:29 +03:00
padding: 0 8px 0 5px;
2015-05-14 16:45:37 +03:00
}
2015-04-24 16:44:18 +03:00
.gh-nav-search-button svg {
width: 13px;
height: 13px;
fill: color-mod(var(--midlightgrey) l(+10%));
line-height: 13px;
transition: color 0.2s ease;
transform: rotate(90deg);
vertical-align: -1px;
}
.gh-nav-search-button svg path {
stroke: inherit;
}
.gh-nav-search-button:hover svg {
fill: var(--darkgrey);
}
2015-04-24 16:44:18 +03:00
.gh-nav-list {
margin: 0;
padding: 10px 0 0;
2015-05-16 14:43:12 +03:00
list-style: none;
font-size: 1.4rem;
line-height: 1.6em;
2015-04-24 16:44:18 +03:00
}
2016-11-14 12:55:08 +03:00
.gh-nav-list li {
margin: 0;
padding: 0;
2016-11-14 12:55:08 +03:00
}
.gh-nav-list .gh-nav-list-h {
2015-05-16 14:43:12 +03:00
overflow: hidden;
margin-top: 32px;
padding: 10px 24px;
color: color-mod(var(--darkgrey));
2015-05-16 14:43:12 +03:00
text-overflow: ellipsis;
text-transform: uppercase;
2015-05-16 14:43:12 +03:00
white-space: nowrap;
letter-spacing: 0.1em;
font-size: 1.2rem;
2015-04-24 16:44:18 +03:00
line-height: 1.1em;
font-weight: 500;
2015-04-24 16:44:18 +03:00
}
.gh-nav-list a {
display: flex;
align-items: center;
padding: 7px 24px;
2019-02-22 13:16:06 +03:00
color: color-mod(var(--midgrey) l(-10%) s(+5%));
opacity: 0.9;
2015-04-24 16:44:18 +03:00
transition: none;
}
.gh-nav-list .active {
background: color-mod(var(--lightgrey) l(-1%) s(-3%));
color: var(--darkgrey);
font-weight: 600;
opacity: 1;
2015-04-24 16:44:18 +03:00
}
.gh-nav-list a:not(.active):hover {
background: color-mod(var(--lightgrey) l(+2%) s(-2%));
opacity: 1;
2015-04-24 16:44:18 +03:00
}
/* Icons */
.gh-nav-list svg {
2015-05-16 14:43:12 +03:00
margin-right: 8px;
width: 16px;
height: 16px;
fill: color-mod(var(--midgrey) l(+5%));
line-height: 1;
2015-04-24 16:44:18 +03:00
}
.gh-nav-list .active svg {
fill: color-mod(var(--blue) l(-3%) s(+3%));
}
.gh-nav-list svg g {
stroke: color-mod(var(--midgrey) l(+5%));
2015-08-31 09:04:09 +03:00
}
.gh-nav-list .gh-nav-new-post {
position: absolute;
z-index: 999;
padding: 6px;
margin: 0;
right: 22px;
}
.gh-nav-list .gh-nav-new-post span {
color: color-mod(var(--blue) l(-3%) s(+5%));
width: 22px;
height: 22px;
border: 1px solid color-mod(var(--blue) l(-3%) s(+5%));
border-radius: 100%;
display: flex;
align-items: center;
justify-content: center;
2015-08-31 09:04:09 +03:00
}
.gh-nav-list .gh-nav-new-post span svg {
margin-right: 0;
width: 10px;
height: 10px;
}
.gh-nav-list .gh-nav-new-post span svg path {
stroke: color-mod(var(--blue) l(-3%) s(+5%));
stroke-width: 3px;
}
.gh-nav-list a.gh-nav-new-post:hover,
.gh-nav-list a.gh-nav-new-post.active {
background: none;
}
.gh-nav-list a.gh-nav-new-post:hover span {
background: color-mod(var(--blue) l(-3%) s(+5%));
}
2015-05-14 16:45:37 +03:00
.gh-nav-list .gh-nav-new-post:hover span svg path {
stroke: var(--white);
}
.gh-nav-list .gh-nav-nightshift {
position: absolute;
z-index: 999;
padding: 6px;
margin: 0;
right: 20px;
}
.gh-nav-list .gh-nav-nightshift span svg {
margin-right: 0;
width: 20px;
height: 20px;
}
.gh-nav-list .gh-nav-nightshift span svg path {
fill: color-mod(var(--midgrey) l(+5%));
}
.gh-nav-list a.gh-nav-nightshift:hover,
.gh-nav-list a.gh-nav-nightshift.active {
background: none;
}
.gh-nav-list .gh-nav-nightshift:hover span svg path {
fill: color-mod(var(--blue) l(-3%) s(+5%));
}
.gh-nav-main {
margin-top: -10px;
}
.gh-nav-manage .gh-nav-list-h {
margin-top: 20px;
}
.gh-nav-labs {
margin-bottom: 20px;
padding: 0;
}
2017-02-17 10:32:29 +03:00
/* Mobile Nav Menu (Slides out)
2015-05-20 18:37:06 +03:00
/* ---------------------------------------------------------- */
2015-05-25 22:13:00 +03:00
.gh-mobilemenu-button {
display: none;
2015-05-20 18:37:06 +03:00
}
2015-05-25 22:13:00 +03:00
@media (max-width: 800px) {
.view-header {
padding-left: 0 !important;
}
2015-05-25 22:13:00 +03:00
.gh-mobilemenu-button {
flex-shrink: 0;
display: flex;
align-items: center;
margin: 0;
padding: 24px;
2015-05-25 22:13:00 +03:00
font-size: 18px;
line-height: 18px;
}
2015-05-20 18:37:06 +03:00
2015-05-25 22:13:00 +03:00
.gh-mobilemenu-button .icon-gh {
margin: 0;
width: 20px;
height: 18px;
2015-05-25 22:13:00 +03:00
}
2015-05-20 18:37:06 +03:00
2015-05-25 22:13:00 +03:00
/* Hide the nav */
.gh-nav {
position: absolute;
top: 0;
left: 0;
width: 205px;
2015-05-25 22:13:00 +03:00
height: 100%;
transition: transform 0.4s cubic-bezier(0.1, 0.7, 0.1, 1);
transform: translate3d(-205px, 0px, 0px);
2015-05-25 22:13:00 +03:00
}
.mobile-menu-expanded .gh-nav {
2015-05-25 22:13:00 +03:00
transform: translate3d(0,0,0);
}
2015-05-20 18:37:06 +03:00
}
2015-05-25 22:13:00 +03:00
@media (max-width: 500px) {
.gh-mobilemenu-button {
padding: 24px 15px 24px 16px;
}
2015-05-25 22:13:00 +03:00
.gh-nav {
width: 80vw;
transform: translate3d(-80vw, 0px, 0px);
2015-05-25 22:13:00 +03:00
}
.mobile-menu-expanded .gh-nav {
transform: translate3d(0,0,0);
2015-05-25 22:13:00 +03:00
}
.mobile-menu-expanded .content-cover {
width: 20vw;
cursor: pointer;
transform: translate3d(80vw, 0, 0);
}
.gh-nav-list {
font-size: 1.5rem;
}
.gh-nav-list-h {
font-size: 1.2rem;
}
.gh-nav-list svg {
margin-right: 8px;
width: 17px;
height: 17px;
text-align: center;
font-size: 17px;
}
2015-05-20 18:37:06 +03:00
}
2017-02-17 10:32:29 +03:00
/* Mobile Nav Bar (Sits at bottom of screen)
2015-05-14 16:45:37 +03:00
/* ---------------------------------------------------------- */
2015-05-12 21:08:55 +03:00
2017-02-17 10:32:29 +03:00
.gh-mobile-nav-bar { display: none; }
2015-05-12 21:08:55 +03:00
2017-02-17 10:32:29 +03:00
@media (max-width: 800px) {
2017-02-21 11:18:15 +03:00
/* Make space for the mobile nav bar */
.gh-viewport {
padding-bottom: 55px;
}
2017-02-17 10:32:29 +03:00
.gh-mobile-nav-bar {
display: flex;
align-items: center;
justify-content: space-around;
position: fixed;
bottom: 0;
left: 0;
right: 0;
background: #fff;
border-top: var(--lightgrey) 1px solid;
}
2015-05-12 21:08:55 +03:00
2017-02-17 10:32:29 +03:00
.gh-mobile-nav-bar a,
.gh-mobile-nav-bar-more {
height: 55px;
padding: 10px 15px 5px 15px;
2017-02-17 10:32:29 +03:00
text-align: center;
cursor: pointer;
color: var(--darkgrey);
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-around;
font-size: 1.2rem;
}
.gh-mobile-nav-bar a.active {
background: color-mod(var(--blue) lightness(+10%));
color: #fff;
}
.gh-mobile-nav-bar a.active svg {
fill: #fff;
}
.gh-mobile-nav-bar a.active.gh-nav-main-users g,
.gh-mobile-nav-bar a.active.gh-nav-main-users path {
fill: transparent;
stroke: white;
}
.gh-mobile-nav-bar svg,
.gh-mobile-nav-bar svg g {
width: 15px;
fill: var(--darkgrey);
2017-02-17 10:32:29 +03:00
}
.gh-mobile-nav-bar svg g path {
stroke: var(--darkgrey);
}
/* non-authed pages shouldn't have the mobile bar */
.ghost-setup .gh-viewport,
.ghost-reset .gh-viewport,
.ghost-signup .gh-viewport,
.ghost-login .gh-viewport {
padding-bottom: 0;
}
.ghost-setup .gh-mobile-nav-bar,
.ghost-reset .gh-mobile-nav-bar,
.ghost-signup .gh-mobile-nav-bar,
.ghost-login .gh-mobile-nav-bar {
display: none;
}
2015-05-12 21:08:55 +03:00
}
2015-05-14 16:45:37 +03:00
/* Container for App View
/* ---------------------------------------------------------- */
2015-05-12 15:55:24 +03:00
.gh-view {
flex-grow: 1;
display: flex;
flex-direction: column;
}
2015-05-12 14:09:45 +03:00
.gh-canvas {
flex-grow: 1;
padding: 24px 4vw 3vw 4vw;
margin: 0 auto;
2017-02-16 20:12:13 +03:00
max-width: 1200px;
}
.gh-canvas-header {
flex-shrink: 0;
display: flex;
justify-content: space-between;
align-items: center;
margin: 0 0 2vw 0;
}
.gh-canvas-title {
display: flex;
align-items: center;
overflow: hidden;
margin: 0;
padding: 0;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 2.9rem;
line-height: 1.2em;
font-weight: 700;
letter-spacing: 0.4px;
/* match button height to avoid jump on navigation between screens*/
min-height: 35px;
}
@media (max-width: 500px) {
.gh-canvas-title {
display: block;
}
.gh-canvas-title svg {
margin: 0 5px;
}
}
.gh-canvas-title a {
color: var(--darkgrey);
}
.gh-canvas-title span {
display: inline-block;
height: 100%;
vertical-align: baseline;
}
.gh-canvas-title svg {
width: 0.6em;
height: 0.6em;
margin: 0 10px;
}
2015-05-12 14:09:45 +03:00
.view-header {
2015-05-12 15:55:24 +03:00
flex-shrink: 0;
2015-05-12 14:09:45 +03:00
display: flex;
justify-content: space-between;
2015-05-16 14:43:12 +03:00
align-items: center;
2015-05-12 14:09:45 +03:00
padding: 0 20px;
2015-05-16 14:43:12 +03:00
height: 65px;
border-bottom: var(--lightgrey) 1px solid;
2015-05-12 14:09:45 +03:00
}
.view-title {
2015-05-12 21:08:55 +03:00
display: flex;
align-items: center;
2015-05-16 14:43:12 +03:00
overflow: hidden;
2015-05-12 14:09:45 +03:00
margin: 0;
padding: 0;
2015-05-16 14:43:12 +03:00
text-overflow: ellipsis;
2015-05-12 14:09:45 +03:00
font-size: 2rem;
line-height: 1.2em;
font-weight: 400;
2015-05-14 16:45:37 +03:00
}
2015-05-12 21:08:55 +03:00
2015-05-14 16:45:37 +03:00
.view-title a {
color: inherit;
}
2015-05-12 21:08:55 +03:00
2015-05-14 16:45:37 +03:00
.view-title a:hover {
color: var(--blue);
}
.view-title svg {
2015-05-14 16:45:37 +03:00
margin: 0 10px;
height: 14px;
}
.view-title svg path {
fill: #818181;
2015-05-12 14:09:45 +03:00
}
2015-06-03 17:44:12 +03:00
.view-actions {
flex-shrink: 0;
display: flex;
align-items: center;
2015-06-03 17:44:12 +03:00
}
2015-05-12 15:55:24 +03:00
.view-container,
.view-content {
2015-06-03 17:44:12 +03:00
position: relative;
2015-05-12 15:55:24 +03:00
flex-grow: 1;
2017-02-21 11:18:15 +03:00
padding-bottom: 4vw;
2015-05-12 15:55:24 +03:00
}
.view-content {
padding: 20px;
}
2015-05-14 23:30:25 +03:00
.view-content p,
.view-content p * {
user-select: text;
}
@media (max-width: 400px) {
.view-header {
padding: 0 7px;
height: 50px;
}
.view-title {
font-size: 1.8rem;
}
.view-content {
padding: 15px;
}
}