Skip to content

Commit 384a1bd

Browse files
fix: make top nav bar right elements within a nav
Signed-off-by: kristian.zendato <kristian.zendato@nextcloud.com>
1 parent 4fcbb98 commit 384a1bd

4 files changed

Lines changed: 33 additions & 8 deletions

File tree

core/css/header.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,21 @@
147147
flex: 1 0;
148148
}
149149
}
150+
151+
// List wrapper for notifications / contacts / account (and injected entries)
152+
&__items {
153+
display: inline-flex;
154+
align-items: center;
155+
justify-content: flex-end;
156+
list-style: none;
157+
margin: 0;
158+
padding: 0;
159+
}
160+
161+
&__item {
162+
display: flex;
163+
align-items: center;
164+
}
150165
}
151166

152167
// Public layout related headers

core/css/mobile.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,16 @@
134134
}
135135

136136
@media only screen and (max-width: 480px) {
137-
#header .header-end > div > .menu {
137+
#header .header-end .menu {
138138
max-width: calc(100vw - 10px);
139139
position: fixed;
140140
&::after {
141141
display: none !important;
142142
}
143143
}
144144
/* Arrow directly child of menutoggle */
145-
#header .header-end > div {
145+
#header .header-end > div,
146+
#header .header-end__item > div {
146147
&.openedMenu {
147148
&::after {
148149
display: block;

core/src/components/UnifiedSearch/UnifiedSearchLocalSearchBar.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ function clearAndCloseSearch() {
162162
inset-inline: 0;
163163
}
164164
// Hide all other entries, especially the user menu as it might leak pixels
165-
:global(.header-end:has(.local-unified-search--open) > :not(.unified-search-menu)) {
165+
:global(.header-end:has(.local-unified-search--open) > :not(.unified-search-menu)),
166+
:global(.header-end:has(.local-unified-search--open) .header-end__item:not(:has(.local-unified-search--open))) {
166167
display: none;
167168
}
168169
}

core/templates/layout.user.php

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,19 @@
7575
<div class="header-center">
7676
<div id="unified-search"></div>
7777
</div>
78-
<div class="header-end">
79-
<div id="notifications"></div>
80-
<div id="contactsmenu"></div>
81-
<div id="user-menu"></div>
82-
</div>
78+
<nav class="header-end" aria-label="<?php p($l->t('User menu')); ?>">
79+
<ul class="header-end__items">
80+
<li class="header-end__item">
81+
<div id="notifications"></div>
82+
</li>
83+
<li class="header-end__item">
84+
<div id="contactsmenu"></div>
85+
</li>
86+
<li class="header-end__item">
87+
<div id="user-menu"></div>
88+
</li>
89+
</ul>
90+
</nav>
8391
</header>
8492

8593
<div id="content" class="app-<?php p($_['appid']) ?>">

0 commit comments

Comments
 (0)