1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
|
/*!
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
@use 'variables';
/* prevent ugly selection effect on accidental selection */
#header,
#expanddiv {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
#nextcloud:focus-visible,
.app-menu-entry a:focus-visible,
.header-menu button:first-of-type:focus-visible {
outline: none;
&::after {
content: " ";
position: absolute;
inset-block-end: 2px;
transform: translateX(-50%);
width: 12px;
height: 2px;
border-radius: 3px;
background-color: var(--color-background-plain-text);
inset-inline-start: 50%;
opacity: 1;
}
}
.header-end {
// Add some spacing so the last entry looks ok
margin-inline-end: calc(3 * var(--default-grid-baseline));
a:not(.button):focus-visible::after, div[role=button]:focus-visible::after {
bottom: 4px;
}
#expand.menutoggle:focus-visible::after {
inset-inline-start: 40%;
}
}
}
/* HEADERS ------------------------------------------------------------------ */
#body-user #header,
#body-settings #header,
#body-public #header {
display: inline-flex;
position: absolute;
top: 0;
width: 100%;
z-index: 2000;
height: variables.$header-height;
box-sizing: border-box;
justify-content: space-between;
}
/* LOGO and APP NAME -------------------------------------------------------- */
#nextcloud {
padding: 5px 0;
padding-inline-start: 86px; // logo width + 2* pa
position: relative;
height: calc(100% - 4px);
box-sizing: border-box;
opacity: 1;
align-items: center;
display: flex;
flex-wrap: wrap;
overflow: hidden;
margin: 2px;
&:hover, &:active {
opacity: 1;
}
}
@mixin header-menu-height() {
min-height: calc(44px * 1.5); // show at least 1.5 entries
max-height: calc(100vh - #{variables.$header-height} - 8px);
}
#header {
/* Header menu */
$header-menu-entry-height: 44px;
.header-end > div > .menu {
background-color: var(--color-main-background);
filter: drop-shadow(0 1px 5px var(--color-box-shadow));
border-radius: var(--border-radius-large);
box-sizing: border-box;
z-index: 2000;
position: absolute;
max-width: 350px;
@include header-menu-height();
inset-inline-end: 8px; // relative to parent
top: variables.$header-height;
margin: 0;
overflow-y: auto;
&:not(.popovermenu) {
display: none;
}
/* Dropdown arrow */
&:after {
border: 10px solid transparent;
border-bottom-color: var(--color-main-background);
bottom: 100%;
content: ' ';
height: 0;
width: 0;
position: absolute;
pointer-events: none;
inset-inline-end: 10px;
}
& > div,
& > ul {
-webkit-overflow-scrolling: touch;
@include header-menu-height();
}
}
.logo {
display: inline-flex;
background-image: var(--image-logoheader, var(--image-logo, url('../img/logo/logo.svg')));
background-repeat: no-repeat;
background-size: contain;
background-position: center;
width: 62px;
position: absolute;
inset-inline-start: 12px;
top: 1px;
bottom: 1px;
// Invert if not customized and background is bright
filter: var(--image-logoheader-custom, var(--background-image-invert-if-bright));
}
.header-appname-container {
display: none;
padding-inline-end: 10px;
flex-shrink: 0;
}
#header-start, .header-start,
#header-end, .header-end {
display: inline-flex;
align-items: center;
}
#header-start, .header-start {
flex: 1 0;
white-space: nowrap;
min-width: 0;
}
#header-end, .header-end {
justify-content: flex-end;
flex-shrink: 1;
}
/* Right header standard */
.header-end {
> .header-menu__trigger img {
filter: var(--background-image-invert-if-bright);
}
> div,
> form {
height: 100%;
position: relative;
> .menutoggle {
display: flex;
justify-content: center;
align-items: center;
width: variables.$header-height;
height: 44px;
cursor: pointer;
opacity: 0.85;
padding: 0;
margin: 2px 0;
&:focus {
opacity: 1;
}
&:focus-visible {
outline: none;
}
}
}
}
}
/* hover effect for app switcher label */
.header-appname-container .header-appname {
opacity: .75;
}
/* TODO: move into minimal css file for public shared template */
/* only used for public share pages now as we have the app icons when logged in */
.header-appname {
color: var(--color-background-plain-text);
font-size: 16px;
font-weight: bold;
margin: 0;
padding: 0;
padding-inline-end: 5px;
overflow: hidden;
text-overflow: ellipsis;
// Take full width to push the header-shared-by bellow (if any)
flex: 1 1 100%;
}
.header-info {
display: flex;
flex-direction: column;
overflow: hidden;
}
.header-title {
overflow: hidden;
text-overflow: ellipsis;
}
.header-shared-by {
color: var(--color-background-plain-text);
position: relative;
font-weight: 300;
font-size: 11px;
line-height: 11px;
overflow: hidden;
text-overflow: ellipsis;
}
/* Skip navigation links – show only on keyboard focus */
#skip-actions {
position: absolute;
overflow: hidden;
z-index: 9999;
top: -999px;
inset-inline-start: 3px;
padding: 11px;
display: flex;
flex-wrap: wrap;
gap: 11px;
&:focus-within {
top: variables.$header-height;
}
}
/* Empty content messages in the header e.g. notifications, contacts menu, … */
header #emptycontent,
header .emptycontent {
h2 {
font-weight: normal;
font-size: 16px;
}
[class^='icon-'],
[class*='icon-'] {
background-size: 48px;
height: 48px;
width: 48px;
}
}
|