/** * Site header */ .site-header { border-top: 5px solid; border-bottom: 1px solid; min-height: $base-font-size * 3; line-height: $base-font-size * 3; // Positioning context for the mobile navigation icon position: relative; } .site-title { @include relative-font-size(1.625); font-family: $title-font-family; letter-spacing: -1px; margin-bottom: 0; float: left; @include media-query($on-medium) { padding-right: 45px; } } .site-nav { position: absolute; top: 9px; right: $spacing-unit / 2; border: 1px solid; border-radius: 0.4em; text-align: right; .nav-trigger { display: none; } .menu-icon { float: right; width: $base-font-size * 2; height: $base-font-size * 2; line-height: 0; text-align: center; svg { width: $base-font-size; height: $base-font-size; padding-top: $base-font-size / 2; } } label[for="nav-trigger"] { display: block; float: right; width: $base-font-size * 2; height: $base-font-size * 2; z-index: 2; cursor: pointer; } input ~ .trigger { clear: both; display: none; } input:checked ~ .trigger { display: block; padding-bottom: 5px; } .page-link { line-height: $base-line-height * $base-font-size * 1.15; display: block; padding: 5px 5px; // Gaps between nav items, but not on the last one &:not(:last-child) { margin-right: 0; } margin-left: 10px; } .current-page { text-decoration: line-through; } @media screen and (min-width: $on-medium) { position: static; float: right; border: none; background-color: inherit; label[for="nav-trigger"] { display: none; } .menu-icon { display: none; } input ~ .trigger { display: block; } .page-link { display: inline; padding: 0; &:not(:last-child) { margin-right: 10px; } margin-left: auto; } } } /** * Homepage */ .home { margin-top: $spacing-unit; } .post-list { margin-left: 0; padding-left: 0; list-style: none; li { padding-top: $spacing-unit / 2; padding-bottom: $spacing-unit / 2; border-bottom: 1px solid; margin-bottom: $spacing-unit; h2 { margin-bottom: 0; } .post-excerpt { margin-top: $spacing-unit / 2; p { margin-bottom: 0; } } } } .post-link { @include relative-font-size(1.5); @media screen and (min-width: $on-large) { @include relative-font-size(1.55); } } /** * Pagination */ .pagination { list-style: none; margin: 0 auto; margin-bottom: $spacing-unit; display: table; li { float: left; margin: 5px 15px 5px 0; &:last-of-type { margin-right: 0 } a, div { display: block; padding: $spacing-unit / 4; border: 1px solid; min-width: 41px; text-align: center; box-sizing: border-box; } } } /** * Page content */ .page-content { flex: 1 0 auto; } /** * Posts */ .post-header { padding-top: $spacing-unit * 2.5; padding-bottom: $spacing-unit * 2.5; margin-bottom: $spacing-unit * 2; text-align: center; } .post-meta { @include relative-font-size(0.8); margin-bottom: $spacing-unit / 2; } .post-tags { .post-tag { margin-right: $spacing-unit / 2; } > :last-child { margin-right: 0; } } // About font sizes for h1-h6, refer to https://stackoverflow.com/a/6140504/13261366 .post-title, .post-content h1 { @include relative-font-size(2); font-weight: bold; letter-spacing: -1px; line-height: $base-line-height * $base-font-size * 2; @media screen and (min-width: $on-large) { @include relative-font-size(2.5); } } .post-content { font-family: $reading-font-family; margin-bottom: $spacing-unit; h2 { margin-top: $spacing-unit * 2 } h3, h4 { margin-top: $spacing-unit * 1.5 } h5, h6 { margin-top: $spacing-unit } h2 { @include relative-font-size(1.5); @media screen and (min-width: $on-large) { @include relative-font-size(1.55); } } h3 { @include relative-font-size(1.17); @media screen and (min-width: $on-large) { @include relative-font-size(1.175); } } h4 { @include relative-font-size(1.12); } h5 { @include relative-font-size(0.83); } h6 { @include relative-font-size(0.75); } } /** * Taxonomies */ .taxonomies { list-style: none; display: grid; grid-column-gap: 2em; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 0; font-weight: bold; @include media-query($on-medium) { grid-template-columns: repeat(2, 1fr); } .taxonomy { display: flex; padding: 0.25em 0; justify-content: space-between; color: inherit; text-decoration: none; border-bottom: 1px solid; margin-bottom: $spacing-unit / 3; } } .post-list-by-taxonomy { time { font-family: $code-font-family; @include relative-font-size(0.9); } } .back-to-top { display: block; font-size: $base-font-size * 0.8; text-transform: uppercase; text-align: right; text-decoration: none; } /** * Alignment */ .align-right { margin-bottom: 1rem; margin-left: 1rem; float: right; } .align-left { margin-right: 1rem; margin-bottom: 1rem; float: left; } .align-center { display: block; margin-right: auto; margin-left: auto; } figcaption.align-right { text-align: right; } figcaption.align-left { text-align: left; } figcaption.align-center { text-align: center; } /** * Site footer */ .site-footer { border-top: 1px solid; padding: $spacing-unit 0; @include relative-font-size(0.8); p { margin-bottom: $spacing-unit / 4; } } @media screen and (min-width: $on-medium) { .footer-col-wrapper { display: flex } .footer-col { width: calc(100% - (#{$spacing-unit} / 2)); padding: 0 ($spacing-unit / 2); &:first-child { padding-right: $spacing-unit / 2; padding-left: 0; } &:last-child { padding-right: 0; padding-left: $spacing-unit / 2; } } } .feed-subscribe { font-weight: bold; text-align: left; .feed-icon { margin-right: 0.3em; } } .contact-list { list-style: none; margin-left: 0; } .social-icons { text-align: center; margin-top: $spacing-unit / 2; .social-icon { margin: 0.3em; } }