You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686
  1. /**
  2. * @copyright Copyright (c) 2016, John Molakvoæ <skjnldsv@protonmail.com>
  3. * @copyright Copyright (c) 2016, Julius Haertl <jus@bitgrid.net>
  4. * @copyright Copyright (c) 2016, Lukas Reschke <lukas@statuscode.ch>
  5. * @copyright Copyright (c) 2016, Jos Poortvliet <jos@opensuse.org>
  6. * @copyright Copyright (c) 2016, Erik Pellikka <erik@pellikka.org>
  7. * @copyright Copyright (c) 2016, jowi <sjw@gmx.ch>
  8. * @copyright Copyright (c) 2015, Hendrik Leppelsack <hendrik@leppelsack.de>
  9. * @copyright Copyright (c) 2015, Volker E <volker.e@temporaer.net>
  10. * @copyright Copyright (c) 2014-2017, Jan-Christoph Borchardt <hey@jancborchardt.net>
  11. *
  12. * @license GNU AGPL version 3 or any later version
  13. *
  14. */
  15. @use 'variables';
  16. /* prevent ugly selection effect on accidental selection */
  17. #header,
  18. #navigation,
  19. #expanddiv {
  20. -webkit-user-select: none;
  21. -moz-user-select: none;
  22. -ms-user-select: none;
  23. a:focus-visible, button:not(.button-vue):focus-visible, div[role="button"]:focus-visible {
  24. box-shadow: inset 0 0 0 2px var(--color-primary-text);
  25. border-radius: var(--border-radius);
  26. outline: none;
  27. }
  28. }
  29. /* removed until content-focusing issue is fixed */
  30. #skip-to-content a {
  31. position: absolute;
  32. left: -10000px;
  33. top: auto;
  34. width: 1px;
  35. height: 1px;
  36. overflow: hidden;
  37. &:focus {
  38. left: 76px;
  39. top: -9px;
  40. color: var(--color-primary-text);
  41. width: auto;
  42. height: auto;
  43. }
  44. }
  45. /* HEADERS ------------------------------------------------------------------ */
  46. #body-user #header,
  47. #body-settings #header,
  48. #body-public #header {
  49. display: inline-flex;
  50. position: fixed;
  51. top: 0;
  52. width: 100%;
  53. z-index: 2000;
  54. height: variables.$header-height;
  55. background-color: var(--color-primary);
  56. background-image: var(--gradient-primary-background);
  57. box-sizing: border-box;
  58. justify-content: space-between;
  59. }
  60. /* LOGO and APP NAME -------------------------------------------------------- */
  61. #nextcloud {
  62. padding: 5px 0;
  63. padding-left: 86px; // logo width + 2* pa
  64. position: relative;
  65. height: calc(100% - 4px);
  66. box-sizing: border-box;
  67. opacity: 1;
  68. align-items: center;
  69. display: flex;
  70. flex-wrap: wrap;
  71. overflow: hidden;
  72. margin: 2px;
  73. &:hover, &:active {
  74. opacity: 1;
  75. }
  76. }
  77. @mixin header-menu-height() {
  78. min-height: calc(44px * 1.5); // show at least 1.5 entries
  79. max-height: calc(100vh - #{variables.$header-height} * 4);
  80. }
  81. #header {
  82. /* Header menu */
  83. $header-menu-entry-height: 44px;
  84. .header-left > nav > .menu,
  85. .header-right > div > .menu {
  86. background-color: var(--color-main-background);
  87. filter: drop-shadow(0 1px 5px var(--color-box-shadow));
  88. border-radius: 0 0 var(--border-radius) var(--border-radius);
  89. box-sizing: border-box;
  90. z-index: 2000;
  91. position: absolute;
  92. max-width: 350px;
  93. @include header-menu-height();
  94. right: 5px; // relative to parent
  95. top: variables.$header-height;
  96. margin: 0;
  97. &:not(.popovermenu) {
  98. display: none;
  99. }
  100. /* Dropdown arrow */
  101. &:after {
  102. border: 10px solid transparent;
  103. border-bottom-color: var(--color-main-background);
  104. bottom: 100%;
  105. content: ' ';
  106. height: 0;
  107. width: 0;
  108. position: absolute;
  109. pointer-events: none;
  110. right: 10px;
  111. }
  112. #apps > ul,
  113. & > div,
  114. & > ul {
  115. overflow-y: auto;
  116. -webkit-overflow-scrolling: touch;
  117. @include header-menu-height();
  118. }
  119. /* Use by the apps menu and the settings right menu */
  120. #apps > ul,
  121. &.settings-menu > ul {
  122. li {
  123. a {
  124. display: inline-flex;
  125. align-items: center;
  126. height: $header-menu-entry-height;
  127. color: var(--color-main-text);
  128. padding: 10px 12px;
  129. box-sizing: border-box;
  130. white-space: nowrap;
  131. position: relative;
  132. width: 100%;
  133. &:hover,
  134. &:focus {
  135. background-color: var(--color-background-hover);
  136. }
  137. &:active,
  138. &.active {
  139. background-color: var(--color-primary-light);
  140. }
  141. &:focus-visible {
  142. box-shadow: inset 0 0 0 2px var(--color-primary);
  143. outline: none;
  144. }
  145. span {
  146. display: inline-block;
  147. padding-bottom: 0;
  148. color: var(--color-main-text);
  149. white-space: nowrap;
  150. overflow: hidden;
  151. text-overflow: ellipsis;
  152. max-width: 110px;
  153. }
  154. .icon-loading-small {
  155. margin-right: 10px;
  156. background-size: 16px 16px;
  157. }
  158. img,
  159. svg {
  160. opacity: .7;
  161. margin-right: 10px;
  162. height: 16px;
  163. width: 16px;
  164. filter: var(--background-invert-if-dark);
  165. }
  166. }
  167. }
  168. }
  169. }
  170. .logo {
  171. display: inline-flex;
  172. background-image: var(--image-logoheader, var(--image-logo, url('../img/logo/logo.svg')));
  173. background-repeat: no-repeat;
  174. background-size: contain;
  175. background-position: center;
  176. width: 62px;
  177. position: absolute;
  178. left: 12px;
  179. top: 1px;
  180. bottom: 1px;
  181. // Invert non-custom logo if primary is too bright
  182. filter: var(--image-logoheader-custom, var(--primary-invert-if-bright))
  183. }
  184. .header-appname-container {
  185. display: none;
  186. padding-right: 10px;
  187. flex-shrink: 0;
  188. }
  189. /* show caret indicator next to logo to make clear it is tappable */
  190. .icon-caret {
  191. display: inline-block;
  192. width: 12px;
  193. height: 12px;
  194. margin: 0;
  195. margin-top: -21px;
  196. padding: 0;
  197. vertical-align: middle;
  198. }
  199. #header-left, .header-left,
  200. #header-right, .header-right {
  201. display: inline-flex;
  202. align-items: center;
  203. }
  204. #header-left, .header-left {
  205. flex: 1 0;
  206. white-space: nowrap;
  207. min-width: 0;
  208. }
  209. #header-right, .header-right {
  210. justify-content: flex-end;
  211. flex-shrink: 1;
  212. }
  213. /* Right header standard */
  214. .header-right {
  215. > div,
  216. > form {
  217. height: 100%;
  218. position: relative;
  219. > .menutoggle {
  220. display: flex;
  221. justify-content: center;
  222. align-items: center;
  223. width: variables.$header-height;
  224. height: 44px;
  225. cursor: pointer;
  226. opacity: 0.85;
  227. padding: 0;
  228. margin: 2px 0;
  229. &:focus {
  230. opacity: 1;
  231. }
  232. &:focus-visible {
  233. outline: none;
  234. }
  235. }
  236. }
  237. }
  238. }
  239. /* hover effect for app switcher label */
  240. .header-appname-container .header-appname {
  241. opacity: .75;
  242. }
  243. .menutoggle {
  244. .icon-caret {
  245. opacity: .75;
  246. }
  247. &:hover {
  248. .header-appname, .icon-caret {
  249. opacity: 1;
  250. }
  251. }
  252. &:focus {
  253. .header-appname, .icon-caret {
  254. opacity: 1;
  255. }
  256. }
  257. &.active {
  258. .header-appname, .icon-caret {
  259. opacity: 1;
  260. }
  261. }
  262. }
  263. /* TODO: move into minimal css file for public shared template */
  264. /* only used for public share pages now as we have the app icons when logged in */
  265. .header-appname {
  266. color: var(--color-primary-text);
  267. font-size: 16px;
  268. font-weight: bold;
  269. margin: 0;
  270. padding: 0;
  271. padding-right: 5px;
  272. overflow: hidden;
  273. text-overflow: ellipsis;
  274. // Take full width to push the header-shared-by bellow (if any)
  275. flex: 1 1 100%;
  276. }
  277. .header-shared-by {
  278. color: var(--color-primary-text);
  279. position: relative;
  280. font-weight: 300;
  281. font-size: 11px;
  282. line-height: 11px;
  283. overflow: hidden;
  284. text-overflow: ellipsis;
  285. }
  286. /* do not show menu toggle on public share links as there is no menu */
  287. #body-public #header .icon-caret {
  288. display: none;
  289. }
  290. /* NAVIGATION --------------------------------------------------------------- */
  291. nav[role='navigation'] {
  292. display: inline-block;
  293. width: variables.$header-height;
  294. height: variables.$header-height;
  295. margin-left: -#{variables.$header-height};
  296. position: relative;
  297. }
  298. #header .header-left > nav > #navigation {
  299. position: relative;
  300. left: 25px; /* half the togglemenu */
  301. transform: translateX(-50%);
  302. width: 160px;
  303. }
  304. #header .header-left > nav > #navigation,
  305. .ui-datepicker,
  306. .ui-timepicker.ui-widget {
  307. background-color: var(--color-main-background);
  308. filter: drop-shadow(0 1px 10px var(--color-box-shadow));
  309. &:after {
  310. /* position of dropdown arrow */
  311. left: 50%;
  312. bottom: 100%;
  313. border: solid transparent;
  314. content: ' ';
  315. height: 0;
  316. width: 0;
  317. position: absolute;
  318. pointer-events: none;
  319. border-color: rgba(0, 0, 0, 0);
  320. border-bottom-color: var(--color-main-background);
  321. border-width: 10px;
  322. margin-left: -10px; /* border width */
  323. }
  324. }
  325. #navigation {
  326. box-sizing: border-box;
  327. .in-header {
  328. display: none;
  329. }
  330. }
  331. /* USER MENU -----------------------------------------------------------------*/
  332. #settings {
  333. display: inline-block;
  334. height: 100%;
  335. cursor: pointer;
  336. flex: 0 0 auto;
  337. /* User menu on the right */
  338. #expand {
  339. opacity: 1; /* override icon opacity */
  340. margin-right: 12px;
  341. &:hover,
  342. &:focus,
  343. &:active {
  344. color: var(--color-primary-text);
  345. #expandDisplayName,
  346. .avatardiv{
  347. border-radius: 50%;
  348. border: 2px solid var(--color-primary-text);
  349. margin: -2px;
  350. }
  351. .avatardiv{
  352. background-color: var(--color-primary-text);
  353. }
  354. #expandDisplayName {
  355. opacity: 1;
  356. }
  357. }
  358. /* Profile picture in header */
  359. .avatardiv {
  360. cursor: pointer;
  361. height: 32px;
  362. width: 32px;
  363. img {
  364. opacity: 1;
  365. cursor: pointer;
  366. }
  367. /* do not show display name when profile picture is present */
  368. &.avatardiv-shown + #expandDisplayName {
  369. display: none;
  370. }
  371. }
  372. #expandDisplayName {
  373. padding: 8px;
  374. opacity: .6;
  375. cursor: pointer;
  376. /* full opacity for gear icon if active */
  377. #body-settings & {
  378. opacity: 1;
  379. }
  380. }
  381. /* show triangle below user menu if active */
  382. #body-settings &:before {
  383. content: ' ';
  384. height: 0;
  385. width: 0;
  386. position: absolute;
  387. pointer-events: none;
  388. border: 0 solid transparent;
  389. border-bottom-color: var(--color-main-background);
  390. border-width: 10px;
  391. bottom: 0;
  392. z-index: 100;
  393. display: block;
  394. }
  395. }
  396. #expanddiv:after {
  397. right: 22px;
  398. }
  399. }
  400. /* Apps menu */
  401. #appmenu {
  402. display: inline-flex;
  403. min-width: variables.$header-height;
  404. z-index: 2;
  405. li {
  406. position: relative;
  407. cursor: pointer;
  408. padding: 0 2px;
  409. display: flex;
  410. justify-content: center;
  411. a {
  412. position: relative;
  413. display: flex;
  414. margin: 0;
  415. height: calc(variables.$header-height - 6px);
  416. width: variables.$header-height;
  417. align-items: center;
  418. justify-content: center;
  419. opacity: .85;
  420. // Make sure most app names don’t ellipsize
  421. letter-spacing: -0.5px;
  422. font-size: 12px;
  423. margin: 2px;
  424. }
  425. /* focused app visual feedback */
  426. &:hover a,
  427. a:focus,
  428. a.active {
  429. opacity: 1;
  430. font-weight: bold;
  431. }
  432. // Text size back to normal for hover/focus
  433. &:hover a,
  434. a:focus {
  435. font-size: 14px;
  436. }
  437. &:hover a + span,
  438. a:focus + span,
  439. &:hover span,
  440. &:focus span,
  441. a:focus span,
  442. a.active span {
  443. display: inline-block;
  444. text-overflow: initial;
  445. width: auto;
  446. overflow: hidden;
  447. padding: 0 5px;
  448. z-index: 2;
  449. }
  450. /* hidden apps menu */
  451. img,
  452. .icon-more-white {
  453. display: inline-block;
  454. width: 20px;
  455. height: 20px;
  456. }
  457. /* App title */
  458. span {
  459. opacity: 0;
  460. position: absolute;
  461. color: var(--color-primary-text);
  462. bottom: 2px;
  463. width: 100%;
  464. text-align: center;
  465. overflow: hidden;
  466. text-overflow: ellipsis;
  467. transition: all var(--animation-quick) ease;
  468. pointer-events: none;
  469. }
  470. /* Set up transitions for showing app titles on hover */
  471. /* App icon */
  472. svg,
  473. .icon-more-white {
  474. transition: transform var(--animation-quick) ease;
  475. // If the primary is too bright, invert the app icons
  476. filter: var(--primary-invert-if-bright);
  477. }
  478. /* Triangle */
  479. a::before {
  480. transition: border var(--animation-quick) ease;
  481. }
  482. }
  483. /* Show all app titles on hovering app menu area */
  484. &:hover {
  485. li {
  486. /* Move up app icon */
  487. svg,
  488. .icon-more,
  489. .icon-more-white,
  490. .icon-loading-small,
  491. .icon-loading-small-dark {
  492. transform: translateY(-7px);
  493. }
  494. /* Show app title */
  495. span {
  496. opacity: .6;
  497. bottom: 2px;
  498. z-index: -1; /* fix clickability issue - otherwise we need to move the span into the link */
  499. }
  500. /* Prominent app title for current and hovered/focused app */
  501. &:hover span,
  502. &:focus span,
  503. .active + span {
  504. opacity: 1;
  505. }
  506. /* Smaller triangle because of limited space */
  507. a::before {
  508. border-width: 5px;
  509. }
  510. }
  511. }
  512. /* Also show app title on focusing single entry (showing all on focus is only possible with CSS4 and parent selectors) */
  513. li a:focus {
  514. /* Move up app icon */
  515. svg,
  516. .icon-more,
  517. .icon-more-white,
  518. .icon-loading-small,
  519. .icon-loading-small-dark {
  520. transform: translateY(-7px);
  521. }
  522. /* Show app title */
  523. & + span,
  524. span {
  525. opacity: 1;
  526. bottom: 2px;
  527. }
  528. /* Smaller triangle because of limited space */
  529. &::before {
  530. border-width: 5px;
  531. }
  532. }
  533. /* show triangle below active app */
  534. li a::before {
  535. content: ' ';
  536. height: 0;
  537. width: 0;
  538. position: absolute;
  539. pointer-events: none;
  540. border: 0 solid transparent;
  541. border-bottom-color: var(--color-main-background);
  542. border-width: 10px;
  543. transform: translateX(-50%);
  544. left: 50%;
  545. bottom: -5px;
  546. display: none;
  547. }
  548. /* triangle focus feedback */
  549. li a.active::before,
  550. li:hover a::before,
  551. li:hover a.active::before,
  552. li a:focus::before {
  553. display: block;
  554. }
  555. li a.active::before {
  556. z-index: 99;
  557. }
  558. li:hover a::before,
  559. li a.active:hover::before,
  560. li a:focus::before {
  561. z-index: 101;
  562. }
  563. li.hidden {
  564. display: none;
  565. }
  566. #more-apps {
  567. z-index: 3;
  568. }
  569. }
  570. .unread-counter {
  571. display: none;
  572. }
  573. #apps .app-icon-notification,
  574. #appmenu .app-icon-notification {
  575. fill: var(--color-error);
  576. }
  577. #apps svg:not(.has-unread),
  578. #appmenu svg:not(.has-unread) {
  579. .app-icon-notification-mask {
  580. display: none;
  581. }
  582. .app-icon-notification {
  583. display: none;
  584. }
  585. }
  586. /* Skip navigation links – show only on keyboard focus */
  587. .skip-navigation {
  588. padding: 11px;
  589. position: absolute;
  590. overflow: hidden;
  591. z-index: 9999;
  592. top: -999px;
  593. left: 3px;
  594. /* Force primary color, otherwise too light focused color */
  595. background: var(--color-primary) !important;
  596. &.skip-content {
  597. left: variables.$navigation-width;
  598. margin-left: 3px;
  599. }
  600. &:focus,
  601. &:active {
  602. top: variables.$header-height;
  603. }
  604. }
  605. /* Empty content messages in the header e.g. notifications, contacts menu, … */
  606. header #emptycontent,
  607. header .emptycontent {
  608. h2 {
  609. font-weight: normal;
  610. font-size: 16px;
  611. }
  612. [class^='icon-'],
  613. [class*='icon-'] {
  614. background-size: 48px;
  615. height: 48px;
  616. width: 48px;
  617. }
  618. }