From 5045baabb4135cfa91c2618920675d7fe431627a Mon Sep 17 00:00:00 2001 From: Luke Carl Hartman Date: Mon, 19 Aug 2024 09:47:00 -0700 Subject: [PATCH] fix header issues --- _config.yml | 2 +- _includes/sidebar.html | 4 +-- _layouts/base.html | 21 ++++++++---- _sass/minima/custom-styles.scss | 61 +++++++++++++++++++++++++-------- 4 files changed, 64 insertions(+), 24 deletions(-) diff --git a/_config.yml b/_config.yml index adced3d..4e8c6f3 100644 --- a/_config.yml +++ b/_config.yml @@ -13,7 +13,7 @@ # you will see them accessed via {{ site.title }}, {{ site.email }}, and so on. # You can create any custom variable you would like, and they will be accessible # in the templates via {{ site.myvariable }}. -title: CME Docs +title: CME Documentation author: name: email: mediaengagement@austin.utexas.edu diff --git a/_includes/sidebar.html b/_includes/sidebar.html index 6aa636c..1af43d3 100644 --- a/_includes/sidebar.html +++ b/_includes/sidebar.html @@ -11,11 +11,11 @@

{{ site.title }} {{ site.tagline }}

- {%- if page.path contains 'index' -%} + + + -
{{ content }}
- - + {%- if page.path contains '_posts' -%} +
+ Edit this page on GitHub +
+ {%- endif -%} diff --git a/_sass/minima/custom-styles.scss b/_sass/minima/custom-styles.scss index 5217462..a04d658 100644 --- a/_sass/minima/custom-styles.scss +++ b/_sass/minima/custom-styles.scss @@ -20,41 +20,69 @@ body { .theme-base-0g .related-posts li a:hover { color: $link-base-color; } +.sidebar-toggle { + left: 10px; +} pre { background-color: $border-color-02; } .masthead { border-top: 2px solid $border-color-01; + @include media-query($on-palm) { + position: fixed; + width: 100%; + background-color: $subtitle-bk-color; + } @media screen and (min-width: 1000px) { + display: flex; + justify-content: space-between; + max-width: 75vw; + width: 100%; border-bottom: none; padding-top: 0; padding-bottom: 0; margin-bottom: 1rem; + margin-left: 1rem; } @include media-query($on-large) { - padding-top: 1rem; - padding-bottom: 1rem; + display: flex; border-bottom: 2px solid $border-color-01; } - .container { - padding: 1rem; + + @media screen and (min-width: 1000px) { + .container { + padding: 1rem; + } } } - +.edit { + display: none; +@media screen and (min-width: 1000px) { + position: absolute; + display: block; + right: 0; + top: 0; + padding: 1rem; +} +} .masthead-title { text-align: left; &:not(.masthead-title__sidebar) { @media screen and (max-width: 1000px) { display: block; - text-align: center; + margin-left: 1rem; } } } .container { - margin-left: 3rem; - @include media-query($on-medium) { - margin-left: auto; + margin-left: 2rem; + + &.content { + @include media-query($on-medium) { + margin-top: 6rem; + margin-left: auto; + } } } /* Blog post or page title */ @@ -115,18 +143,21 @@ span.sidebar-nav-item { transform: unset; } } -.sidebar-toggle { - @include media-query($on-palm) { - // display: none; - } -} + ul { &.inline { list-style: none; - display: inline-flex; + @include media-query($on-medium) { + margin-left: 0; + } > li { margin-right: 1em; + @include media-query($on-medium) { + display: flex; + align-items: center; + gap: 5px; + } } } }