Skip to content

Commit

Permalink
Nest footer inside main
Browse files Browse the repository at this point in the history
  • Loading branch information
nntrn committed Mar 12, 2024
1 parent 57bb401 commit 7cd3d7a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions _includes/style.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
:root{--px-size:2.5%}
*{box-sizing:border-box}
html{font-size:13px}
body{display:flex;flex-direction:column;gap:.25rem;scrollbar-width:thin;margin:0 0;padding:0 0;/*! width:90%; */margin:auto;font-family:times,Helvetica Neue,Helvetica,Arial,sans-serif;font-size:inherit;line-height:1.25;counter-reset:reversed(section);text-rendering:optimizeLegibility;max-height:100vh;overflow-y:hidden}
html{font-size:12px}
body{display:flex;flex-direction:column;gap:.25rem;scrollbar-width:thin;margin:0 0;padding:0 0;margin:auto;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:inherit;line-height:1.25;counter-reset:reversed(section);text-rendering:optimizeLegibility;max-height:100vh;overflow-y:hidden}
date{margin-right:.5rem;text-transform:uppercase}
header{padding:.5rem 0;padding-bottom:1rem;position:sticky;top:0;z-index:100;background:#fff;border-bottom:1px solid #ccc}
header{padding:.5rem 0;padding-bottom:.5rem;position:sticky;top:0;z-index:100;background:#fff;border-bottom:1px solid #ccc}
footer p,header h1{padding-left:var(--px-size);padding-right:var(--px-size)}
footer p{border-top:1px solid #222;padding-top:1rem/*! position: absolute; */}
footer p{border-top:1px solid #222;padding-top:1rem}
main{gap:2rem;position:relative;padding-left:var(--px-size);padding-right:var(--px-size);width:100%;scrollbar-width:thin;overflow-y:scroll;min-height:75vh;margin-top:calc(var(--px-size)/4);margin-bottom:0}
article{flex:3}
aside .container{border-right:1px dotted #222;min-height:75vh}
Expand All @@ -15,6 +15,8 @@ aside a:hover{color:#222}
aside h4 a{font-family:sans-serif;font-size:.9em}
aside strong{font-weight:700;display:block;line-height:1.1}
h1,h2,h3,h4{margin:0 0}
h1 a{color:#222}
h1,h2,h3{font-family:times}
h3 a{text-transform:capitalize;text-decoration:none;color:initial}
hr{border:0;border-bottom:1px solid #222;margin:1rem 0}
label span:empty{display:none}
Expand Down Expand Up @@ -59,8 +61,9 @@ section .toc{max-height:60vh;position:sticky;top:0;list-style:none;padding:0 0;/
section .toc li{position:relative;line-height:.9;font-size:.9em;padding:0 0;display:flex}
section .toc li a{color:#222;white-space:pre;text-align:center;padding:0 4px}
#burger{display:none}
#burger{z-index:10000;border:0 solid #222;border-radius:0;box-shadow:-2px -2px #fff,-2px 2px #fff,2px 2px #fff,2px -2px #fff;position:absolute;right:0;height:20px;width:22px;margin:1rem;content:" ";position:fixed;top:0;background:linear-gradient(to bottom,#000 20%,#fff 20%,#fff 40%,#000 40%,#000 60%,#fff 60%,#fff 80%,#000 80%,#000 100%)}
#burger{z-index:10000;border:0 solid #222;border-radius:0;box-shadow:-2px -2px #fff,-2px 2px #fff,2px 2px #fff,2px -2px #fff;position:absolute;right:0;height:20px;width:22px;margin:.75rem;content:" ";position:fixed;top:0;background:linear-gradient(to bottom,#000 20%,#fff 20%,#fff 40%,#000 40%,#000 60%,#fff 60%,#fff 80%,#000 80%,#000 100%)}
#burger~aside .container{position:sticky;top:0;max-height:75vh;overflow-y:scroll;scrollbar-width:thin;scroll-behavior:smooth}
#burger.show{opacity:.25}
@media (max-width:750px){
main{padding-right:unset/*! width:95%; */}
aside .container{min-height:20vh}
Expand Down
2 changes: 1 addition & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ <h1 class="site-title"><a href="{{ '/' | relative_url }}">{{site.title}}</a></h1
</header>
<main>
{{ content }}
</main>
<footer>
<p>Created by <a href="https://github.com/{{site.repository}}">@{{site.github_username}}</a></p>
</footer>
</main>
<script>
{%- if page.type == "book" %}
{% include script.js %}
Expand Down

0 comments on commit 7cd3d7a

Please sign in to comment.