Skip to content

Commit

Permalink
fix header issues
Browse files Browse the repository at this point in the history
  • Loading branch information
luukee committed Aug 19, 2024
1 parent 40b5517 commit 5045baa
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 24 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: [email protected]
Expand Down
4 changes: 2 additions & 2 deletions _includes/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ <h3 class="masthead-title masthead-title__sidebar">
<a href="{{ site.baseurl }}/" title="Home">{{ site.title }}</a>
<small>{{ site.tagline }}</small>
</h3>
{%- if page.path contains 'index' -%}
<!-- {%- if page.path contains 'index' -%}
<sub class="sidebar-nav__page-title">Home</sub>
{%- else -%}
<sub class="sidebar-nav__page-title">{{ page.title }}</sub>
{%- endif -%}
{%- endif -%} -->
</div>
<div class="sidebar-item__main-nav">
<p class="sidebar-nav__toc-title">Main Nav</p>
Expand Down
21 changes: 15 additions & 6 deletions _layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,28 @@
<label for="sidebar-checkbox" class="sidebar-toggle"></label>

<h3 class="masthead-title">
<a href="{{ site.baseurl }}/" title="Home">{{ site.title }}</a>
<small>{{ site.tagline }}</small>
{% include top_nav.html %}
{%- if page.path contains '_posts' -%}
<a href="{{ site.baseurl }}/" title="Home">Docs</a> / {{ page.title | escape }}
{%- else -%}
<a href="{{ site.baseurl }}/" title="Home">Docs</a> / Home
{%- endif -%}

<!-- <small>{{ site.tagline }}</small> -->
<!-- {% include top_nav.html %} -->
</h3>
</div>
<!-- https://github.com/engagingnewsproject/engagingnewsproject.github.io -->
<!-- https://github.com/engagingnewsproject/engagingnewsproject.github.io/edit/main/_posts/2023-03-22-fb-study.md -->
</div>

<div class="container content">
{{ content }}
</div>
</div>


{%- if page.path contains '_posts' -%}
<div class="edit">
<a href="https://github.com/engagingnewsproject/engagingnewsproject.github.io/edit/main/{{ page.path }}" target="_blank">Edit this page on GitHub</a>
</div>
{%- endif -%}
<script src='{{ site.baseurl }}/assets/js/script.js'></script>
</body>

Expand Down
61 changes: 46 additions & 15 deletions _sass/minima/custom-styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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;
}
}
}
}
Expand Down

0 comments on commit 5045baa

Please sign in to comment.