Ensure proper toc wrapping

This commit is contained in:
Florine W. Dekker 2022-11-19 19:13:09 +01:00
parent a35ca5efc6
commit 239be7235f
Signed by: FWDekker
GPG Key ID: D3DCFAA8A4560BE0
3 changed files with 21 additions and 1 deletions

View File

@ -55,6 +55,11 @@ a[target="_blank"]::after {
.container-with-toc {
display: grid;
grid-template-columns: 200px auto;
grid-column-gap: calc(var(--block-spacing-horizontal) * 3);
}
.container-with-toc nav {
max-width: 200px;
}
}

View File

@ -103,7 +103,7 @@ const nav = function(highlightPath = "", cb = undefined) {
*/
const unpackEntry = function(entry, path = "/", highlightPath = "") {
const shouldHighlight = highlightPath.startsWith(`${path + entry.name}/`);
const isExternalLink = !(/^https:\/\/.*fwdekker.com/.test(entry.link)) && entry.link !== "#";
const isExternalLink = !(/^https:\/\/.*fwdekker.com/i.test(entry.link)) && entry.link !== "#";
if (entry.entries.length === 0)
return "" +

View File

@ -67,6 +67,21 @@
<h6>Test</h6>
<p>Here is some text you may want to read.</p>
<h2>Test</h2>
<p>Here is some text you may want to read.</p>
<h2>Test</h2>
<p>Here is some text you may want to read.</p>
<h2>Test</h2>
<p>Here is some text you may want to read.</p>
<h2>Test</h2>
<p>Here is some text you may want to read.</p>
<h2>Test</h2>
<p>Here is some text you may want to read.</p>
</section>
<footer id="footer"></footer>
</div>