Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Améliorations visuelles du breadcrumb dropdown #731

Merged
merged 3 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
</div>
</li>
<li class="breadcrumb-item">
<a class="bread-link" href="#">School of Architecture, Civil and Environmental Engineering</a>
<a class="bread-link" href="#">ENAC</a>
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" aria-controls="dropdown-menu-2">
{% include '@atoms/icon/icon.twig' with { icon: 'arrow-down-circle', icon_classes:'feather' } %}
<span class="sr-only">Display same level pages – School of Architecture, Civil and Environmental Engineering</span>
<span class="sr-only">Display same level pages – ENAC</span>
</button>
<ul class="dropdown-menu" id="dropdown-menu-2">
<li class="dropdown-item current-menu-item-parent"><a href="#">School of Architecture, Civil and Environmental Engineering</a></li>
<li class="dropdown-item current-menu-item-parent"><a href="#">School of Architecture, Civil and Environmental Engineering (ENAC)</a></li>
<li class="dropdown-item"><a href="#">School of Computer and Communication Sciences</a></li>
<li class="dropdown-item"><a href="#">School of Basic Sciences</a></li>
<li class="dropdown-item"><a href="#">School of Engineering</a></li>
Expand Down
9 changes: 8 additions & 1 deletion assets/components/molecules/breadcrumb/breadcrumb.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
}

li:last-child {
padding-right: 5rem;
margin-right: 5rem;
}
}
}
Expand Down Expand Up @@ -211,6 +211,8 @@
}

.breadcrumb .dropdown-menu {
min-width: 11.5rem;

&.show {
// dropdown position depends on the <li>, not the button
top: 1.65rem !important;
Expand All @@ -227,11 +229,16 @@
.breadcrumb .dropdown-item {
padding: 0.125em 0.625rem;
font-size: 0.83rem;
line-height: 1.3em;

a {
display: block;
}

& + .dropdown-item {
margin-top: 0.5rem;
}

&.current-menu-item,
&.current-menu-item-parent {
font-weight: bold;
Expand Down
Loading