Ghost/ghost/admin/assets/sass/layouts/settings.scss
Paul Adam Davis d3d74f0395 Refactor settings and content wrappers to allow smooth overflows and properly show headers on mobile
Closes #4186, Closes #4190, Closes #4150

- Alters markup to allow for correct use of `-webkit-overflow-scrolling: touch;`
- Updates the debug page to use the same markup as the rest of the settings page
- Solve floating tag bar issue by making it absolute, not fixed
2014-10-03 18:54:18 +01:00

338 lines
6.9 KiB
SCSS

//
// Settings
// --------------------------------------------------
// Slug: /ghost/settings/
// --------------------------------------------------
//
// Sidebar
// --------------------------------------------------
// Main settings-menu styles, apply to every item
.settings-menu {
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-menu
//
// 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;
}
}
}