Fixed rendering bugs for pruned navigation items

This commit is contained in:
squidfunk 2023-07-06 13:12:05 +02:00
parent 4402f41596
commit 6b2f15f8e1
No known key found for this signature in database
GPG Key ID: 5ED40BC4F9C436DF
7 changed files with 14 additions and 14 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -44,7 +44,7 @@
{% endif %}
{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.80601de9.min.css' | url }}">
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.92d4c850.min.css' | url }}">
{% if config.theme.palette %}
{% set palette = config.theme.palette %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.ecc896b0.min.css' | url }}">

View File

@ -15,7 +15,7 @@
{% include ".icons/" ~ nav_item.meta.icon ~ ".svg" %}
{% endif %}
<span class="md-ellipsis">
{{ nav_item.title }}
{{ ref.title }}
</span>
{% if nav_item.is_page and nav_item.meta.status %}
{{ render_status(nav_item, nav_item.meta.status) }}
@ -27,8 +27,8 @@
{{ render_pruned(first, ref) }}
{% else %}
<a href="{{ first.url | url }}" class="md-nav__link">
{{ render_content(first, ref) }}
{% if nav_item.children | length > 1 %}
{{ render_content(ref) }}
{% if nav_item.children | length > 0 %}
<span class="md-nav__icon md-icon"></span>
{% endif %}
</a>

View File

@ -119,11 +119,11 @@
// and the element will become unclickable. Setting `position: relative`
// seems to fix the issue - see https://bit.ly/3HljM1T
position: relative;
}
// Always align navigation icons to the right
+ .md-icon {
margin-left: auto;
}
// Always align navigation icons to the right
.md-icon:last-child {
margin-left: auto;
}
// Navigation link icon

View File

@ -48,7 +48,7 @@
<!-- Navigation link title -->
<span class="md-ellipsis">
{{ nav_item.title }}
{{ ref.title }}
</span>
<!-- Navigation link status -->
@ -68,10 +68,10 @@
<!-- Navigation link -->
{% else %}
<a href="{{ first.url | url }}" class="md-nav__link">
{{ render_content(first, ref) }}
{{ render_content(ref) }}
<!-- Only render toggle if there's at least one more page -->
{% if nav_item.children | length > 1 %}
<!-- Only render toggle if there's at least one nested item -->
{% if nav_item.children | length > 0 %}
<span class="md-nav__icon md-icon"></span>
{% endif %}
</a>