apps.scss 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718
  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. &.without-app-settings {
  107. padding-bottom: 0;
  108. }
  109. .active.with-menu > a,
  110. .with-counter > a {
  111. padding-right: 50px;
  112. }
  113. .active.with-menu.with-counter > a {
  114. padding-right: 90px;
  115. }
  116. .with-icon a,
  117. .app-navigation-entry-loading a {
  118. padding-left: 44px;
  119. background-size: 16px 16px;
  120. background-position: 14px center;
  121. background-repeat: no-repeat;
  122. }
  123. li > a {
  124. display: block;
  125. width: 100%;
  126. line-height: 44px;
  127. min-height: 44px;
  128. padding: 0 12px;
  129. overflow: hidden;
  130. box-sizing: border-box;
  131. white-space: nowrap;
  132. text-overflow: ellipsis;
  133. color: $color-main-text;
  134. opacity: .57;
  135. }
  136. li > a:first-child img {
  137. margin-bottom: -3px;
  138. margin-right: 11px;
  139. width: 16px;
  140. margin-left: 2px;
  141. }
  142. .collapse {
  143. display: none;
  144. /* hide collapse button initially */
  145. }
  146. .collapsible {
  147. > .collapse {
  148. position: absolute;
  149. height: 44px;
  150. width: 44px;
  151. margin: 0;
  152. padding: 0;
  153. background: none;
  154. background-image: url('../img/actions/triangle-s.svg?v=1');
  155. background-size: 16px;
  156. background-repeat: no-repeat;
  157. background-position: center;
  158. border: none;
  159. border-radius: 0;
  160. outline: none !important;
  161. box-shadow: none;
  162. }
  163. &:hover > a,
  164. &:focus > a {
  165. background-image: none;
  166. }
  167. &:hover,
  168. &:focus {
  169. > .collapse {
  170. display: block;
  171. }
  172. }
  173. .collapse {
  174. -webkit-transform: rotate(-90deg);
  175. -ms-transform: rotate(-90deg);
  176. transform: rotate(-90deg);
  177. }
  178. &.open {
  179. .collapse {
  180. -webkit-transform: rotate(0);
  181. -ms-transform: rotate(0);
  182. transform: rotate(0);
  183. }
  184. background-image: linear-gradient(top, nc-darken($color-main-background, 8%) 0%, nc-darken($color-main-background, 3%) 100%);
  185. background-image: -webkit-linear-gradient(top, nc-darken($color-main-background, 8%) 0%, nc-darken($color-main-background, 3%) 100%);
  186. background-image: -ms-linear-gradient(top, nc-darken($color-main-background, 8%) 0%, nc-darken($color-main-background, 3%) 100%);
  187. }
  188. }
  189. > {
  190. /* Second level nesting for lists */
  191. ul ul {
  192. display: none;
  193. li > a {
  194. padding-left: 32px;
  195. }
  196. }
  197. .with-icon ul li {
  198. > a,
  199. &.app-navigation-entry-loading > a {
  200. padding-left: 68px;
  201. background-position: 44px center;
  202. }
  203. }
  204. }
  205. > ul .collapsible.open {
  206. &:hover,
  207. &:focus {
  208. box-shadow: inset 0 0 3px $color-box-shadow;
  209. }
  210. ul {
  211. display: block;
  212. }
  213. }
  214. /* Deleted entries with undo button */
  215. .app-navigation-entry-deleted {
  216. display: inline-block;
  217. height: 44px;
  218. width: 100%;
  219. }
  220. .app-navigation-entry-deleted-description {
  221. padding-left: 12px;
  222. position: relative;
  223. white-space: nowrap;
  224. text-overflow: ellipsis;
  225. overflow: hidden;
  226. display: inline-block;
  227. width: calc(100% - 49px);
  228. line-height: 44px;
  229. float: left;
  230. }
  231. .app-navigation-entry-deleted-button {
  232. margin: 0;
  233. height: 44px;
  234. width: 44px;
  235. line-height: 44px;
  236. border: 0;
  237. display: inline-block;
  238. background-color: transparent;
  239. opacity: .5;
  240. &:hover, &:focus {
  241. opacity: 1;
  242. }
  243. }
  244. /* counter and actions, legacy code */
  245. .utils {
  246. position: absolute;
  247. padding: 7px 7px 0 0;
  248. right: 0;
  249. top: 0;
  250. bottom: 0;
  251. font-size: 12px;
  252. button,
  253. .counter {
  254. width: 44px;
  255. height: 44px;
  256. padding-top: 12px;
  257. }
  258. }
  259. /* drag and drop */
  260. .drag-and-drop {
  261. -webkit-transition: padding-bottom 500ms ease 0s;
  262. transition: padding-bottom 500ms ease 0s;
  263. padding-bottom: 40px;
  264. }
  265. .error {
  266. color: $color-error;
  267. }
  268. .app-navigation-separator {
  269. border-bottom: 1px solid nc-lighten($color-main-text, 86%);
  270. }
  271. /**
  272. * App navigation utils, buttons and counters for drop down menu
  273. */
  274. .app-navigation-entry-utils {
  275. position: absolute;
  276. top: 0;
  277. right: 0;
  278. z-index: 105;
  279. ul {
  280. display: flex !important;
  281. align-items: center;
  282. justify-content: flex-end;
  283. }
  284. li {
  285. width: 44px !important;
  286. height: 44px;
  287. }
  288. }
  289. .active > .app-navigation-entry-utils li {
  290. display: inline-block;
  291. }
  292. .app-navigation-entry-utils button {
  293. height: 100%;
  294. width: 100%;
  295. margin: 0;
  296. box-shadow: none;
  297. }
  298. .app-navigation-entry-utils-menu-button {
  299. button {
  300. border: 0;
  301. opacity: .5;
  302. background-color: transparent;
  303. background-repeat: no-repeat;
  304. background-position: center;
  305. background-image: url('../img/actions/more.svg?v=1');
  306. }
  307. &:hover button,
  308. &:focus button {
  309. background-color: transparent;
  310. opacity: 1;
  311. }
  312. }
  313. .app-navigation-entry-utils-counter {
  314. overflow: hidden;
  315. text-overflow: hidden;
  316. text-align: right;
  317. font-size: 9pt;
  318. width: 38px;
  319. line-height: 44px;
  320. padding: 0 10px;
  321. }
  322. .app-navigation-entry-utils ul, .app-navigation-entry-menu ul {
  323. list-style-type: none;
  324. }
  325. /* editing an entry */
  326. .app-navigation-entry-edit {
  327. padding-left: 5px;
  328. padding-right: 5px;
  329. display: inline-block;
  330. height: 39px;
  331. width: 100%;
  332. input {
  333. border-bottom-right-radius: 0;
  334. border-top-right-radius: 0;
  335. width: calc(100% - 36px);
  336. padding: 5px;
  337. margin-right: 0;
  338. height: 38px;
  339. float: left;
  340. border: 1px solid rgba(nc-lighten($color-main-text, 73%), 0.9);
  341. }
  342. button,
  343. input[type='submit'] {
  344. width: 36px;
  345. height: 38px;
  346. float: left;
  347. }
  348. .icon-checkmark {
  349. border-bottom-left-radius: 0;
  350. border-top-left-radius: 0;
  351. border-left: 0;
  352. margin-right: 0;
  353. }
  354. }
  355. }
  356. /* APP-CONTENT ---------------------------------------------------------------*/
  357. /* Part where the content will be loaded into */
  358. #app-content {
  359. position: relative;
  360. height: 100%;
  361. overflow-y: auto;
  362. /* no top border for first settings item */
  363. > .section:first-child {
  364. border-top: none;
  365. }
  366. &.with-app-sidebar {
  367. margin-right: 27%;
  368. }
  369. }
  370. #app-content-wrapper {
  371. min-width: 100%;
  372. min-height: 100%;
  373. }
  374. /* APP-SIDEBAR ----------------------------------------------------------------*/
  375. /*
  376. Sidebar: a sidebar to be used within #app-content
  377. have it as first element within app-content in order to shrink other
  378. sibling containers properly. Compare Files app for example.
  379. */
  380. #app-sidebar {
  381. position: fixed;
  382. top: 45px;
  383. right: 0;
  384. left: auto;
  385. bottom: 0;
  386. width: 27%;
  387. min-width: 300px;
  388. display: block;
  389. background: $color-main-background;
  390. border-left: 1px solid nc-darken($color-main-background, 8%);
  391. -webkit-transition: margin-right 300ms;
  392. transition: margin-right 300ms;
  393. overflow-x: hidden;
  394. overflow-y: auto;
  395. visibility: visible;
  396. z-index: 500;
  397. &.disappear {
  398. visibility: hidden;
  399. }
  400. }
  401. /* APP-SETTINGS ---------------------------------------------------------------*/
  402. /* settings area */
  403. #app-settings {
  404. position: fixed;
  405. width: 250px;
  406. /* change to 100% when layout positions are absolute */
  407. bottom: 0;
  408. z-index: 140;
  409. &.open #app-settings-content,
  410. &.opened #app-settings-content {
  411. display: block;
  412. }
  413. }
  414. #app-settings-content {
  415. display: none;
  416. padding: 10px;
  417. background-color: $color-main-background;
  418. /* restrict height of settings and make scrollable */
  419. max-height: 300px;
  420. overflow-y: auto;
  421. border-right: 1px solid nc-darken($color-main-background, 8%);
  422. width: 250px;
  423. box-sizing: border-box;
  424. /* display input fields at full width */
  425. input[type='text'] {
  426. width: 93%;
  427. }
  428. .info-text {
  429. padding: 5px 0 7px 22px;
  430. color: rgba($color-main-text, .4);
  431. }
  432. }
  433. #app-settings-header {
  434. border-right: 1px solid nc-darken($color-main-background, 8%);
  435. width: 250px;
  436. box-sizing: border-box;
  437. }
  438. .settings-button {
  439. display: block;
  440. height: 44px;
  441. width: 100%;
  442. padding: 0;
  443. margin: 0;
  444. background-color: $color-main-background;
  445. background-image: url('../img/actions/settings.svg?v=1');
  446. background-position: 14px center;
  447. background-repeat: no-repeat;
  448. box-shadow: none;
  449. border: 0;
  450. border-radius: 0;
  451. text-align: left;
  452. padding-left: 42px;
  453. font-weight: 400;
  454. &:hover,
  455. &:focus {
  456. background-color: $color-main-background;
  457. }
  458. &.opened {
  459. &:hover, &:focus {
  460. background-color: $color-main-background;
  461. }
  462. }
  463. }
  464. /* GENERAL SECTION ---------------------------------------------------------- */
  465. .section {
  466. display: block;
  467. padding: 30px;
  468. color: nc-lighten($color-main-text, 33%);
  469. margin-bottom: 24px;
  470. &.hidden {
  471. display: none !important;
  472. }
  473. /* slight position correction of checkboxes and radio buttons */
  474. input {
  475. &[type='checkbox'],
  476. &[type='radio'] {
  477. vertical-align: -2px;
  478. margin-right: 4px;
  479. }
  480. }
  481. }
  482. .sub-section {
  483. position: relative;
  484. margin-top: 10px;
  485. margin-left: 27px;
  486. margin-bottom: 10px;
  487. }
  488. .appear {
  489. opacity: 1;
  490. -webkit-transition: opacity 500ms ease 0s;
  491. -moz-transition: opacity 500ms ease 0s;
  492. -ms-transition: opacity 500ms ease 0s;
  493. -o-transition: opacity 500ms ease 0s;
  494. transition: opacity 500ms ease 0s;
  495. &.transparent {
  496. opacity: 0;
  497. }
  498. }
  499. /* DROPDOWN ----------------------------------------------------------------- */
  500. .dropdown {
  501. background: nc-darken($color-main-background, 8%);
  502. border-bottom-left-radius: 5px;
  503. border-bottom-right-radius: 5px;
  504. box-shadow: 0 1px 1px $color-box-shadow;
  505. display: block;
  506. margin-right: 0;
  507. position: absolute;
  508. right: 0;
  509. width: 420px;
  510. z-index: 500;
  511. padding: 16px;
  512. }
  513. /* TABS --------------------------------------------------------------------- */
  514. .tabHeaders {
  515. display: inline-block;
  516. margin: 15px;
  517. .tabHeader {
  518. float: left;
  519. padding: 5px;
  520. cursor: pointer;
  521. color: nc-lighten($color-main-text, 33%);
  522. margin-bottom: 1px;
  523. a {
  524. color: nc-lighten($color-main-text, 33%);
  525. margin-bottom: 1px;
  526. }
  527. &.selected {
  528. font-weight: 600;
  529. border-bottom: 1px solid nc-lighten($color-main-text, 20%);
  530. }
  531. &:hover {
  532. border-bottom: 1px solid nc-lighten($color-main-text, 20%);
  533. }
  534. &.selected, &:hover {
  535. margin-bottom: 0px;
  536. color: $color-main-text;
  537. a {
  538. margin-bottom: 0px;
  539. color: $color-main-text;
  540. }
  541. }
  542. }
  543. }
  544. .tabsContainer {
  545. clear: left;
  546. .tab {
  547. padding: 0 15px 15px;
  548. }
  549. }
  550. /* POPOVER MENU ------------------------------------------------------------- */
  551. .ie,
  552. .edge {
  553. .bubble, .bubble:after,
  554. .popovermenu, .popovermenu:after,
  555. #app-navigation .app-navigation-entry-menu,
  556. #app-navigation .app-navigation-entry-menu:after {
  557. border: 1px solid nc-darken($color-main-background, 8%);
  558. }
  559. }
  560. .bubble,
  561. .app-navigation-entry-menu,
  562. .popovermenu {
  563. position: absolute;
  564. background-color: $color-main-background;
  565. color: nc-lighten($color-main-text, 20%);
  566. border-radius: 3px;
  567. z-index: 110;
  568. margin: 5px;
  569. margin-top: -5px;
  570. right: 0;
  571. -webkit-filter: drop-shadow(0 0 5px $color-box-shadow);
  572. -moz-filter: drop-shadow(0 0 5px $color-box-shadow);
  573. -ms-filter: drop-shadow(0 0 5px $color-box-shadow);
  574. -o-filter: drop-shadow(0 0 5px $color-box-shadow);
  575. filter: drop-shadow(0 0 5px $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. /* prevent .action class to break the design */
  637. &.action {
  638. padding: inherit !important;
  639. }
  640. > span {
  641. cursor: pointer;
  642. white-space: nowrap;
  643. }
  644. > p {
  645. width: 150px;
  646. line-height: 1.6em;
  647. padding: 8px 0;
  648. }
  649. /* Add padding if contains icon+text */
  650. &:not(:empty) {
  651. padding: 0 !important;
  652. padding-right: 10px !important;
  653. }
  654. > img {
  655. width: 16px;
  656. padding: 0 10px;
  657. }
  658. }
  659. .menuitem {
  660. width: 100%;
  661. -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=50)';
  662. filter: alpha(opacity = 50);
  663. opacity: .5;
  664. &:hover, &:focus, &.active {
  665. -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)';
  666. filter: alpha(opacity = 100);
  667. opacity: 1;
  668. }
  669. }
  670. [class^='icon-'],
  671. [class*=' icon-']{
  672. /* Keep padding to define the width to
  673. assure correct position of a possible text */
  674. padding: 18px 0 18px 36px;
  675. min-width: 0; /* Overwrite icons*/
  676. min-height: 0;
  677. background-position: 10px center;
  678. opacity: 0.7; /* Default button icon override */
  679. }
  680. }
  681. }