1
0
mirror of https://github.com/thangisme/notes.git synced 2024-11-14 01:46:13 -05:00
notes/_sass/layout.scss

210 lines
3.4 KiB
SCSS
Raw Normal View History

2017-03-24 09:47:37 -04:00
//
// The basic two column layout
//
2017-03-09 13:16:08 -05:00
.page-wrap {
@include mq(md) {
position: absolute;
top: 0;
left: 0;
2017-03-26 21:09:19 -04:00
display: flex;
2017-03-09 13:16:08 -05:00
width: 100%;
height: 100%;
overflow-x: hidden;
overflow-y: hidden;
}
}
.side-bar {
2017-03-26 21:09:19 -04:00
z-index: 100;
display: flex;
flex-wrap: wrap;
2018-11-15 15:12:12 -05:00
background-color: $sidebar-color;
2017-03-09 13:16:08 -05:00
@include mq(md) {
flex-wrap: nowrap;
2017-03-26 21:09:19 -04:00
position: absolute;
2019-05-12 15:49:19 -04:00
width: $nav-width-md;
2017-03-26 21:09:19 -04:00
height: 100%;
2017-03-09 13:16:08 -05:00
flex-direction: column;
2017-03-26 21:09:19 -04:00
border-right: $border $border-color;
2017-03-09 13:16:08 -05:00
align-items: flex-end;
}
@include mq(lg) {
width: calc((100% - #{$nav-width + $content-width}) / 2 + #{$nav-width});
min-width: $nav-width;
}
}
.main-content-wrap {
@include mq(md) {
position: absolute;
2017-03-26 21:09:19 -04:00
top: 0;
left: 0;
2017-03-09 13:16:08 -05:00
width: 100%;
height: 100%;
-webkit-overflow-scrolling: touch;
overflow-x: hidden;
overflow-y: scroll;
}
}
2017-06-04 17:50:01 -04:00
.main-content {
2017-03-09 13:16:08 -05:00
@include mq(md) {
position: relative;
max-width: $content-width;
2019-05-12 15:49:19 -04:00
margin-left: $nav-width-md;
2017-03-09 13:16:08 -05:00
}
@include mq(lg) {
2017-03-26 21:09:19 -04:00
margin-left: calc((100% - #{$nav-width + $content-width}) / 2 + #{$nav-width});
2017-03-09 13:16:08 -05:00
}
}
.js-main-content:focus {
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;
}
}
2017-06-04 17:50:01 -04:00
.page-header {
@include container;
display: none;
padding-top: $gutter-spacing-sm;
padding-bottom: $gutter-spacing-sm;
2018-11-15 15:12:12 -05:00
background-color: $sidebar-color;
2017-06-04 17:50:01 -04:00
@include mq(md) {
display: flex;
justify-content: flex-end;
height: $header-height;
2019-08-13 17:23:35 -04:00
background-color: $body-background-color;
border-bottom: $border $border-color;
2017-11-08 11:23:05 -05:00
}
&.nav-open {
display: block;
2017-11-08 11:23:05 -05:00
@include mq(md) {
2017-06-04 17:50:01 -04:00
display: flex;
}
}
}
2017-03-24 09:47:37 -04:00
.navigation,
.site-header,
2018-10-23 11:40:39 -04:00
.site-footer {
2017-03-09 13:16:08 -05:00
width: 100%;
@include mq(lg) {
width: $nav-width;
2017-03-09 13:16:08 -05:00
}
}
.navigation {
@include container;
2017-03-09 13:16:08 -05:00
@include mq(md) {
2017-03-26 21:09:19 -04:00
padding-top: $sp-8;
padding-bottom: $gutter-spacing-sm;
overflow-y: auto;
flex: 1 1 auto;
2017-03-09 13:16:08 -05:00
}
}
.site-header {
display: flex;
min-height: $header-height;
align-items: center;
@include mq(md) {
2019-08-13 17:23:35 -04:00
z-index: 101;
height: $header-height;
max-height: $header-height;
border-bottom: $border $border-color;
}
}
.site-title {
@include container;
flex-grow: 1;
display: flex;
height: 100%;
align-items: center;
padding-top: $sp-3;
padding-bottom: $sp-3;
color: $body-heading-color;
@include fs-6;
@include mq(md) {
padding-top: $sp-2;
padding-bottom: $sp-2;
}
}
@if variable-exists(logo) {
.site-logo {
width: 100%;
height: 100%;
background-image: url($logo);
background-repeat: no-repeat;
2019-09-09 15:55:31 -04:00
background-position: left center;
background-size: contain;
}
}
2019-08-13 17:23:35 -04:00
.menu-button {
appearance: none;
display: flex;
height: 100%;
padding: $gutter-spacing-sm;
align-items: center;
2019-08-13 17:23:35 -04:00
color: $link-color;
text-transform: uppercase;
background: transparent;
border: 0;
@include mq(md) {
display: none;
}
}
2019-04-30 21:00:56 -04:00
// stylelint-disable selector-max-type
2018-10-23 11:40:39 -04:00
body {
position: relative;
padding-bottom: $sp-10;
@include mq(md) {
position: static;
padding-bottom: 0;
}
}
2019-04-30 21:00:56 -04:00
// stylelint-enable selector-max-type
2018-10-23 11:40:39 -04:00
2017-03-09 13:16:08 -05:00
.site-footer {
@include container;
2018-10-23 11:40:39 -04:00
position: absolute;
bottom: 0;
2019-08-06 15:56:29 -04:00
left: 0;
padding-top: $sp-4;
padding-bottom: $sp-4;
2018-10-23 11:40:39 -04:00
2017-03-09 13:16:08 -05:00
@include mq(md) {
position: static;
justify-self: end;
2017-03-24 09:47:37 -04:00
}
2017-03-09 13:16:08 -05:00
}