diff options
| Commit | 1e111955c502ccd37e81a59fac3099501e6889cf (patch) | |
|---|---|---|
| Author | 2023-04-27 15:45:50 +0300 | |
| Committer | 2023-04-27 15:45:50 +0300 | |
| Files | b9fdc618a5b2b4ff6f83a31a12567b5bcc2892a5 | |
| syndamia.com-floating-article-sections.tar syndamia.com-floating-article-sections.tar.gz syndamia.com-floating-article-sections.zip | ||
| Parent | 26751c792f9520eef25ac0c55cee15bee0789464 (diff) | |
[Article-separators] Added intial concept floating-article-sections
3 files changed, 22 insertions, 3 deletions
| -rw-r--r-- | awk-edits/Article-separator.awk | 15 | ||||
| -rw-r--r-- | src/_footer.html | 1 | ||||
| -rw-r--r-- | src/styles.css | 9 |
diff --git a/awk-edits/Article-separator.awk b/awk-edits/Article-separator.awk new file mode 100644 index 0000000..7365da2 --- /dev/null +++ b/awk-edits/Article-separator.awk @@ -0,0 +1,15 @@ +BEGIN { + arstarted = 0 +} + +/<article>/ { + arstarted = 1 +} + +arstarted == 1 && /<h1/ { + print "<div class=\"section\">" +} + +arstarted == 1 && /<h2/ { + print "</div><div class=\"section\">" +} diff --git a/src/_footer.html b/src/_footer.html index c19241c..f6f5788 100644 --- a/src/_footer.html +++ b/src/_footer.html @@ -1,3 +1,4 @@ + </div> </article> <img id="scrollBtn" class="icon unzoomable btn" src="/img/chevrons-up.svg" alt="^"> diff --git a/src/styles.css b/src/styles.css index 1a02b79..4565e96 100644 --- a/src/styles.css +++ b/src/styles.css @@ -82,7 +82,7 @@ body { color: var(--fg-color); min-height: calc(100vh - 16px); } - nav, article { background-color: var(--bg-color); } + nav { background-color: var(--bg-color); } body, td, th { font: 18px sans-serif; } * { line-height: 1.3em; } @@ -148,7 +148,6 @@ h1, h2, h3, h4, h5, h6, b { line-height: 1.25em; } h1 { font-size: 1.7em; margin-block-end: 0.5em; } - h2 { margin-top: 2.5em; } h3 { margin-top: 2em; } h4 { border-bottom: 2px solid var(--border-color); } h2, h3, h4, h5, h6 { display: inline-block; } /* For link to appear next to heading */ @@ -325,12 +324,16 @@ dt { font-size: 1.2em; } max-width: 56em; /* Equivalent to 50em on 19px font-size */ min-height: calc(100vh - 228px); overflow: auto; - padding: 0 1em; } article, .centered { margin-left: auto; margin-right: auto; } + .section { + margin-bottom: 1.5em; + background-color: var(--bg-color); + padding: 0.5em 1em; + } #contents-container { float: right; margin-left: 2.5em; } #contents-container > h2 { margin-top: -1rem; } #pagenav { |