1
0

header.scss 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  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, Jan-Christoph Borchardt <hey@jancborchardt.net>
  10. * @copyright Copyright (c) 2015, Volker E <volker.e@temporaer.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. /* Dropdown menu arrow */
  23. &.menu:after,
  24. .menu:after {
  25. border: 10px solid transparent;
  26. border-color: transparent;
  27. border-bottom-color: #fff;
  28. bottom: 100%;
  29. content: ' ';
  30. height: 0;
  31. width: 0;
  32. position: absolute;
  33. pointer-events: none;
  34. margin-left: -10px;
  35. }
  36. }
  37. /* removed until content-focusing issue is fixed */
  38. #skip-to-content a {
  39. position: absolute;
  40. left: -10000px;
  41. top: auto;
  42. width: 1px;
  43. height: 1px;
  44. overflow: hidden;
  45. &:focus {
  46. left: 76px;
  47. top: -9px;
  48. color: #fff;
  49. width: auto;
  50. height: auto;
  51. }
  52. }
  53. /* HEADERS ------------------------------------------------------------------ */
  54. #body-user #header,
  55. #body-settings #header,
  56. #body-public #header {
  57. display: inline-flex;
  58. position: fixed;
  59. top: 0;
  60. left: 0;
  61. right: 0;
  62. z-index: 2000;
  63. height: 45px;
  64. background-color: #0082c9;
  65. box-sizing: border-box;
  66. justify-content: space-between;
  67. }
  68. /* LOGO and APP NAME -------------------------------------------------------- */
  69. #nextcloud {
  70. padding: 5px;
  71. padding-bottom: 0;
  72. height: 45px;
  73. /* header height */
  74. box-sizing: border-box;
  75. -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)';
  76. opacity: 1;
  77. &:focus {
  78. -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=75)';
  79. opacity: .75;
  80. }
  81. &:hover, &:active {
  82. -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)';
  83. opacity: 1;
  84. }
  85. }
  86. #header {
  87. .logo {
  88. background-image: url('../img/logo-icon.svg?v=1');
  89. background-repeat: no-repeat;
  90. background-size: 175px;
  91. background-position: center;
  92. width: 252px;
  93. height: 120px;
  94. margin: 0 auto;
  95. }
  96. .logo-icon {
  97. /* display logo so appname can be shown next to it */
  98. display: inline-block;
  99. background-image: url('../img/logo-icon.svg?v=1');
  100. background-repeat: no-repeat;
  101. background-position: center center;
  102. width: 62px;
  103. height: 34px;
  104. }
  105. .header-appname-container {
  106. display: inline-block;
  107. padding-top: 22px;
  108. padding-right: 10px;
  109. flex-shrink: 0;
  110. }
  111. /* show caret indicator next to logo to make clear it is tappable */
  112. .icon-caret {
  113. display: inline-block;
  114. width: 12px;
  115. height: 12px;
  116. margin: 0;
  117. margin-top: -21px;
  118. padding: 0;
  119. vertical-align: middle;
  120. }
  121. #header-left,
  122. #header-right {
  123. display: inline-flex;
  124. align-items: center;
  125. }
  126. #header-left {
  127. flex: 0 0;
  128. flex-grow: 1;
  129. }
  130. #header-right {
  131. justify-content: flex-end;
  132. }
  133. }
  134. /* hover effect for app switcher label */
  135. .header-appname-container .header-appname {
  136. -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=75)';
  137. opacity: .75;
  138. }
  139. .menutoggle {
  140. .icon-caret {
  141. -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=75)';
  142. opacity: .75;
  143. }
  144. &:hover {
  145. .header-appname, .icon-caret {
  146. -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)';
  147. opacity: 1;
  148. }
  149. }
  150. &:focus {
  151. .header-appname, .icon-caret {
  152. -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)';
  153. opacity: 1;
  154. }
  155. }
  156. &.active {
  157. .header-appname, .icon-caret {
  158. -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)';
  159. opacity: 1;
  160. }
  161. }
  162. }
  163. /* show appname next to logo */
  164. .header-appname {
  165. display: inline-block;
  166. position: relative;
  167. color: #fff;
  168. font-size: 16px;
  169. font-weight: 300;
  170. margin: 0;
  171. margin-top: -27px;
  172. padding: 7px 0 7px 5px;
  173. vertical-align: middle;
  174. }
  175. /* do not show menu toggle on public share links as there is no menu */
  176. #body-public #header .icon-caret {
  177. display: none;
  178. }
  179. /* NAVIGATION --------------------------------------------------------------- */
  180. #navigation {
  181. position: fixed;
  182. top: 45px;
  183. left: 10px;
  184. width: 265px;
  185. max-height: 85%;
  186. margin-top: 0;
  187. padding-bottom: 10px;
  188. background-color: rgba(255, 255, 255, 0.97);
  189. box-shadow: 0 1px 10px rgba(150, 150, 150, 0.75);
  190. border-radius: 3px;
  191. border-top-left-radius: 0;
  192. border-top-right-radius: 0;
  193. display: none;
  194. box-sizing: border-box;
  195. z-index: 2000;
  196. &:after {
  197. left: 47%;
  198. }
  199. * {
  200. box-sizing: border-box;
  201. }
  202. li {
  203. display: inline-block;
  204. }
  205. a {
  206. position: relative;
  207. width: 80px;
  208. height: 80px;
  209. display: inline-block;
  210. text-align: center;
  211. padding: 20px 0;
  212. span {
  213. display: inline-block;
  214. font-size: 13px;
  215. padding-bottom: 0;
  216. padding-left: 0;
  217. width: 80px;
  218. text-align: center;
  219. color: #000;
  220. white-space: nowrap;
  221. overflow: hidden;
  222. text-overflow: ellipsis;
  223. }
  224. svg,
  225. span {
  226. -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=50)';
  227. opacity: .5;
  228. }
  229. &:hover svg,
  230. &:focus svg,
  231. &:hover span,
  232. &:focus span {
  233. -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)';
  234. opacity: 1;
  235. }
  236. &.active {
  237. svg, span {
  238. -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)';
  239. opacity: 1;
  240. }
  241. }
  242. }
  243. .app-icon {
  244. margin: 0 auto;
  245. padding: 0;
  246. max-height: 32px;
  247. max-width: 32px;
  248. }
  249. /* loading feedback for apps */
  250. .app-loading {
  251. .icon-loading-dark {
  252. display: inline !important;
  253. position: absolute;
  254. top: 20px;
  255. left: 24px;
  256. width: 32px;
  257. height: 32px;
  258. }
  259. .app-icon {
  260. -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=0)';
  261. opacity: 0;
  262. }
  263. }
  264. }
  265. /* Apps management */
  266. #apps-management {
  267. min-height: initial;
  268. height: initial;
  269. margin: 0;
  270. a {
  271. svg,
  272. span {
  273. -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=30)';
  274. opacity: .3;
  275. }
  276. /* icon opacity and hover effect */
  277. &:hover svg,
  278. &:focus svg,
  279. &.active svg,
  280. &:hover span,
  281. &:focus span,
  282. &.active span {
  283. -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)';
  284. opacity: 1;
  285. }
  286. }
  287. }
  288. #apps {
  289. max-height: calc(100vh - 100px);
  290. overflow: auto;
  291. }
  292. /* USER MENU -----------------------------------------------------------------*/
  293. #settings {
  294. display: inline-block;
  295. color: #ddd;
  296. cursor: pointer;
  297. .icon-loading-small-dark {
  298. display: inline-block;
  299. margin-bottom: -3px;
  300. margin-right: 6px;
  301. background-size: 16px 16px;
  302. }
  303. flex: 0 0 auto;
  304. }
  305. /* User menu on the right */
  306. #expand {
  307. display: flex;
  308. align-items: center;
  309. padding: 7px 30px 6px 10px;
  310. cursor: pointer;
  311. * {
  312. cursor: pointer;
  313. }
  314. img {
  315. -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=70)';
  316. opacity: .7;
  317. margin-bottom: -2px;
  318. }
  319. &:hover,
  320. &:focus,
  321. &:active {
  322. color: #fff;
  323. img {
  324. -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)';
  325. opacity: 1;
  326. }
  327. }
  328. .icon-caret {
  329. margin-top: 0;
  330. }
  331. /* Profile picture in header */
  332. .avatardiv {
  333. margin-right: 8px;
  334. cursor: pointer;
  335. height: 32px;
  336. width: 32px;
  337. img {
  338. opacity: 1;
  339. cursor: pointer;
  340. }
  341. /* do not show display name when profile picture is present */
  342. &.avatardiv-shown + #expandDisplayName {
  343. display: none;
  344. }
  345. }
  346. }
  347. #expanddiv {
  348. position: absolute;
  349. right: 13px;
  350. top: 45px;
  351. z-index: 2000;
  352. display: none;
  353. background: rgb(255, 255, 255);
  354. box-shadow: 0 1px 10px rgba(150, 150, 150, 0.75);
  355. border-radius: 3px;
  356. border-top-left-radius: 0;
  357. border-top-right-radius: 0;
  358. box-sizing: border-box;
  359. &:after {
  360. /* position of dropdown arrow */
  361. right: 15px;
  362. }
  363. a {
  364. display: block;
  365. height: 40px;
  366. color: #000;
  367. padding: 10px 12px 0;
  368. -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=50)';
  369. opacity: .5;
  370. box-sizing: border-box;
  371. img {
  372. margin-bottom: -3px;
  373. margin-right: 6px;
  374. }
  375. &:hover,
  376. &:focus,
  377. &:active,
  378. &.active {
  379. -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)';
  380. opacity: 1;
  381. }
  382. }
  383. }