Ghost/ghost/admin/assets/sass/layouts/settings.scss
Paul Adam Davis a7e19bc231 Custom permalink UI
References #3920
2014-10-23 12:12:48 +01:00

430 lines
9.0 KiB
SCSS

//
// Settings
// --------------------------------------------------
// Slug: /ghost/settings/
// --------------------------------------------------
//
// Sidebar
// --------------------------------------------------
// Settings navigation
.settings-nav {
width: 25%;
position: absolute;
top: 0;
left: 0;
bottom: 0;
z-index: 700;
background: #fff;
box-shadow: $lightbrown 1px 0 0;
@media (max-width: 900px) {
width: 100%;
}
@media (max-width: 900px) {
top: 0;
}
ul {
list-style: none;
margin: 0;
padding: 0;
border-top: none;
@media (max-width: 900px) { border-bottom: #edece4 1px solid; }
}
li {
border-top: #fff 1px solid;
position: relative;
@media (max-width: 900px) {
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;
}
a {
display: block;
border-bottom: $lightbrown 1px solid;
padding: 15px 15px 15px 60px;
border-bottom: none;
color: $brown;
@media (max-width: 900px) {
padding-left: 45px;
@include icon-after($i-chevron) {
float: right;
margin-top: 5px;
}
}
&:hover,
&:focus {
color: $darkgrey;
background: $lightbrown;
text-decoration: none;
}
// Make space for icons
&:before {
margin-right: 20px;
@media (max-width: 900px) {
margin-right: 15px;
}
}
}
&.active {
@media (min-width: 900px) {
// only apply active styles on larger devices
// The icon
&:before {
color: $darkgrey;
}
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;
a {
color: $darkgrey;
font-weight: bold;
background: #fff;
&:focus {
background: $lightbrown;
}
}
}
} // .active
&:first-of-type {
border-top: none;
}
&:first-of-type.active {
border-top: none;
}
} // li
} // .settings-nav
//
// Content
// --------------------------------------------------
// The main content panel on the right
.settings-content {
@media (max-width: 900px) {
&.fade-in {
animation: none;
}
}
@media (min-width: 901px) {
position: absolute;
top: 0;
right: 0;
left: 25%;
bottom: 0;
overflow: auto;
-webkit-overflow-scrolling: touch;
}
.settings-general img {
max-width: 100%;
max-height: 400px;
display: block;
}
.content {
padding: 40px;
@media (max-width: 900px) {
padding-left: 15px;
padding-right: 15px;
}
@media (max-width: 550px) {
padding-top: 15px;
}
@media (max-width: 900px) {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow-x: hidden;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
} // .content
.word-count {
float: right;
font-weight: bold;
}
} // .settings-content
// This is the header for /ghost/settings/view/
// It's black and fixed position at the top of the screen
.settings-view-header {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 3000;
height: 44px;
line-height: 44px;
text-align: center;
color: #fff;
background: #242628;
overflow: hidden;
.btn-back {
position: absolute;
top: 4px;
left: 4px;
color: #fff;
background: transparent;
}
.btn {
vertical-align: top;
line-height: 1.45;
}
.page-actions {
position: absolute;
top: 4px;
right: 4px;
}
// Desktop
// On larger viewports, make it look like a simple heading
@media (min-width: 900px) {
position: static;
height: auto;
padding: 30px 40px;
text-align: left;
line-height: 1.15em;
background: none;
.btn-back {
display: none;
vertical-align: middle;
color: #666;
}
.btn {
vertical-align: middle;
line-height: 1.428571429;
}
.page-title {
display: inline;
padding: 0;
font-size: 2.6rem;
line-height: 1.3;
overflow: visible;
color: $darkgrey;
}
.page-actions {
position: static;
float: right;
}
}
}
// This is the header for /ghost/settings/view/subview/
// It's black and fixed position at the top of the screen
.settings-subview-header {
@include clearfix;
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;
}
.btn {
vertical-align: top;
line-height: 1.45;
}
.page-actions {
position: absolute;
top: 4px;
right: 4px;
}
// Desktop
// On larger viewports, make it look like a simple heading
@media (min-width: 900px) {
position: static;
height: auto;
padding: 30px 40px;
line-height: 1.15em;
background: none;
.btn-back {
position: static;
float:left;
color: #666;
}
.btn {
vertical-align: middle;
line-height: 1.428571429;
}
.page-title {
display: inline;
padding: 0;
font-size: 2.6rem;
line-height: 1.3;
overflow: visible;
color: $darkgrey;
}
.page-actions {
position: static;
float: right;
}
}
}
// Custom permalink
.permalink-input-wrapper {
position: relative;
outline: 0; // Kills the blue outline we get by adding tabindex="0"
padding-top: 6px;
padding-bottom: 6px;
&: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;
margin-right: 26px;
}
.permalink-domain {
padding-right: 3px;
color: #7E878B;
}
// A collection of labels showing the URL structure
.permalink-structure {
.permalink-parameter {
position: relative;
top: -2px;
margin-left: 6px;
// The slash before each parameter
&:before {
content: "/";
position: absolute;
top: 4px;
left: -8px;
font-size: 1.4rem;
color: #7E878B;
}
}
}
// The actual input, which resets some styles inherited from the global input style
.permalink-input {
flex: 1 0;
margin: -6px 0 -6px -2px;
padding: 0 4px;
background: transparent;
min-width: 60px;
min-height: 30px;
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;
}
}//.permalink-input-wrapper