Offset anchor top when linking to '/#readme'

This commit is contained in:
Chris Kankiewicz
2020-01-23 13:09:20 -07:00
parent ba21ebef9b
commit d59799f0df
2 changed files with 22 additions and 11 deletions

View File

@@ -15,3 +15,12 @@ $fa-font-path: "./webfonts";
// Additional Styles
@import "markdown.scss";
@import "dark-mode.scss";
// Miscellaneous
:target::before {
content: "";
display: block;
height: 80px;
margin-top: -80px;
visibility: hidden;
}

View File

@@ -1,13 +1,15 @@
<div id="readme" class="rounded-lg overflow-hidden shadow-md my-8">
<header class="flex items-center bg-blue-600 px-4 py-3 text-white">
<i class="fas fa-book fa-lg pr-3"></i> README.md
</header>
<div id="readme" class="my-8">
<div class="rounded-lg overflow-hidden shadow-md">
<header class="flex items-center bg-blue-600 px-4 py-3 text-white">
<i class="fas fa-book fa-lg pr-3"></i> README.md
</header>
<article class="bg-gray-100 rounded-b-lg px-4 py-8 sm:px-6 md:px-8 lg:px-12 {{ readme.getExtension == 'md' ? 'markdown' : 'font-mono' }}">
{% if readme.getExtension == 'md' %}
{{ markdown(readme.getContents) | raw }}
{% else %}
{{ readme.getContents | nl2br }}
{% endif %}
</article>
<article class="bg-gray-100 rounded-b-lg px-4 py-8 sm:px-6 md:px-8 lg:px-12 {{ readme.getExtension == 'md' ? 'markdown' : 'font-mono' }}">
{% if readme.getExtension == 'md' %}
{{ markdown(readme.getContents) | raw }}
{% else %}
{{ readme.getContents | nl2br }}
{% endif %}
</article>
</div>
</div>