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.

header.scss 9.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548
  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. /* prevent ugly selection effect on accidental selection */
  16. #header,
  17. #navigation,
  18. #expanddiv {
  19. -webkit-user-select: none;
  20. -moz-user-select: none;
  21. -ms-user-select: none;
  22. }
  23. /* removed until content-focusing issue is fixed */
  24. #skip-to-content a {
  25. position: absolute;
  26. left: -10000px;
  27. top: auto;
  28. width: 1px;
  29. height: 1px;
  30. overflow: hidden;
  31. &:focus {
  32. left: 76px;
  33. top: -9px;
  34. color: $color-primary-text;
  35. width: auto;
  36. height: auto;
  37. }
  38. }
  39. /* HEADERS ------------------------------------------------------------------ */
  40. #body-user #header,
  41. #body-settings #header,
  42. #body-public #header {
  43. display: inline-flex;
  44. position: fixed;
  45. top: 0;
  46. left: 0;
  47. right: 0;
  48. z-index: 2000;
  49. height: 45px;
  50. background-color: $color-primary;
  51. box-sizing: border-box;
  52. justify-content: space-between;
  53. }
  54. /* LOGO and APP NAME -------------------------------------------------------- */
  55. #nextcloud {
  56. padding: 5px;
  57. padding-bottom: 0;
  58. height: 45px;
  59. /* header height */
  60. box-sizing: border-box;
  61. opacity: 1;
  62. &:focus {
  63. opacity: .75;
  64. }
  65. &:hover, &:active {
  66. opacity: 1;
  67. }
  68. }
  69. #header {
  70. /* Header menu */
  71. .menu {
  72. top: 45px;
  73. background-color: $color-main-background;
  74. filter: drop-shadow(0 1px 10px $color-box-shadow);
  75. border-radius: 0 0 3px 3px;
  76. box-sizing: border-box;
  77. z-index: 2000;
  78. position: absolute;
  79. &:not(.popovermenu) {
  80. display: none;
  81. }
  82. /* Dropdown arrow */
  83. &:after {
  84. border: 10px solid transparent;
  85. border-bottom-color: $color-main-background;
  86. bottom: 100%;
  87. content: ' ';
  88. height: 0;
  89. width: 0;
  90. position: absolute;
  91. pointer-events: none;
  92. }
  93. }
  94. .logo {
  95. display: inline-flex;
  96. background-image: url($image-logo);
  97. background-repeat: no-repeat;
  98. background-size: contain;
  99. background-position: center;
  100. width: 256px;
  101. height: 128px;
  102. margin: 0 auto;
  103. &.logo-icon {
  104. width: 62px;
  105. height: 34px;
  106. img {
  107. opacity: 0;
  108. max-width: 100%;
  109. max-height: 200px;
  110. }
  111. }
  112. }
  113. .header-appname-container {
  114. display: none;
  115. padding-top: 22px;
  116. padding-right: 10px;
  117. flex-shrink: 0;
  118. }
  119. /* show caret indicator next to logo to make clear it is tappable */
  120. .icon-caret {
  121. display: inline-block;
  122. width: 12px;
  123. height: 12px;
  124. margin: 0;
  125. margin-top: -21px;
  126. padding: 0;
  127. vertical-align: middle;
  128. }
  129. #header-left, .header-left,
  130. #header-right, .header-right {
  131. display: inline-flex;
  132. align-items: center;
  133. }
  134. #header-left, .header-left {
  135. flex: 0 0;
  136. flex-grow: 1;
  137. white-space: nowrap;
  138. }
  139. #header-right, .header-right {
  140. justify-content: flex-end;
  141. }
  142. }
  143. /* hover effect for app switcher label */
  144. .header-appname-container .header-appname {
  145. opacity: .75;
  146. }
  147. .menutoggle {
  148. .icon-caret {
  149. opacity: .75;
  150. }
  151. &:hover {
  152. .header-appname, .icon-caret {
  153. opacity: 1;
  154. }
  155. }
  156. &:focus {
  157. .header-appname, .icon-caret {
  158. opacity: 1;
  159. }
  160. }
  161. &.active {
  162. .header-appname, .icon-caret {
  163. opacity: 1;
  164. }
  165. }
  166. }
  167. /* show appname next to logo */
  168. .header-appname {
  169. display: inline-block;
  170. position: relative;
  171. color: $color-primary-text;
  172. font-size: 16px;
  173. font-weight: 300;
  174. margin: 0;
  175. margin-top: -26px;
  176. padding: 7px 0 7px 5px;
  177. vertical-align: middle;
  178. }
  179. /* do not show menu toggle on public share links as there is no menu */
  180. #body-public #header .icon-caret {
  181. display: none;
  182. }
  183. /* NAVIGATION --------------------------------------------------------------- */
  184. nav {
  185. display: inline-block;
  186. width: 44px;
  187. height: 44px;
  188. margin-left: -54px;
  189. }
  190. .header-left #navigation {
  191. position: relative;
  192. left: -100%;
  193. width: 160px;
  194. }
  195. .header-left #navigation,
  196. .ui-datepicker,
  197. .ui-timepicker.ui-widget {
  198. background-color: $color-main-background;
  199. filter: drop-shadow(0 1px 10px $color-box-shadow);
  200. &:after {
  201. /* position of dropdown arrow */
  202. left: 47%;
  203. bottom: 100%;
  204. border: solid transparent;
  205. content: ' ';
  206. height: 0;
  207. width: 0;
  208. position: absolute;
  209. pointer-events: none;
  210. border-color: rgba(0, 0, 0, 0);
  211. border-bottom-color: $color-main-background;
  212. border-width: 9px;
  213. margin-left: -9px;
  214. }
  215. }
  216. /* arrow look */
  217. #expanddiv:after {
  218. bottom: 100%;
  219. border: solid transparent;
  220. content: ' ';
  221. height: 0;
  222. width: 0;
  223. position: absolute;
  224. pointer-events: none;
  225. border-color: transparent;
  226. border-bottom-color: $color-main-background;
  227. border-width: 10px;
  228. margin-left: -10px;
  229. }
  230. #navigation {
  231. box-sizing: border-box;
  232. * {
  233. box-sizing: border-box;
  234. }
  235. li {
  236. display: inline-block;
  237. }
  238. a {
  239. position: relative;
  240. display: block;
  241. padding: 10px 12px;
  242. height:40px;
  243. vertical-align: text-bottom;
  244. span {
  245. display: inline-block;
  246. padding-bottom: 0;
  247. padding-left: 10px;
  248. color: $color-main-text;
  249. white-space: nowrap;
  250. overflow: hidden;
  251. text-overflow: ellipsis;
  252. max-width: 110px;
  253. }
  254. svg,
  255. span {
  256. opacity: .7;
  257. }
  258. svg {
  259. margin-bottom: 2px;
  260. }
  261. &:hover svg,
  262. &:focus svg,
  263. &:hover span,
  264. &:focus span {
  265. opacity: 1;
  266. }
  267. &.active {
  268. svg, span {
  269. opacity: 1;
  270. }
  271. }
  272. }
  273. .app-icon {
  274. margin: 0 auto;
  275. padding: 0;
  276. max-height: 32px;
  277. max-width: 32px;
  278. }
  279. }
  280. /* loading feedback for apps */
  281. .app-loading {
  282. .icon-loading-small-dark {
  283. display: inline !important;
  284. position: absolute;
  285. left: 12px;
  286. width: 16px;
  287. height: 16px;
  288. }
  289. .app-icon {
  290. opacity: 0;
  291. }
  292. }
  293. /* Apps management */
  294. #apps {
  295. max-height: calc(100vh - 100px);
  296. overflow: auto;
  297. .in-header {
  298. display: none;
  299. }
  300. ul {
  301. display: flex;
  302. flex-direction: column;
  303. }
  304. }
  305. /* USER MENU -----------------------------------------------------------------*/
  306. #settings {
  307. display: inline-block;
  308. color: rgba($color-primary-text, 0.7);
  309. cursor: pointer;
  310. .icon-loading-small-dark {
  311. display: inline-block;
  312. margin-bottom: -3px;
  313. margin-right: 6px;
  314. background-size: 16px 16px;
  315. }
  316. flex: 0 0 auto;
  317. }
  318. /* User menu on the right */
  319. #expand {
  320. position: relative;
  321. display: flex;
  322. align-items: center;
  323. padding: 7px 20px 6px 10px;
  324. cursor: pointer;
  325. * {
  326. cursor: pointer;
  327. }
  328. img {
  329. opacity: .7;
  330. margin-bottom: -2px;
  331. }
  332. &:hover,
  333. &:focus,
  334. &:active {
  335. color: $color-primary-text;
  336. img,
  337. #expandDisplayName {
  338. opacity: 1;
  339. }
  340. }
  341. /* Profile picture in header */
  342. .avatardiv {
  343. cursor: pointer;
  344. height: 32px;
  345. width: 32px;
  346. img {
  347. opacity: 1;
  348. cursor: pointer;
  349. }
  350. /* do not show display name when profile picture is present */
  351. &.avatardiv-shown + #expandDisplayName {
  352. display: none;
  353. }
  354. }
  355. #expandDisplayName {
  356. padding: 8px;
  357. opacity: .6;
  358. }
  359. }
  360. /* full opacity for gear icon if active */
  361. #body-settings #expandDisplayName {
  362. opacity: 1;
  363. }
  364. /* show triangle below user menu if active */
  365. #body-settings #expand:before {
  366. content: ' ';
  367. height: 0;
  368. width: 0;
  369. position: absolute;
  370. pointer-events: none;
  371. border: 0 solid transparent;
  372. border-bottom-color: $color-main-background;
  373. border-width: 10px;
  374. transform: translateX(-50%);
  375. left: 26px;
  376. bottom: 0;
  377. z-index: 100;
  378. display: block;
  379. }
  380. #expanddiv {
  381. right: 13px;
  382. background: $color-main-background;
  383. &:after {
  384. /* position of dropdown arrow */
  385. right: 13px;
  386. }
  387. a {
  388. display: block;
  389. height: 40px;
  390. color: $color-main-text;
  391. padding: 10px 12px 0;
  392. box-sizing: border-box;
  393. opacity: .7;
  394. img {
  395. margin-bottom: -3px;
  396. margin-right: 6px;
  397. }
  398. &:hover,
  399. &:focus,
  400. &:active,
  401. &.active {
  402. opacity: 1;
  403. box-shadow: inset 2px 0 $color-primary;
  404. }
  405. }
  406. }
  407. #appmenu {
  408. display: inline-block;
  409. width: auto;
  410. clear: both;
  411. li {
  412. float: left;
  413. display: inline-block;
  414. position: relative;
  415. vertical-align: top !important;
  416. height: 45px;
  417. cursor: pointer;
  418. a {
  419. position: relative;
  420. display: inline-block;
  421. margin: 0;
  422. padding: 12px;
  423. height: 21px;
  424. text-align: center;
  425. vertical-align: top !important;
  426. opacity: .6;
  427. }
  428. }
  429. .app-loading .icon-loading-small-dark {
  430. top: 12px;
  431. width: 20px;
  432. height: 20px;
  433. }
  434. li:hover a,
  435. li a:focus,
  436. li a.active {
  437. opacity: 1;
  438. }
  439. li img,
  440. .icon-more-white {
  441. display: inline-block;
  442. width: 20px;
  443. height: 20px;
  444. }
  445. li span {
  446. display: none;
  447. position: absolute;
  448. overflow: visible;
  449. background-color: $color-main-background;
  450. white-space: nowrap;
  451. border: none;
  452. border-radius: $border-radius;
  453. border-top-left-radius: 0;
  454. border-top-right-radius: 0;
  455. margin-top: 0;
  456. color: rgba($color-main-text, .7);
  457. width: auto;
  458. left: 50%;
  459. top: 100%;
  460. transform: translateX(-50%);
  461. padding: 4px 10px;
  462. filter: drop-shadow(0 1px 10px $color-box-shadow);
  463. z-index: 100;
  464. }
  465. li:hover span {
  466. display: inline-block;
  467. }
  468. /* show triangle below active app */
  469. li:hover a:before,
  470. li a.active:before {
  471. content: ' ';
  472. height: 0;
  473. width: 0;
  474. position: absolute;
  475. pointer-events: none;
  476. border: 0 solid transparent;
  477. border-bottom-color: $color-main-background;
  478. border-width: 10px;
  479. transform: translateX(-50%);
  480. left: 50%;
  481. bottom: 0;
  482. display: none;
  483. }
  484. li a.active:before,
  485. li:hover a:before,
  486. li:hover a.active:before {
  487. display: block;
  488. }
  489. li a.active:before {
  490. z-index: 99;
  491. }
  492. li:hover a:before,
  493. li a.active:hover:before {
  494. z-index: 101;
  495. }
  496. &.menu-open li:hover a:before,
  497. &.menu-open li a.active:before,
  498. &.menu-open li:hover span {
  499. display: none !important;
  500. }
  501. li.hidden {
  502. display: none;
  503. }
  504. }