header.css 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  1. @charset "UTF-8";
  2. /**
  3. * @copyright Copyright (c) 2018, John Molakvoæ (skjnldsv@protonmail.com)
  4. *
  5. * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
  6. *
  7. * @license GNU AGPL version 3 or any later version
  8. *
  9. * This program is free software: you can redistribute it and/or modify
  10. * it under the terms of the GNU Affero General Public License as
  11. * published by the Free Software Foundation, either version 3 of the
  12. * License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU Affero General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Affero General Public License
  20. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  21. *
  22. */
  23. /**
  24. * @copyright Copyright (c) 2016, John Molakvoæ <skjnldsv@protonmail.com>
  25. * @copyright Copyright (c) 2016, Julius Haertl <jus@bitgrid.net>
  26. * @copyright Copyright (c) 2016, Lukas Reschke <lukas@statuscode.ch>
  27. * @copyright Copyright (c) 2016, Jos Poortvliet <jos@opensuse.org>
  28. * @copyright Copyright (c) 2016, Erik Pellikka <erik@pellikka.org>
  29. * @copyright Copyright (c) 2016, jowi <sjw@gmx.ch>
  30. * @copyright Copyright (c) 2015, Hendrik Leppelsack <hendrik@leppelsack.de>
  31. * @copyright Copyright (c) 2015, Volker E <volker.e@temporaer.net>
  32. * @copyright Copyright (c) 2014-2017, Jan-Christoph Borchardt <hey@jancborchardt.net>
  33. *
  34. * @license GNU AGPL version 3 or any later version
  35. *
  36. */
  37. /* prevent ugly selection effect on accidental selection */
  38. #header,
  39. #expanddiv {
  40. -webkit-user-select: none;
  41. -moz-user-select: none;
  42. -ms-user-select: none;
  43. }
  44. #header a:not(.button):focus-visible, #header button:not(.button-vue):focus-visible, #header div[role=button]:focus-visible,
  45. #expanddiv a:not(.button):focus-visible,
  46. #expanddiv button:not(.button-vue):focus-visible,
  47. #expanddiv div[role=button]:focus-visible {
  48. box-shadow: inset 0 0 0 2px var(--color-primary-text);
  49. border-radius: var(--border-radius);
  50. outline: none;
  51. }
  52. /* HEADERS ------------------------------------------------------------------ */
  53. #body-user #header,
  54. #body-settings #header,
  55. #body-public #header {
  56. display: inline-flex;
  57. position: absolute;
  58. top: 0;
  59. width: 100%;
  60. z-index: 2000;
  61. height: 50px;
  62. box-sizing: border-box;
  63. justify-content: space-between;
  64. }
  65. /* LOGO and APP NAME -------------------------------------------------------- */
  66. #nextcloud {
  67. padding: 5px 0;
  68. padding-left: 86px;
  69. position: relative;
  70. height: calc(100% - 4px);
  71. box-sizing: border-box;
  72. opacity: 1;
  73. align-items: center;
  74. display: flex;
  75. flex-wrap: wrap;
  76. overflow: hidden;
  77. margin: 2px;
  78. }
  79. #nextcloud:hover, #nextcloud:active {
  80. opacity: 1;
  81. }
  82. #header {
  83. /* Header menu */
  84. /* Right header standard */
  85. }
  86. #header .header-right > div > .menu {
  87. background-color: var(--color-main-background);
  88. filter: drop-shadow(0 1px 5px var(--color-box-shadow));
  89. border-radius: var(--border-radius-large);
  90. box-sizing: border-box;
  91. z-index: 2000;
  92. position: absolute;
  93. max-width: 350px;
  94. min-height: 66px;
  95. max-height: calc(100vh - 50px - 8px);
  96. right: 8px;
  97. top: 50px;
  98. margin: 0;
  99. overflow-y: auto;
  100. /* Dropdown arrow */
  101. /* Use by the settings right menu */
  102. }
  103. #header .header-right > div > .menu:not(.popovermenu) {
  104. display: none;
  105. }
  106. #header .header-right > div > .menu:after {
  107. border: 10px solid transparent;
  108. border-bottom-color: var(--color-main-background);
  109. bottom: 100%;
  110. content: " ";
  111. height: 0;
  112. width: 0;
  113. position: absolute;
  114. pointer-events: none;
  115. right: 10px;
  116. }
  117. #header .header-right > div > .menu > div, #header .header-right > div > .menu > ul {
  118. -webkit-overflow-scrolling: touch;
  119. min-height: 66px;
  120. max-height: calc(100vh - 50px - 8px);
  121. }
  122. #header .header-right > div > .menu.settings-menu > ul {
  123. padding: 4px;
  124. display: flex;
  125. flex-direction: column;
  126. gap: 2px;
  127. }
  128. #header .header-right > div > .menu.settings-menu > ul li a {
  129. border-radius: 6px;
  130. display: inline-flex;
  131. align-items: center;
  132. height: 44px;
  133. color: var(--color-main-text);
  134. padding: 10px 12px;
  135. box-sizing: border-box;
  136. white-space: nowrap;
  137. position: relative;
  138. width: 100%;
  139. }
  140. #header .header-right > div > .menu.settings-menu > ul li a:hover, #header .header-right > div > .menu.settings-menu > ul li a:focus {
  141. background-color: var(--color-background-hover);
  142. }
  143. #header .header-right > div > .menu.settings-menu > ul li a:active, #header .header-right > div > .menu.settings-menu > ul li a.active {
  144. background-color: var(--color-primary-light);
  145. }
  146. #header .header-right > div > .menu.settings-menu > ul li a:focus-visible {
  147. box-shadow: inset 0 0 0 2px var(--color-primary);
  148. outline: none;
  149. }
  150. #header .header-right > div > .menu.settings-menu > ul li a span {
  151. display: inline-block;
  152. padding-bottom: 0;
  153. color: var(--color-main-text);
  154. white-space: nowrap;
  155. overflow: hidden;
  156. text-overflow: ellipsis;
  157. max-width: 110px;
  158. }
  159. #header .header-right > div > .menu.settings-menu > ul li a .icon-loading-small {
  160. margin-right: 10px;
  161. background-size: 16px 16px;
  162. }
  163. #header .header-right > div > .menu.settings-menu > ul li a img,
  164. #header .header-right > div > .menu.settings-menu > ul li a svg {
  165. opacity: 0.7;
  166. margin-right: 10px;
  167. height: 16px;
  168. width: 16px;
  169. filter: var(--background-invert-if-dark);
  170. }
  171. #header .logo {
  172. display: inline-flex;
  173. background-image: var(--image-logoheader, var(--image-logo, url("../img/logo/logo.svg")));
  174. background-repeat: no-repeat;
  175. background-size: contain;
  176. background-position: center;
  177. width: 62px;
  178. position: absolute;
  179. left: 12px;
  180. top: 1px;
  181. bottom: 1px;
  182. }
  183. #header .header-appname-container {
  184. display: none;
  185. padding-right: 10px;
  186. flex-shrink: 0;
  187. }
  188. #header #header-left, #header .header-left,
  189. #header #header-right, #header .header-right {
  190. display: inline-flex;
  191. align-items: center;
  192. }
  193. #header #header-left, #header .header-left {
  194. flex: 1 0;
  195. white-space: nowrap;
  196. min-width: 0;
  197. }
  198. #header #header-right, #header .header-right {
  199. justify-content: flex-end;
  200. flex-shrink: 1;
  201. }
  202. #header .header-right > div,
  203. #header .header-right > form {
  204. height: 100%;
  205. position: relative;
  206. }
  207. #header .header-right > div > .menutoggle,
  208. #header .header-right > form > .menutoggle {
  209. display: flex;
  210. justify-content: center;
  211. align-items: center;
  212. width: 50px;
  213. height: 44px;
  214. cursor: pointer;
  215. opacity: 0.85;
  216. padding: 0;
  217. margin: 2px 0;
  218. }
  219. #header .header-right > div > .menutoggle:focus,
  220. #header .header-right > form > .menutoggle:focus {
  221. opacity: 1;
  222. }
  223. #header .header-right > div > .menutoggle:focus-visible,
  224. #header .header-right > form > .menutoggle:focus-visible {
  225. outline: none;
  226. }
  227. /* hover effect for app switcher label */
  228. .header-appname-container .header-appname {
  229. opacity: 0.75;
  230. }
  231. /* TODO: move into minimal css file for public shared template */
  232. /* only used for public share pages now as we have the app icons when logged in */
  233. .header-appname {
  234. color: var(--color-primary-text);
  235. font-size: 16px;
  236. font-weight: bold;
  237. margin: 0;
  238. padding: 0;
  239. padding-right: 5px;
  240. overflow: hidden;
  241. text-overflow: ellipsis;
  242. flex: 1 1 100%;
  243. }
  244. .header-shared-by {
  245. color: var(--color-primary-text);
  246. position: relative;
  247. font-weight: 300;
  248. font-size: 11px;
  249. line-height: 11px;
  250. overflow: hidden;
  251. text-overflow: ellipsis;
  252. }
  253. /* USER MENU -----------------------------------------------------------------*/
  254. #settings {
  255. display: inline-block;
  256. height: 100%;
  257. cursor: pointer;
  258. flex: 0 0 auto;
  259. /* User menu on the right */
  260. }
  261. #settings #expand {
  262. opacity: 1;
  263. /* override icon opacity */
  264. margin-right: 12px;
  265. /* Profile picture in header */
  266. /* show triangle below user menu if active */
  267. }
  268. #settings #expand:hover, #settings #expand:focus, #settings #expand:active {
  269. color: var(--color-primary-text);
  270. }
  271. #settings #expand:hover #expandDisplayName,
  272. #settings #expand:hover .avatardiv, #settings #expand:focus #expandDisplayName,
  273. #settings #expand:focus .avatardiv, #settings #expand:active #expandDisplayName,
  274. #settings #expand:active .avatardiv {
  275. border-radius: 50%;
  276. border: 2px solid var(--color-primary-text);
  277. margin: -2px;
  278. }
  279. #settings #expand:hover .avatardiv, #settings #expand:focus .avatardiv, #settings #expand:active .avatardiv {
  280. background-color: var(--color-primary-text);
  281. }
  282. #settings #expand:hover #expandDisplayName, #settings #expand:focus #expandDisplayName, #settings #expand:active #expandDisplayName {
  283. opacity: 1;
  284. }
  285. #settings #expand .avatardiv {
  286. cursor: pointer;
  287. height: 32px;
  288. width: 32px;
  289. /* do not show display name when profile picture is present */
  290. }
  291. #settings #expand .avatardiv img {
  292. opacity: 1;
  293. cursor: pointer;
  294. }
  295. #settings #expand .avatardiv.avatardiv-shown + #expandDisplayName {
  296. display: none;
  297. }
  298. #settings #expand #expandDisplayName {
  299. padding: 8px;
  300. opacity: 0.6;
  301. cursor: pointer;
  302. /* full opacity for gear icon if active */
  303. }
  304. #body-settings #settings #expand #expandDisplayName {
  305. opacity: 1;
  306. }
  307. #body-settings #settings #expand:before {
  308. content: " ";
  309. height: 0;
  310. width: 0;
  311. position: absolute;
  312. pointer-events: none;
  313. bottom: 2px;
  314. z-index: 100;
  315. display: block;
  316. width: 10px;
  317. height: 5px;
  318. border-radius: 3px;
  319. background-color: var(--color-primary-text);
  320. }
  321. #settings #expanddiv:after {
  322. right: 22px;
  323. }
  324. /* Skip navigation links – show only on keyboard focus */
  325. #skip-actions {
  326. position: absolute;
  327. overflow: hidden;
  328. z-index: 9999;
  329. top: -999px;
  330. left: 3px;
  331. height: 50px;
  332. padding: 11px;
  333. }
  334. #skip-actions:focus-within {
  335. top: 50px;
  336. }
  337. /* Empty content messages in the header e.g. notifications, contacts menu, … */
  338. header #emptycontent h2,
  339. header .emptycontent h2 {
  340. font-weight: normal;
  341. font-size: 16px;
  342. }
  343. header #emptycontent [class^=icon-],
  344. header #emptycontent [class*=icon-],
  345. header .emptycontent [class^=icon-],
  346. header .emptycontent [class*=icon-] {
  347. background-size: 48px;
  348. height: 48px;
  349. width: 48px;
  350. }
  351. /*# sourceMappingURL=header.css.map */