Skip to content

Commit

Permalink
💄 style: increase margins before content & after ToC
Browse files Browse the repository at this point in the history
  • Loading branch information
welpo committed Feb 19, 2023
1 parent 0ecc656 commit 83b7bb9
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 26 deletions.
1 change: 1 addition & 0 deletions sass/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ body {
.content {
max-width: var(--max-layout-width);
margin: 0 auto;
margin-top: 6vmin;
padding: 0 24px;
word-wrap: break-word;
min-height: 80vh;
Expand Down
4 changes: 2 additions & 2 deletions sass/parts/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ header {
justify-content: space-between;
padding: 1em 24px;
margin: 0 auto;
margin-bottom: 0.2rem;
}

.nav-navs {
Expand Down Expand Up @@ -74,7 +73,8 @@ header {
letter-spacing: -0.5px;
font-size: 0.8rem;
font-weight: 300;
padding-bottom: 1vmin;
padding-top: 0.7vmin;
padding-bottom: 3vmin;
}

.meta a {
Expand Down
1 change: 0 additions & 1 deletion sass/parts/_home-banner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
}

.home-banner-header {
margin-top: 2rem;
margin-bottom: 1rem;
font-size: 2.8rem;
font-weight: 600;
Expand Down
10 changes: 8 additions & 2 deletions sass/parts/_misc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,23 @@
}

.article-title {
padding-bottom: 1.2vmin;
display: block;
font-size: 2em;
margin-top: 0.67em;
margin-bottom: 0em;
margin-left: 0;
margin-right: 0;
font-weight: 550;
line-height: 2.4rem;
}

ul {
margin-top: 0;
}

.toc-container {
margin-bottom: 4vmin;
}

.title-container {
border-bottom: var(--secondary-color) solid 0.5px;
padding-bottom: 15px;
Expand Down
44 changes: 23 additions & 21 deletions templates/macros/macros.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,33 +144,35 @@ <h3>TL;DR:</h3>
{# Optional table of contents #}
{% if page.extra.toc | default(value=false) %}
{% if page.toc %}
<h2>Table of Contents</h2>
<ul>
{% for h1 in page.toc %}
<li>
<a href="{{ h1.permalink | safe }}">{{ h1.title }}</a>
{% if h1.children %}
<ul>
{% for h2 in h1.children %}
<li>
<a href="{{ h2.permalink | safe }}">{{ h2.title }}</a>
</li>

{% if h2.children %}
<div class="toc-container">
<h2>Table of Contents</h2>
<ul>
{% for h1 in page.toc %}
<li>
<a href="{{ h1.permalink | safe }}">{{ h1.title }}</a>
{% if h1.children %}
<ul>
{% for h3 in h2.children %}
{% for h2 in h1.children %}
<li>
<a href="{{ h3.permalink | safe }}">{{ h3.title }}</a>
<a href="{{ h2.permalink | safe }}">{{ h2.title }}</a>
</li>

{% if h2.children %}
<ul>
{% for h3 in h2.children %}
<li>
<a href="{{ h3.permalink | safe }}">{{ h3.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
</ul>
{% endif %}
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endif %}

Expand Down

0 comments on commit 83b7bb9

Please sign in to comment.