Ghost/ghost/admin/app/styles/layouts/settings.scss

513 lines
10 KiB
SCSS
Raw Normal View History

// ------------------------------------------------------------
2014-07-30 14:39:38 +04:00
// Settings
// Slug: /ghost/settings/[many]
//
// Styles for the content management page, which is where
// the posts are listed.
//
// * Settings Navigation
// * Content
// * Headers
// * Custom Permalinks
// * Navigation
// ------------------------------------------------------------
2014-07-30 14:39:38 +04:00
//
// Settings Navigation
2014-07-30 14:39:38 +04:00
// --------------------------------------------------
.settings-nav {
2014-08-16 20:39:52 +04:00
width: 25%;
position: absolute;
top: 0;
2014-07-30 14:39:38 +04:00
left: 0;
bottom: 0;
z-index: 700;
background: #fff;
box-shadow: $lightbrown 1px 0 0;
2014-08-16 20:39:52 +04:00
@media (max-width: 900px) {
width: 100%;
top: 0;
2014-07-30 14:39:38 +04:00
}
ul {
2014-08-06 20:46:43 +04:00
list-style: none;
margin: 0;
padding: 0;
2014-07-30 14:39:38 +04:00
border-top: none;
@media (max-width: 900px) {
border-bottom: #edece4 1px solid;
}
2014-07-30 14:39:38 +04:00
}
li {
border-top: #fff 1px solid;
position: relative;
2014-08-16 20:39:52 +04:00
@media (max-width: 900px) {
2014-07-30 14:39:38 +04:00
margin-right: 0;
border-top: #edece4 1px solid;
}
// The icon
&:before {
position: absolute;
top: 50%;
left: 30px;
transform: translateY(-50%);
transition: color 0.1s;
color: $brown;
@media (max-width: 900px) {
left: 15px;
}
}
&:hover:before {
color: $darkgrey;
}
2014-07-30 14:39:38 +04:00
a {
2014-08-06 20:46:43 +04:00
display: block;
border-bottom: $lightbrown 1px solid;
padding: 15px 15px 15px 60px;
2014-07-30 14:39:38 +04:00
border-bottom: none;
2014-08-06 20:46:43 +04:00
color: $brown;
2014-08-16 20:39:52 +04:00
@media (max-width: 900px) {
padding-left: 45px;
@include icon-after($i-chevron) {
2014-07-30 14:39:38 +04:00
float: right;
margin-top: 5px;
2014-08-06 20:46:43 +04:00
}
2014-07-30 14:39:38 +04:00
}
2014-08-06 20:46:43 +04:00
&:hover,
&:focus {
color: $darkgrey;
background: $lightbrown;
text-decoration: none;
}
2014-08-14 20:56:23 +04:00
2014-08-06 20:46:43 +04:00
// Make space for icons
&:before {
margin-right: 20px;
2014-08-16 20:39:52 +04:00
@media (max-width: 900px) {
2014-08-06 20:46:43 +04:00
margin-right: 15px;
}
}
}//a
2014-07-30 14:39:38 +04:00
&.active {
2014-08-16 20:39:52 +04:00
@media (min-width: 900px) {
2014-07-30 14:39:38 +04:00
margin-right: 0;
position: relative;
z-index: 300;
border-top: #edece4 1px solid;
box-shadow: #fff 1px 0 0, #edece4 0 1px 0;
transition: all 0.15s ease-out 0s;
2014-07-30 14:39:38 +04:00
// The icon
&:before {
color: $darkgrey;
}
2014-07-30 14:39:38 +04:00
a {
color: $darkgrey;
font-weight: bold;
background: #fff;
2014-07-30 14:39:38 +04:00
&:focus {
background: $lightbrown;
}
}
}
}//.active
2014-07-30 14:39:38 +04:00
2014-08-06 20:46:43 +04:00
&:first-of-type {
border-top: none;
2014-07-30 14:39:38 +04:00
}
}//li
}//.settings-nav
2014-07-30 14:39:38 +04:00
// Special cases for nav items
.settings-nav-labs .icon-labs:before {
font-size: 16px;
}
2014-07-30 14:39:38 +04:00
//
// Content
// --------------------------------------------------
// The main content panel on the right
.settings-content {
@media (max-width: 900px) {
&.fade-in {
animation: none;
}
}
2014-07-30 14:39:38 +04:00
@media (min-width: 901px) {
position: absolute;
top: 0;
right: 0;
left: 25%;
bottom: 0;
overflow: auto;
-webkit-overflow-scrolling: touch;
}
2014-07-30 14:39:38 +04:00
.settings-general img {
max-width: 100%;
max-height: 400px;
display: block;
2014-07-30 14:39:38 +04:00
}
.blog-logo,
.blog-cover {
cursor: pointer;
}
2014-08-16 20:39:52 +04:00
.content {
padding: 40px;
@media (max-width: 550px) {
padding-top: 15px;
2014-07-30 14:39:38 +04:00
}
@media (max-width: 900px) {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
padding-left: 15px;
padding-right: 15px;
overflow-x: hidden;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
}//.content
2014-07-30 14:39:38 +04:00
.word-count {
float: right;
font-weight: bold;
}
}//.settings-content
2014-07-30 14:39:38 +04:00
//
// Headers
// --------------------------------------------------
2014-08-16 20:39:52 +04:00
// This is the header for /ghost/settings/view/
// On mobile, it's black and fixed position at the top of the screen
.settings-view-header,
.settings-subview-header {
2014-08-16 20:39:52 +04:00
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 3000;
height: 44px;
line-height: 44px;
text-align: center;
color: #fff;
background: #242628;
.btn-back {
position: absolute;
top: 4px;
left: 4px;
color: #fff;
background: transparent;
}
2014-07-30 14:39:38 +04:00
2014-08-16 20:39:52 +04:00
.btn {
vertical-align: top;
line-height: 1.45;
}
2014-07-30 14:39:38 +04:00
.page-actions {
position: absolute;
2014-08-16 20:39:52 +04:00
top: 4px;
right: 4px;
}
2014-07-30 14:39:38 +04:00
2014-08-16 20:39:52 +04:00
@media (min-width: 900px) {
position: static;
height: auto;
padding: 30px 40px;
line-height: 1.15em;
background: none;
.btn {
vertical-align: middle;
line-height: 1.428571429;
2014-07-30 14:39:38 +04:00
}
2014-08-16 20:39:52 +04:00
.page-title {
display: inline;
2014-07-30 14:39:38 +04:00
padding: 0;
2014-08-16 20:39:52 +04:00
font-size: 2.6rem;
line-height: 1.3;
overflow: visible;
color: $darkgrey;
2014-07-30 14:39:38 +04:00
}
2014-08-16 20:39:52 +04:00
.page-actions {
position: static;
float: right;
2014-07-30 14:39:38 +04:00
}
}//@media (min-width: 900px)
}//.settings-view-header, .settings-subview-header
2014-07-30 14:39:38 +04:00
2014-08-16 20:39:52 +04:00
.settings-view-header {
@media (min-width: 900px) {
text-align: left;
2014-08-16 20:39:52 +04:00
.btn-back {
display: none;
vertical-align: middle;
color: #666;
}
2014-07-30 14:39:38 +04:00
}
}
2014-07-30 14:39:38 +04:00
.settings-subview-header {
2014-08-16 20:39:52 +04:00
@media (min-width: 900px) {
.btn-back {
position: static;
float:left;
color: #666;
}
}
}
2014-09-30 19:24:21 +04:00
//
// Custom Permalinks
// --------------------------------------------------
2014-09-30 19:24:21 +04:00
.permalink-input-wrapper {
position: relative;
outline: 0; // Kills the blue outline we get by adding tabindex="0"
padding: 2px 0 2px 6px;
2014-09-30 19:24:21 +04:00
&:focus,
&.focus {
border-color: $brown;
// The button-looking thing that opens a popover
.permalink-help {
border-color: $brown;
}
}
// A div that _looks_ like an input, but is a div
.permalink-fake-input {
display: flex;
flex-wrap: wrap;
align-items: center;
margin-right: 40px;
2014-09-30 19:24:21 +04:00
}
.permalink-domain {
margin: 5px -1px 3px 0;
2014-09-30 19:24:21 +04:00
color: #7E878B;
}
.permalink-parameter {
position: relative;
padding: 3px 6px 4px;
margin: 4px 0 4px 9px;
max-height: 18px;
2014-09-30 19:24:21 +04:00
// Change default label styles
background: #E3EDF2;
box-shadow: inset 0px 0px 0px 1px #CDD5D9;
color: #7E878B;
2014-09-30 19:24:21 +04:00
// The slash before each parameter (using :after)
// Using `:before` does funky stuff here in Safari
&:after {
content: "/";
position: absolute;
top: 2px;
left: -7px;
font-size: 1.4rem;
color: #7E878B;
2014-09-30 19:24:21 +04:00
}
}
// The actual input, which resets some styles inherited from the global input style
.permalink-input {
flex: 1 0;
margin: 0;
2014-09-30 19:24:21 +04:00
padding: 0 4px;
margin-right: -4px;
2014-09-30 19:24:21 +04:00
background: transparent;
min-width: 60px;
border: 0;
}
// Shove the popover button and its container over to the right
.popover,
.permalink-help {
position: absolute;
top: 0;
right: 0;
bottom: 0;
width: 36px;
}
// Simple styles for the popover button-looking thing
.permalink-help {
border-left: 1px solid #E0DFD7;
transition: border-color 0.15s linear;
&:before {
color: #E0DFD7;
transition: color 0.15s linear;
}
&:hover:before {
color: $brown;
}
}
// Shift the popover (than opens over the top of everything) to the left a bit
.popover-item {
margin-left: -5px;
min-width: 320px;
2014-09-30 19:24:21 +04:00
}
}//.permalink-input-wrapper
//
// Navigation
// --------------------------------------------------
.settings-navigation {}
.navigation-item {
display: flex;
@media (max-width: 600px) {
position: relative;
margin-bottom: 20px;
}
@media (min-width: 601px) {
margin-bottom: 10px;
}
// &.last-navigation-item {
&:last-child {
padding-left: 27px; // simulate .navigation-item-drag-handle width + horizontal padding
.navigation-item-drag-handle {
display: none;
}
}
}
.navigation-item-drag-handle {
padding: 6px 17px 0 10px;
width: 27px;
cursor: move;
@media (max-width: 600px) {
&:before {
position: absolute;
top: 50%;
left: 4px;
margin-top: -9px;
z-index: 20;
}
}
}
.navigation-inputs {
width: 100%;
}
.navigation-item-url {
.fake-placeholder {
color: lightgrey
}
}
@media (max-width: 600px) {
.navigation-item-label {
margin-bottom: 5px;
}
.navigation-item-label,
.navigation-item-url {
display: block;
width: 100%;
}
}
@media (min-width: 601px) {
.navigation-inputs {
display: flex;
}
.navigation-item-label {
flex-grow: 1;
margin-right: 10px;
}
.navigation-item-url {
flex-grow: 3;
}
}
.navigation-item-action {
padding-left: 10px;
width: 40px;
position: relative;
z-index: 10;
button {
width: 30px;
height: 30px;
position: absolute;
top: 50%;
transform: translateY(-50%);
margin-top: -2px;
}
.icon-trash {
&:before {
color: $midbrown;
font-size: 16px;
transition: color 0.1s linear;
}
&:hover:before {
color: $red;
}
}
.icon-add {
&:before {
background: $green;
color: #fff;
font-size: 12px;
padding: 3px;
border-radius: 2px;
transition: background 0.1s linear;
}
&:hover:before {
background: darken($green, 10%);
}
}
}