Factor out common module prefix when all modules are under a same namespace.

This commit is contained in:
KtorZ
2022-12-17 00:57:49 +01:00
parent 600c7747da
commit 5c0920d6bb
3 changed files with 119 additions and 16 deletions

View File

@@ -185,6 +185,9 @@
{% endif %}
<h2>Modules</h2>
{% if !modules_prefix.is_empty() %}
<h3 class="modules-prefix">{{ modules_prefix }}/</h3>
{% endif %}
<ul>
{% for module in modules %}
<li><a href="{{ breadcrumbs }}/{{ module.path }}">{{ module.name }}</a></li>

View File

@@ -305,12 +305,21 @@ p code {
margin: 0;
}
.sidebar h3.modules-prefix {
color: var(--pink);
margin-bottom: 0;
}
.sidebar ul {
list-style: none;
margin: var(--small-gap) 0;
padding: 0;
}
.sidebar h3.modules-prefix + ul {
margin-left: var(--tiny-gap);
}
.sidebar li {
line-height: 1.2;
margin-bottom: 4px;