Move top-level navigation bar inside body’s header
This is mostly to save on vertical space, since the header was almost useless but took a lot of screen real estate.
This commit is contained in:
parent
292720de28
commit
6ef551a846
|
@ -284,32 +284,31 @@ header {
|
|||
background-color: var(--numerus--header--background-color);
|
||||
}
|
||||
|
||||
header, body > nav a {
|
||||
header, header nav a {
|
||||
padding: 0 3rem;
|
||||
}
|
||||
|
||||
body > nav {
|
||||
border-bottom: 1px solid var(--numerus--color--light-gray);
|
||||
}
|
||||
|
||||
body > nav ul {
|
||||
header nav ul {
|
||||
display: flex;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body > nav li {
|
||||
header nav li {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
body > nav a {
|
||||
header nav a {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
min-height: 8rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
header nav a[aria-current] {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
main {
|
||||
padding: 2rem 3rem;
|
||||
}
|
||||
|
@ -551,31 +550,27 @@ ul[role="menu"].action-menu li i[class^='ri-'] {
|
|||
|
||||
/* menu tauler */
|
||||
|
||||
#profile-menu summary:hover, #profile-menu summary:focus, ul[role="menu"].action-menu button:hover, ul[role="menu"].action-menu a:hover, body > nav a {
|
||||
#profile-menu summary:hover, #profile-menu summary:focus, ul[role="menu"].action-menu button:hover, ul[role="menu"].action-menu a:hover, header nav a {
|
||||
color: var(--numerus--text-color);
|
||||
text-decoration: none;
|
||||
transition: 0.25s ease;
|
||||
}
|
||||
|
||||
#profile-menu summary:hover, #profile-menu summary:focus, ul[role="menu"].action-menu button:hover, ul[role="menu"].action-menu a:hover, body > nav ul:hover a {
|
||||
#profile-menu summary:hover, #profile-menu summary:focus, ul[role="menu"].action-menu button:hover, ul[role="menu"].action-menu a:hover, header nav ul:hover a {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
#profile-menu summary:hover, #profile-menu summary:focus, ul[role="menu"].action-menu button:hover, ul[role="menu"].action-menu a:hover, body > nav ul:hover a:hover {
|
||||
#profile-menu summary:hover, #profile-menu summary:focus, ul[role="menu"].action-menu button:hover, ul[role="menu"].action-menu a:hover, header nav ul:hover a:hover {
|
||||
color: var(--numerus--text-color);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
||||
#profile-menu summary:active, #profile-menu summary:active, ul[role="menu"].action-menu button:active, ul[role="menu"].action-menu a:active, body > nav ul:active li:active a:active {
|
||||
#profile-menu summary:active, #profile-menu summary:active, ul[role="menu"].action-menu button:active, ul[role="menu"].action-menu a:active, header nav ul:active li:active a:active {
|
||||
color: var(--numerus--text-color);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
body > nav a[aria-current] {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* menu tauler final */
|
||||
|
||||
main > nav {
|
||||
|
@ -10312,7 +10307,7 @@ div[x-data="snackbar"] div[role="alert"].enter.end, div[x-data="snackbar"] div[r
|
|||
|
||||
@media screen and (max-width: 600px) {
|
||||
|
||||
header, body > nav a {
|
||||
header, header nav a {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,17 @@
|
|||
<body class="filters-visible">
|
||||
<header>
|
||||
<h1><img src="/static/numerus.svg" alt="Numerus" width="261" height="33"></h1>
|
||||
<nav aria-label="{{( pgettext "Main" "title" )}}" data-hx-target="main" data-hx-boost="true">
|
||||
<ul>
|
||||
<li><a{{if requestURIMatches (companyURI "/") }} aria-current="page"{{ end }} href="{{ companyURI "/" }}">{{( pgettext "Dashboard" "nav" )}}</a></li>
|
||||
<li><a{{if requestURIHasPrefix (companyURI "/quotes") }} aria-current="page"{{ end }} href="{{ companyURI "/quotes" }}">{{( pgettext "Quotations" "nav" )}}</a></li>
|
||||
<li><a{{if requestURIHasPrefix (companyURI "/invoices") }} aria-current="page"{{ end }} href="{{ companyURI "/invoices" }}">{{( pgettext "Invoices" "nav" )}}</a></li>
|
||||
<li><a{{if requestURIHasPrefix (companyURI "/expenses") }} aria-current="page"{{ end }} href="{{ companyURI "/expenses" }}">{{( pgettext "Expenses" "nav" )}}</a></li>
|
||||
<li><a{{if requestURIHasPrefix (companyURI "/payments") }} aria-current="page"{{ end }} href="{{ companyURI "/payments" }}">{{( pgettext "Payments" "nav" )}}</a></li>
|
||||
<li><a{{if requestURIHasPrefix (companyURI "/products") }} aria-current="page"{{ end }} href="{{ companyURI "/products" }}">{{( pgettext "Products" "nav" )}}</a></li>
|
||||
<li><a{{if requestURIHasPrefix (companyURI "/contacts") }} aria-current="page"{{ end }} href="{{ companyURI "/contacts" }}">{{( pgettext "Contacts" "nav" )}}</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<details id="profile-menu" class="menu">
|
||||
<summary aria-label="{{( gettext "Profile menu" )}}">
|
||||
<i class="ri-user-6-line ri-3x"></i>
|
||||
|
@ -72,17 +83,6 @@
|
|||
</ul>
|
||||
</details>
|
||||
</header>
|
||||
<nav aria-label="{{( pgettext "Main" "title" )}}" data-hx-target="main" data-hx-boost="true">
|
||||
<ul>
|
||||
<li><a{{if requestURIMatches (companyURI "/") }} aria-current="page"{{ end }} href="{{ companyURI "/" }}">{{( pgettext "Dashboard" "nav" )}}</a></li>
|
||||
<li><a{{if requestURIHasPrefix (companyURI "/quotes") }} aria-current="page"{{ end }} href="{{ companyURI "/quotes" }}">{{( pgettext "Quotations" "nav" )}}</a></li>
|
||||
<li><a{{if requestURIHasPrefix (companyURI "/invoices") }} aria-current="page"{{ end }} href="{{ companyURI "/invoices" }}">{{( pgettext "Invoices" "nav" )}}</a></li>
|
||||
<li><a{{if requestURIHasPrefix (companyURI "/expenses") }} aria-current="page"{{ end }} href="{{ companyURI "/expenses" }}">{{( pgettext "Expenses" "nav" )}}</a></li>
|
||||
<li><a{{if requestURIHasPrefix (companyURI "/payments") }} aria-current="page"{{ end }} href="{{ companyURI "/payments" }}">{{( pgettext "Payments" "nav" )}}</a></li>
|
||||
<li><a{{if requestURIHasPrefix (companyURI "/products") }} aria-current="page"{{ end }} href="{{ companyURI "/products" }}">{{( pgettext "Products" "nav" )}}</a></li>
|
||||
<li><a{{if requestURIHasPrefix (companyURI "/contacts") }} aria-current="page"{{ end }} href="{{ companyURI "/contacts" }}">{{( pgettext "Contacts" "nav" )}}</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<main>
|
||||
{{- template "breadcrumbs" . }}
|
||||
{{- template "content" . }}
|
||||
|
|
Loading…
Reference in New Issue