Fixed elements exceeding article width

This commit is contained in:
Lucas Hinderberger 2020-08-31 16:10:14 +02:00
parent a0071b676b
commit 8f4c286ae6
2 changed files with 8 additions and 4 deletions

View file

@ -26,8 +26,7 @@ main > .container { display: flex; }
#sidebar .sidebar-close-button { display: none; position: relative; text-align: right; top: -35px; }
#sidebar .sidebar-close-button a:hover { color: red; }
article { flex: 99; padding: 50px 0; margin-left: 150px; max-width: 100%; }
article p { hyphens: auto; }
article { padding: 50px 0; width: 800px; }
article :first-child { margin-top: 0; }
article h1 { font-size: 34pt; }
@ -37,12 +36,14 @@ article h4 { font-size: 16pt; }
article h5 { font-size: 14pt; }
article h6 { font-size: 12pt; }
article blockquote, pre { background: #eee; padding: 30px; margin: 0; border-left: 5px solid #2185d0; overflow: auto; }
article blockquote, article img, article pre { box-sizing: border-box; }
article blockquote, article pre { background: #eee; padding: 30px; margin: 0; border-left: 5px solid #2185d0; overflow: auto; }
article blockquote p:last-of-type { margin-bottom: 0; }
article blockquote blockquote { background: #ddd; }
article code { background: #eee; border-radius: 5px; padding: 1px 3px; }
article pre code { background: none; border-radius: none; padding: 0; }
article img { border: 5px solid #eee; max-width: 100%; }
article p { hyphens: auto; max-width: 100%; }
article table { border-collapse: collapse; }
article td, th { padding: 15px; }
article th { background: #ddd; }
@ -57,11 +58,12 @@ footer { background: #f5f5f5; text-align: center; font-size: 8pt; padding: 15px;
.container { max-width: 1300px; margin: auto; height: 100%; }
.fas { font-family: "Font Awesome 5 Free Solid"; }
.flex-spacer { flex: 99; }
@media screen and (max-width: 1400px) {
#sidebar { display: block; position: absolute; left: 0; top: 0; height: 100%; transform: translateX(-400px); }
#sidebar .sidebar-close-button { display: block; }
article { margin-left: 0; margin-right: 0; }
article { margin-left: 0; margin-right: 0; width: 100%; }
.container { max-width: 780px; padding: 0 50px; }
#contents-button { display: inline-block; background: #eee; border-radius: 5px; padding: 5px; width: 20px; height: 20px; text-align: center; }
#contents-button:hover { background: #ccc; }

View file

@ -67,6 +67,8 @@
</nav>
</div>
<div class="flex-spacer"></div>
<article>
{% if eleventyNavigation.title %}<h1>{{ eleventyNavigation.title }}</h1>{% endif %}
{% if eleventyNavigation.draft %}<strong>Please note that this article is still a draft and might not have any contents yet.</strong>{% endif %}