Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit714d8f3a5840b89120c0e95617f68af32cf6cb74 (patch)
Author
 Syndamia <kamen@syndamia.com>
2025-08-19 18:05:26 +0300
Committer
 Syndamia <kamen@syndamia.com>
2025-08-19 18:05:26 +0300
Files0bfbadc98760d037d921f29ec00ddd71cee308ce
syndamia.com-714d8f3a5840b89120c0e95617f68af32cf6cb74.tar
syndamia.com-714d8f3a5840b89120c0e95617f68af32cf6cb74.tar.gz
syndamia.com-714d8f3a5840b89120c0e95617f68af32cf6cb74.zip
Parent9947229ee9d5d7f2f6e1d75765a71b326f7ce956 (diff)
feat(styles): Allow pages which are too short to properly shrink
Before, if a page (like src/teaching.html) was too short, we would get a whole lot of gray color after the article footer. Now we don't.
3 files changed, 15 insertions, 9 deletions
-rw-r--r--meta/footer.html9
-rw-r--r--meta/header.html3
-rw-r--r--src/styles.css12
diff --git a/meta/footer.html b/meta/footer.html
index 605da32..34495b9 100644
--- a/meta/footer.html
+++ b/meta/footer.html
@@ -1,7 +1,8 @@
- <div class="gap"></div>
- <footer>
- Unless stated otherwise - <a href="/licensing.html">CC BY-SA 4.0</a> - <a href="/about">Kamen</a> @ <a href="/">syndamia.com</a>
- </footer>
+ <div class="gap"></div>
+ <footer>
+ Unless stated otherwise - <a href="/licensing.html">CC BY-SA 4.0</a> - <a href="/about">Kamen</a> @ <a href="/">syndamia.com</a>
+ </footer>
+ </div>
</article>
<div id="scrollBtn" class="btn">&#xFE3D;</div>
diff --git a/meta/header.html b/meta/header.html
index ff3908e..27d1c53 100644
--- a/meta/header.html
+++ b/meta/header.html
@@ -122,5 +122,4 @@
<article>
<script type="text/javascript" src="/scripts/page-width.js" crossorigin="anonymous" defer></script>
-
-
+ <div id="article-container">
diff --git a/src/styles.css b/src/styles.css
index bfc9c3b..d0e9c41 100644
--- a/src/styles.css
+++ b/src/styles.css
@@ -93,7 +93,7 @@ body, td, th { font-size: 18px; font-family: 'Tabler', sans-serif; }
* add elements for helping with website usage, but which shouldn't be seen otherwise */
.nocss-aid { display: none; }
-nav, article { background-color: var(--bg-color); }
+nav, article > #article-container { background-color: var(--bg-color); }
/* Lists with line-separated items (ORDERED_LIST, UNORDERED_LIST) */
li > div:only-child,
@@ -179,11 +179,17 @@ article {
max-width: 56em; /* Equivalent to 50em on 19px font-size */
margin-bottom: 1em;
overflow: auto;
- padding: 0 1em;
margin-left: auto;
margin-right: auto;
}
+article > #article-container {
+ /* Top padding is 1.7em * 0.67em = (h1 font size) * (h1 default margin size) */
+ padding: 1.139em 1em 0 1em;
+}
+article > #article-container > h1:first-child {
+ margin-top: 0;
+}
.article-wide {
max-width: initial;
margin-left: initial;
@@ -299,7 +305,7 @@ a[rev="footnote"] { border: none; }
/*### Wrapper > Article > footer ###*/
-article > footer {
+article > #article-container > footer {
margin: 0 -1em;
padding: 0.5em;
border: 3px solid var(--accent-line-color);