mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-09-16 06:13:32 -06:00
Improved layout, unified spacing/font-sizes/border-radius/box-shadow
This commit is contained in:
@@ -19,17 +19,13 @@
|
||||
z-index: 100;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding-top: $gutter-spacing-sm;
|
||||
padding-bottom: $gutter-spacing-sm;
|
||||
background-color: $sidebar-color;
|
||||
|
||||
@include mq(md) {
|
||||
flex-wrap: nowrap;
|
||||
position: absolute;
|
||||
width: $nav-width + 16px;
|
||||
width: $nav-width;
|
||||
height: 100%;
|
||||
padding-top: $gutter-spacing * 2;
|
||||
padding-bottom: 0;
|
||||
flex-direction: column;
|
||||
border-right: $border $border-color;
|
||||
align-items: flex-end;
|
||||
@@ -48,7 +44,6 @@
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-height: 600px;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
@@ -56,20 +51,13 @@
|
||||
}
|
||||
|
||||
.main-content {
|
||||
padding-top: $gutter-spacing-sm;
|
||||
@include container;
|
||||
|
||||
@include mq(md) {
|
||||
position: relative;
|
||||
max-width: $content-width;
|
||||
padding-top: $gutter-spacing;
|
||||
padding-bottom: $gutter-spacing;
|
||||
padding-left: $gutter-spacing * 1.5;
|
||||
margin-left: $nav-width;
|
||||
}
|
||||
|
||||
@include mq(lg) {
|
||||
padding-left: $gutter-spacing;
|
||||
margin-left: calc((100% - #{$nav-width + $content-width}) / 2 + #{$nav-width});
|
||||
}
|
||||
}
|
||||
@@ -78,48 +66,99 @@
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.page {
|
||||
@include container;
|
||||
padding-top: $gutter-spacing-sm;
|
||||
padding-bottom: $gutter-spacing-sm;
|
||||
|
||||
@include mq(md) {
|
||||
padding-top: $gutter-spacing;
|
||||
padding-bottom: $gutter-spacing;
|
||||
}
|
||||
}
|
||||
|
||||
.page-header {
|
||||
@include container;
|
||||
display: none;
|
||||
padding-top: $gutter-spacing-sm;
|
||||
padding-bottom: $gutter-spacing-sm;
|
||||
background-color: $sidebar-color;
|
||||
|
||||
@include mq(md) {
|
||||
background-color: $body-background-color;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
height: $header-height;
|
||||
border-bottom: $border $border-color;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
padding-top: 0;
|
||||
&.nav-open {
|
||||
display: block;
|
||||
|
||||
@include mq(md) {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
height: 60px;
|
||||
padding-top: $sp-4;
|
||||
padding-bottom: $sp-4;
|
||||
border-bottom: $border $border-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navigation,
|
||||
.site-title,
|
||||
.site-header,
|
||||
.site-footer {
|
||||
|
||||
@include container;
|
||||
|
||||
width: 100%;
|
||||
|
||||
@include mq(lg) {
|
||||
width: $nav-width + 32px;
|
||||
width: $nav-width;
|
||||
}
|
||||
}
|
||||
|
||||
.navigation {
|
||||
@include container;
|
||||
|
||||
@include mq(md) {
|
||||
padding-top: $sp-8;
|
||||
padding-bottom: $gutter-spacing-sm;
|
||||
overflow-y: auto;
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
}
|
||||
|
||||
.site-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@include mq(md) {
|
||||
height: $header-height;
|
||||
min-height: $header-height;
|
||||
max-height: $header-height;
|
||||
z-index: 101;
|
||||
border-bottom: $border $border-color;
|
||||
}
|
||||
}
|
||||
|
||||
.site-title {
|
||||
@include container;
|
||||
flex-grow: 1;
|
||||
display: flex;
|
||||
height: 100%;
|
||||
align-items: center;
|
||||
padding-top: $gutter-spacing-sm;
|
||||
padding-bottom: $gutter-spacing-sm;
|
||||
color: $body-heading-color;
|
||||
@include fs-6;
|
||||
}
|
||||
|
||||
.site-button {
|
||||
height: 100%;
|
||||
padding: $gutter-spacing-sm;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@include mq(md) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
// stylelint-disable selector-max-type
|
||||
|
||||
body {
|
||||
@@ -135,15 +174,15 @@ body {
|
||||
// stylelint-enable selector-max-type
|
||||
|
||||
.site-footer {
|
||||
@include container;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
padding-top: $sp-4;
|
||||
padding-bottom: $sp-4;
|
||||
background-color: $sidebar-color;
|
||||
|
||||
@include mq(md) {
|
||||
position: static;
|
||||
align-self: flex-end;
|
||||
justify-self: end;
|
||||
background-color: $sidebar-color;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user