mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed rendering bugs for pruned navigation items
This commit is contained in:
parent
4402f41596
commit
6b2f15f8e1
File diff suppressed because one or more lines are too long
1
material/assets/stylesheets/main.92d4c850.min.css
vendored
Normal file
1
material/assets/stylesheets/main.92d4c850.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -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 }}">
|
||||
|
@ -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>
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user