1
0

apps.scss 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715
  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, Morris Jobke <hey@morrisjobke.de>
  5. * @copyright Copyright (c) 2016, pgys <info@pexlab.space>
  6. * @copyright Copyright (c) 2016, Lukas Reschke <lukas@statuscode.ch>
  7. * @copyright Copyright (c) 2016, Stefan Weil <sw@weilnetz.de>
  8. * @copyright Copyright (c) 2016, Roeland Jago Douma <rullzer@owncloud.com>
  9. * @copyright Copyright (c) 2016, jowi <sjw@gmx.ch>
  10. * @copyright Copyright (c) 2015, Hendrik Leppelsack <hendrik@leppelsack.de>
  11. * @copyright Copyright (c) 2015, Thomas Müller <thomas.mueller@tmit.eu>
  12. * @copyright Copyright (c) 2015, Vincent Petry <pvince81@owncloud.com>
  13. * @copyright Copyright (c) 2014-2017, Jan-Christoph Borchardt <hey@jancborchardt.net>
  14. *
  15. * @license GNU AGPL version 3 or any later version
  16. *
  17. */
  18. /* BASE STYLING ---------------------------------------------------------- */
  19. h2 {
  20. font-size: 20px;
  21. font-weight: 300;
  22. margin-bottom: 12px;
  23. line-height: 140%;
  24. }
  25. h3 {
  26. font-size: 15px;
  27. font-weight: 300;
  28. margin: 12px 0;
  29. }
  30. /* do not use italic typeface style, instead lighter color */
  31. em {
  32. font-style: normal;
  33. -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=50)';
  34. opacity: .5;
  35. }
  36. dl {
  37. padding: 12px 0;
  38. }
  39. dt,
  40. dd {
  41. display: inline-block;
  42. padding: 12px;
  43. padding-left: 0;
  44. }
  45. dt {
  46. width: 130px;
  47. white-space: nowrap;
  48. text-align: right;
  49. }
  50. kbd {
  51. padding: 4px 10px;
  52. border: 1px solid #ccc;
  53. box-shadow: 0 1px 0 rgba(0, 0, 0, .2);
  54. border-radius: 3px;
  55. display: inline-block;
  56. white-space: nowrap;
  57. }
  58. /* APP STYLING -------------------------------------------------------------- */
  59. #app {
  60. height: 100%;
  61. width: 100%;
  62. * {
  63. box-sizing: border-box;
  64. }
  65. }
  66. /* APP-NAVIGATION ------------------------------------------------------------*/
  67. /* Navigation: folder like structure */
  68. #app-navigation {
  69. width: 250px;
  70. height: 100%;
  71. float: left;
  72. box-sizing: border-box;
  73. background-color: $color-main-background;
  74. padding-bottom: 44px;
  75. -webkit-user-select: none;
  76. -moz-user-select: none;
  77. -ms-user-select: none;
  78. user-select: none;
  79. border-right: 1px solid nc-darken($color-main-background, 8%);
  80. display: flex;
  81. flex-direction: column;
  82. > ul {
  83. position: relative;
  84. height: 100%;
  85. width: inherit;
  86. overflow: auto;
  87. box-sizing: border-box;
  88. > li {
  89. &:focus,
  90. &:hover,
  91. &.active,
  92. a.selected {
  93. &,
  94. > a {
  95. opacity: 1;
  96. box-shadow: inset 2px 0 $color-primary;
  97. }
  98. }
  99. }
  100. }
  101. li {
  102. position: relative;
  103. width: 100%;
  104. box-sizing: border-box;
  105. }
  106. &.hidden {
  107. display: none;
  108. }
  109. &.without-app-settings {
  110. padding-bottom: 0;
  111. }
  112. .active.with-menu > a,
  113. .with-counter > a {
  114. padding-right: 50px;
  115. }
  116. .active.with-menu.with-counter > a {
  117. padding-right: 90px;
  118. }
  119. .with-icon a,
  120. .app-navigation-entry-loading a {
  121. padding-left: 44px;
  122. background-size: 16px 16px;
  123. background-position: 14px center;
  124. background-repeat: no-repeat;
  125. }
  126. li > a {
  127. display: block;
  128. width: 100%;
  129. line-height: 44px;
  130. min-height: 44px;
  131. padding: 0 12px;
  132. overflow: hidden;
  133. box-sizing: border-box;
  134. white-space: nowrap;
  135. text-overflow: ellipsis;
  136. color: $color-main-text;
  137. opacity: .57;
  138. }
  139. li > a:first-child img {
  140. margin-bottom: -3px;
  141. margin-right: 11px;
  142. width: 16px;
  143. height: 16px;
  144. margin-left: 2px;
  145. }
  146. .collapse {
  147. display: none;
  148. /* hide collapse button initially */
  149. }
  150. .collapsible {
  151. > .collapse {
  152. position: absolute;
  153. height: 44px;
  154. width: 44px;
  155. margin: 0;
  156. padding: 0;
  157. background: none;
  158. background-image: url('../img/actions/triangle-s.svg?v=1');
  159. background-size: 16px;
  160. background-repeat: no-repeat;
  161. background-position: center;
  162. border: none;
  163. border-radius: 0;
  164. outline: none !important;
  165. box-shadow: none;
  166. }
  167. &:hover > a,
  168. &:focus > a {
  169. background-image: none;
  170. }
  171. &:hover,
  172. &:focus {
  173. > .collapse {
  174. display: block;
  175. }
  176. }
  177. .collapse {
  178. -webkit-transform: rotate(-90deg);
  179. -ms-transform: rotate(-90deg);
  180. transform: rotate(-90deg);
  181. }
  182. &.open {
  183. .collapse {
  184. -webkit-transform: rotate(0);
  185. -ms-transform: rotate(0);
  186. transform: rotate(0);
  187. }
  188. background-image: linear-gradient(top, nc-darken($color-main-background, 8%) 0%, nc-darken($color-main-background, 3%) 100%);
  189. background-image: -webkit-linear-gradient(top, nc-darken($color-main-background, 8%) 0%, nc-darken($color-main-background, 3%) 100%);
  190. background-image: -ms-linear-gradient(top, nc-darken($color-main-background, 8%) 0%, nc-darken($color-main-background, 3%) 100%);
  191. }
  192. }
  193. > {
  194. /* Second level nesting for lists */
  195. ul ul {
  196. display: none;
  197. li > a {
  198. padding-left: 32px;
  199. }
  200. }
  201. .with-icon ul li {
  202. > a,
  203. &.app-navigation-entry-loading > a {
  204. padding-left: 68px;
  205. background-position: 44px center;
  206. }
  207. }
  208. }
  209. > ul .collapsible.open {
  210. &:hover,
  211. &:focus {
  212. box-shadow: inset 0 0 3px $color-box-shadow;
  213. }
  214. ul {
  215. display: block;
  216. }
  217. }
  218. /* Deleted entries with undo button */
  219. .app-navigation-entry-deleted {
  220. display: inline-block;
  221. height: 44px;
  222. width: 100%;
  223. }
  224. .app-navigation-entry-deleted-description {
  225. padding-left: 12px;
  226. position: relative;
  227. white-space: nowrap;
  228. text-overflow: ellipsis;
  229. overflow: hidden;
  230. display: inline-block;
  231. width: calc(100% - 49px);
  232. line-height: 44px;
  233. float: left;
  234. }
  235. .app-navigation-entry-deleted-button {
  236. margin: 0;
  237. height: 44px;
  238. width: 44px;
  239. line-height: 44px;
  240. border: 0;
  241. display: inline-block;
  242. background-color: transparent;
  243. opacity: .5;
  244. &:hover, &:focus {
  245. opacity: 1;
  246. }
  247. }
  248. /* counter and actions, legacy code */
  249. .utils {
  250. position: absolute;
  251. padding: 7px 7px 0 0;
  252. right: 0;
  253. top: 0;
  254. bottom: 0;
  255. font-size: 12px;
  256. button,
  257. .counter {
  258. width: 44px;
  259. height: 44px;
  260. padding-top: 12px;
  261. }
  262. }
  263. /* drag and drop */
  264. .drag-and-drop {
  265. -webkit-transition: padding-bottom 500ms ease 0s;
  266. transition: padding-bottom 500ms ease 0s;
  267. padding-bottom: 40px;
  268. }
  269. .error {
  270. color: $color-error;
  271. }
  272. .app-navigation-separator {
  273. border-bottom: 1px solid nc-lighten($color-main-text, 86%);
  274. }
  275. /**
  276. * App navigation utils, buttons and counters for drop down menu
  277. */
  278. .app-navigation-entry-utils {
  279. position: absolute;
  280. top: 0;
  281. right: 0;
  282. z-index: 105;
  283. ul {
  284. display: flex !important;
  285. align-items: center;
  286. justify-content: flex-end;
  287. }
  288. li {
  289. width: 44px !important;
  290. height: 44px;
  291. }
  292. }
  293. .active > .app-navigation-entry-utils li {
  294. display: inline-block;
  295. }
  296. .app-navigation-entry-utils button {
  297. height: 100%;
  298. width: 100%;
  299. margin: 0;
  300. box-shadow: none;
  301. }
  302. .app-navigation-entry-utils-menu-button {
  303. button {
  304. border: 0;
  305. opacity: .5;
  306. background-color: transparent;
  307. background-repeat: no-repeat;
  308. background-position: center;
  309. background-image: url('../img/actions/more.svg?v=1');
  310. }
  311. &:hover button,
  312. &:focus button {
  313. background-color: transparent;
  314. opacity: 1;
  315. }
  316. }
  317. .app-navigation-entry-utils-counter {
  318. overflow: hidden;
  319. text-overflow: hidden;
  320. text-align: right;
  321. font-size: 9pt;
  322. width: 38px;
  323. line-height: 44px;
  324. padding: 0 10px;
  325. }
  326. .app-navigation-entry-utils ul, .app-navigation-entry-menu ul {
  327. list-style-type: none;
  328. }
  329. /* editing an entry */
  330. .app-navigation-entry-edit {
  331. padding-left: 5px;
  332. padding-right: 5px;
  333. display: inline-block;
  334. height: 39px;
  335. width: 100%;
  336. input {
  337. border-bottom-right-radius: 0;
  338. border-top-right-radius: 0;
  339. width: calc(100% - 36px);
  340. padding: 5px;
  341. margin-right: 0;
  342. height: 38px;
  343. float: left;
  344. border: 1px solid rgba(nc-lighten($color-main-text, 73%), 0.9);
  345. }
  346. button,
  347. input[type='submit'] {
  348. width: 36px;
  349. height: 38px;
  350. float: left;
  351. }
  352. .icon-checkmark {
  353. border-bottom-left-radius: 0;
  354. border-top-left-radius: 0;
  355. border-left: 0;
  356. margin-right: 0;
  357. }
  358. }
  359. }
  360. /* APP-CONTENT ---------------------------------------------------------------*/
  361. /* Part where the content will be loaded into */
  362. #app-content {
  363. position: relative;
  364. height: 100%;
  365. overflow-y: auto;
  366. /* no top border for first settings item */
  367. > .section:first-child {
  368. border-top: none;
  369. }
  370. &.with-app-sidebar {
  371. margin-right: 27%;
  372. }
  373. }
  374. #app-content-wrapper {
  375. min-width: 100%;
  376. min-height: 100%;
  377. }
  378. /* APP-SIDEBAR ----------------------------------------------------------------*/
  379. /*
  380. Sidebar: a sidebar to be used within #app-content
  381. have it as first element within app-content in order to shrink other
  382. sibling containers properly. Compare Files app for example.
  383. */
  384. #app-sidebar {
  385. position: fixed;
  386. top: 45px;
  387. right: 0;
  388. left: auto;
  389. bottom: 0;
  390. width: 27%;
  391. min-width: 300px;
  392. display: block;
  393. background: $color-main-background;
  394. border-left: 1px solid nc-darken($color-main-background, 8%);
  395. -webkit-transition: margin-right 300ms;
  396. transition: margin-right 300ms;
  397. overflow-x: hidden;
  398. overflow-y: auto;
  399. visibility: visible;
  400. z-index: 500;
  401. &.disappear {
  402. visibility: hidden;
  403. }
  404. }
  405. /* APP-SETTINGS ---------------------------------------------------------------*/
  406. /* settings area */
  407. #app-settings {
  408. position: fixed;
  409. width: 250px;
  410. /* change to 100% when layout positions are absolute */
  411. bottom: 0;
  412. z-index: 140;
  413. &.open #app-settings-content,
  414. &.opened #app-settings-content {
  415. display: block;
  416. }
  417. }
  418. #app-settings-content {
  419. display: none;
  420. padding: 10px;
  421. background-color: $color-main-background;
  422. /* restrict height of settings and make scrollable */
  423. max-height: 300px;
  424. overflow-y: auto;
  425. border-right: 1px solid nc-darken($color-main-background, 8%);
  426. width: 250px;
  427. box-sizing: border-box;
  428. /* display input fields at full width */
  429. input[type='text'] {
  430. width: 93%;
  431. }
  432. .info-text {
  433. padding: 5px 0 7px 22px;
  434. color: rgba($color-main-text, .4);
  435. }
  436. }
  437. #app-settings-header {
  438. border-right: 1px solid nc-darken($color-main-background, 8%);
  439. width: 250px;
  440. box-sizing: border-box;
  441. }
  442. .settings-button {
  443. display: block;
  444. height: 44px;
  445. width: 100%;
  446. padding: 0;
  447. margin: 0;
  448. background-color: $color-main-background;
  449. background-image: url('../img/actions/settings.svg?v=1');
  450. background-position: 14px center;
  451. background-repeat: no-repeat;
  452. box-shadow: none;
  453. border: 0;
  454. border-radius: 0;
  455. text-align: left;
  456. padding-left: 42px;
  457. font-weight: 400;
  458. &:hover,
  459. &:focus {
  460. background-color: $color-main-background;
  461. }
  462. &.opened {
  463. &:hover, &:focus {
  464. background-color: $color-main-background;
  465. }
  466. }
  467. }
  468. /* GENERAL SECTION ---------------------------------------------------------- */
  469. .section {
  470. display: block;
  471. padding: 30px;
  472. color: nc-lighten($color-main-text, 33%);
  473. margin-bottom: 24px;
  474. &.hidden {
  475. display: none !important;
  476. }
  477. /* slight position correction of checkboxes and radio buttons */
  478. input {
  479. &[type='checkbox'],
  480. &[type='radio'] {
  481. vertical-align: -2px;
  482. margin-right: 4px;
  483. }
  484. }
  485. }
  486. .sub-section {
  487. position: relative;
  488. margin-top: 10px;
  489. margin-left: 27px;
  490. margin-bottom: 10px;
  491. }
  492. .appear {
  493. opacity: 1;
  494. -webkit-transition: opacity 500ms ease 0s;
  495. -moz-transition: opacity 500ms ease 0s;
  496. -ms-transition: opacity 500ms ease 0s;
  497. -o-transition: opacity 500ms ease 0s;
  498. transition: opacity 500ms ease 0s;
  499. &.transparent {
  500. opacity: 0;
  501. }
  502. }
  503. /* DROPDOWN ----------------------------------------------------------------- */
  504. .dropdown {
  505. background: nc-darken($color-main-background, 8%);
  506. border-bottom-left-radius: 5px;
  507. border-bottom-right-radius: 5px;
  508. box-shadow: 0 1px 1px $color-box-shadow;
  509. display: block;
  510. margin-right: 0;
  511. position: absolute;
  512. right: 0;
  513. width: 420px;
  514. z-index: 500;
  515. padding: 16px;
  516. }
  517. /* TABS --------------------------------------------------------------------- */
  518. .tabHeaders {
  519. display: inline-block;
  520. margin: 15px;
  521. .tabHeader {
  522. float: left;
  523. padding: 5px;
  524. cursor: pointer;
  525. color: nc-lighten($color-main-text, 33%);
  526. margin-bottom: 1px;
  527. a {
  528. color: nc-lighten($color-main-text, 33%);
  529. margin-bottom: 1px;
  530. }
  531. &.selected {
  532. font-weight: 600;
  533. border-bottom: 1px solid nc-lighten($color-main-text, 20%);
  534. }
  535. &:hover {
  536. border-bottom: 1px solid nc-lighten($color-main-text, 20%);
  537. }
  538. &.selected, &:hover {
  539. margin-bottom: 0px;
  540. color: $color-main-text;
  541. a {
  542. margin-bottom: 0px;
  543. color: $color-main-text;
  544. }
  545. }
  546. }
  547. }
  548. .tabsContainer {
  549. clear: left;
  550. .tab {
  551. padding: 0 15px 15px;
  552. }
  553. }
  554. /* POPOVER MENU ------------------------------------------------------------- */
  555. .ie,
  556. .edge {
  557. .bubble, .bubble:after,
  558. .popovermenu, .popovermenu:after,
  559. #app-navigation .app-navigation-entry-menu,
  560. #app-navigation .app-navigation-entry-menu:after {
  561. border: 1px solid nc-darken($color-main-background, 8%);
  562. }
  563. }
  564. .bubble,
  565. .app-navigation-entry-menu,
  566. .popovermenu {
  567. position: absolute;
  568. background-color: $color-main-background;
  569. color: $color-main-text;
  570. border-radius: 3px;
  571. z-index: 110;
  572. margin: 5px;
  573. margin-top: -5px;
  574. right: 0;
  575. box-shadow: 0 1px 10px $color-box-shadow;
  576. display: none;
  577. &:after {
  578. bottom: 100%;
  579. /* Min-width of popover is 36px and arrow width is 20px
  580. wich leaves us 8px right and 8px left */
  581. right: 8px;
  582. /* change this to adjust the arrow position */
  583. border: solid transparent;
  584. content: ' ';
  585. height: 0;
  586. width: 0;
  587. position: absolute;
  588. pointer-events: none;
  589. border-bottom-color: $color-main-background;
  590. border-width: 10px;
  591. }
  592. /* Center the popover */
  593. &.menu-center {
  594. transform: translateX(50%);
  595. right: 50%;
  596. margin-right: 0;
  597. &:after {
  598. right: 50%;
  599. transform: translateX(50%);
  600. }
  601. }
  602. /* Align the popover to the left */
  603. &.menu-left {
  604. right: auto;
  605. left: 0;
  606. margin-right: 0;
  607. &:after {
  608. left: 6px;
  609. right: auto;
  610. }
  611. }
  612. &.open {
  613. display: block;
  614. }
  615. ul {
  616. /* Overwrite #app-navigation > ul ul */
  617. display: flex !important;
  618. flex-direction: column;
  619. }
  620. li {
  621. display: flex;
  622. > button,
  623. > a,
  624. > .menuitem {
  625. cursor: pointer;
  626. line-height: 36px;
  627. border: 0;
  628. background-color: transparent;
  629. display: flex;
  630. align-items: center;
  631. width: auto;
  632. height: auto;
  633. margin: 0;
  634. font-weight: 300;
  635. box-shadow: none;
  636. width: 100%;
  637. /* Override the app-navigation li opacity */
  638. -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=70)' !important;
  639. filter: alpha(opacity = 70) !important;
  640. opacity: .7 !important;
  641. &:hover, &:focus, &.active {
  642. -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)' !important;
  643. filter: alpha(opacity = 100) !important;
  644. opacity: 1 !important;
  645. }
  646. /* prevent .action class to break the design */
  647. &.action {
  648. padding: inherit !important;
  649. }
  650. > span {
  651. cursor: pointer;
  652. white-space: nowrap;
  653. }
  654. > p {
  655. width: 150px;
  656. line-height: 1.6em;
  657. padding: 8px 0;
  658. }
  659. /* Add padding if contains icon+text */
  660. &:not(:empty) {
  661. padding: 0 !important;
  662. padding-right: 10px !important;
  663. }
  664. > img {
  665. width: 16px;
  666. padding: 0 10px;
  667. }
  668. }
  669. [class^='icon-'],
  670. [class*=' icon-']{
  671. /* Keep padding to define the width to
  672. assure correct position of a possible text */
  673. padding: 18px 0 18px 36px;
  674. min-width: 0; /* Overwrite icons*/
  675. min-height: 0;
  676. background-position: 10px center;
  677. }
  678. }
  679. }