Skip to content

Use navbar-nav class on text links only #1846

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

Merged
merged 3 commits into from
Jun 4, 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 @@ -7,6 +7,10 @@
flex-flow: row wrap;
column-gap: 1rem;
justify-content: space-evenly;
align-items: center;
padding-left: 0;
margin-bottom: 0;
list-style: none;

// Remove the padding so that we can define it with flexbox gap above
li.nav-item a.nav-link {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* Navigation text links in the navbar
* Navigation links in the navbar and icon links
*/
.navbar-nav {
.navbar-nav,
.navbar-icon-links {
ul {
display: block;
list-style: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
display: flex;

@include media-breakpoint-up($breakpoint-sidebar-primary) {
// Center align on wide screens so the dropdown button is centered properly
// Align on wide screens so the dropdown button is centered properly
align-items: baseline;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{%- endif -%}
{%- endmacro -%}
{%- if theme_icon_links -%}
<ul class="navbar-icon-links navbar-nav"
<ul class="navbar-icon-links"
aria-label="{{ theme_icon_links_label }}">
{%- for icon_link in theme_icon_links -%}
{{ icon_link_nav_item(icon_link["url"], icon_link["icon"], icon_link["name"], icon_link.get("type", "fontawesome"), icon_link.get("attributes", {})) -}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{# Displays links to the top-level TOCtree elements, in the header navbar. #}
<nav class="navbar-nav">
<nav>
<ul class="bd-navbar-elements navbar-nav">
{{ generate_header_nav_html(n_links_before_dropdown=theme_header_links_before_dropdown, dropdown_text=theme_header_dropdown_text) }}
</ul>
Expand Down
2 changes: 1 addition & 1 deletion tests/test_build/navbar_icon_links.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<ul aria-label="Icon Links" class="navbar-icon-links navbar-nav">
<ul aria-label="Icon Links" class="navbar-icon-links">
<li class="nav-item">
<a class="nav-link" data-bs-placement="bottom" data-bs-toggle="tooltip" href="https://site1.org" rel="noopener" target="_blank" title="FONTAWESOME">
<span>
Expand Down
2 changes: 1 addition & 1 deletion tests/test_build/navbar_ix.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="me-auto navbar-header-items__center">
<div class="navbar-item">
<nav class="navbar-nav">
<nav>
<ul class="bd-navbar-elements navbar-nav">
<li class="nav-item pst-header-nav-item">
<a class="nav-link nav-internal" href="page1.html">
Expand Down
2 changes: 1 addition & 1 deletion tests/test_build/sidebar_subpage.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="sidebar-header-items sidebar-primary__section">
<div class="sidebar-header-items__center">
<div class="navbar-item">
<nav class="navbar-nav">
<nav>
<ul class="bd-navbar-elements navbar-nav">
<li class="nav-item pst-header-nav-item">
<a class="nav-link nav-internal" href="../page1.html">
Expand Down
Loading