mirror of
https://github.com/fooflington/selfdefined.git
synced 2025-06-09 04:25:12 +00:00
fix(table of content): avoid breaks inside of list items
This commit is contained in:
parent
fdeeadc074
commit
a0c65ee102
@ -1,4 +1,4 @@
|
||||
<li>
|
||||
<li class="toc__list-item">
|
||||
{{ definition.data.title | linkIfExistsInCollection(collections.definedWords) | safe }}
|
||||
{%- if
|
||||
definition.data.flag and
|
||||
|
@ -1,16 +1,16 @@
|
||||
<section>
|
||||
<nav class="" aria-label="Definitions">
|
||||
<ol class="multi-column u-no-padding-left list">
|
||||
{% for section in collections.tableOfContent %}
|
||||
<li>
|
||||
<span class="sub-headline">{{ section.title }}</span>
|
||||
<ol>
|
||||
{% for definition in section.definitions %}
|
||||
{% include 'components/table-of-content-item.njk' %}
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% for section in collections.tableOfContent %}
|
||||
<li>
|
||||
<span class="sub-headline">{{ section.title }}</span>
|
||||
<ol class="toc__list">
|
||||
{% for definition in section.definitions %}
|
||||
{% include 'components/table-of-content-item.njk' %}
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</nav>
|
||||
</section>
|
||||
|
@ -181,6 +181,7 @@ th {
|
||||
column-gap: var(--l-gap);
|
||||
column-width: var(--auto-grid-min-size);
|
||||
}
|
||||
@import './structures/table-of-content';
|
||||
|
||||
.small-left-grid {
|
||||
display: grid;
|
||||
|
3
assets/css/structures/_table-of-content.scss
Normal file
3
assets/css/structures/_table-of-content.scss
Normal file
@ -0,0 +1,3 @@
|
||||
.toc__list-item {
|
||||
page-break-inside: avoid;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user