PageRenderTime 43ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/cms/static/cms/sass/cms.pagetree.scss

https://github.com/keimlink/django-cms
Sass | 602 lines | 528 code | 37 blank | 37 comment | 0 complexity | c1d546dde4aec824b7bc1b6e91c1d47b MD5 | raw file
  1. @charset "utf-8";
  2. /*!
  3. * @copyright: https://github.com/divio/django-cms
  4. */
  5. //##############################################################################
  6. // COLORS
  7. // IMPORT SETTINGS
  8. @import "settings/all";
  9. //##############################################################################
  10. // PAGETREE
  11. // colors
  12. $color-font: #666;
  13. $color-border: #dededc;
  14. $color-border-light: #fafafa;
  15. $color-border-medium: #ddd;
  16. $color-background-light: #fefefe;
  17. $color-background-light-hover: #f5f5f5;
  18. $color-background-blue: #f3fbfe;
  19. $color-background-blue-hover: #e6f6fd;
  20. $row-height: 41px;
  21. // pagetree
  22. #sitemap {
  23. margin: 0;
  24. margin: 0;
  25. padding: 0;
  26. background: $color-background-light;
  27. a {
  28. text-decoration: none;
  29. border: none;
  30. outline: none;
  31. }
  32. a:hover {
  33. text-decoration: underline;
  34. }
  35. li,
  36. ul {
  37. list-style-type: none;
  38. }
  39. li input.hidden {
  40. position: absolute;
  41. left: -9999em;
  42. }
  43. // icons
  44. li a.icon,
  45. li span.icon,
  46. li a.preview,
  47. li a.move,
  48. li a.copy,
  49. li a.edit,
  50. li div.info,
  51. li div a.addlink,
  52. li div a.deletelink,
  53. li div.col-softroot span.icon,
  54. li div.col-apphook span.icon {
  55. display: inline-block !important;
  56. width: 20px;
  57. height: 20px;
  58. margin-top: 5px;
  59. background: url("../img/pagetree/sprite.png") no-repeat 0 0 !important;
  60. }
  61. li a.preview {
  62. margin: 0 2px 0 0;
  63. background-position: -55px -29px !important;
  64. }
  65. li div a.preview-active {
  66. background-position: -81px -29px !important;
  67. }
  68. li a.move {
  69. margin: 0;
  70. background-position: -30px -29px !important;
  71. }
  72. li a.copy {
  73. margin: 0;
  74. background-position: -29px -56px !important;
  75. }
  76. li a.edit {
  77. margin: 0 6px 0 2px;
  78. background-position: -29px -4px !important;
  79. }
  80. li div a.addlink {
  81. margin: 0;
  82. padding: 0;
  83. background-position: -29px -81px !important;
  84. &:before {
  85. display: none;
  86. }
  87. }
  88. li div a.deletelink {
  89. margin: 0;
  90. padding: 0;
  91. background-position: -3px -55px !important;
  92. &:before {
  93. display: none;
  94. }
  95. }
  96. li div.info {
  97. margin: 12px 0 0 !important;
  98. cursor: pointer;
  99. background-position: -3px -29px !important;
  100. }
  101. li a.selector-add {
  102. margin-top: -1px;
  103. margin-left: 4px;
  104. background-position: -20px 0 !important;
  105. }
  106. li div .col-softroot span.icon {
  107. margin: 0 !important;
  108. background-position: -3px -3px !important;
  109. }
  110. li div .col-apphook span.icon {
  111. margin: 0 !important;
  112. background-position: -55px -4px !important;
  113. }
  114. li a.preview span,
  115. li a.move span,
  116. li a.copy span,
  117. li a.selector-add span,
  118. li a.addlink span,
  119. li a.deletelink span,
  120. li a.edit span,
  121. li a.advanced-settings span,
  122. li div.info span,
  123. .col-navigation input,
  124. .col-published input {
  125. display: none;
  126. }
  127. // the tree is recalculated once you set the navigation to be
  128. // shown or hidden. In initialization the calculation is off by
  129. // 1px so we need to enforce the width for correct placement
  130. .col-navigation,
  131. .col-preview {
  132. width: 26px !important;
  133. }
  134. .col-preview a {
  135. margin: 0 !important;
  136. }
  137. .col-actions {
  138. width: 126px !important;
  139. }
  140. // header
  141. ul.header {
  142. position: relative;
  143. top: 1px;
  144. }
  145. ul.header,
  146. ul.header li {
  147. margin: 0;
  148. padding: 0;
  149. border: none;
  150. background: none;
  151. }
  152. ul.header li {
  153. color: $color-font;
  154. font-size: 11px;
  155. font-weight: 400;
  156. height: 16px;
  157. padding: 5px 0 4px 5px;
  158. border-bottom: 1px solid $color-border;
  159. background: $color-background-light;
  160. box-sizing: content-box;
  161. }
  162. ul.header li .cont {
  163. height: 15px;
  164. border: none !important;
  165. background: none !important;
  166. }
  167. ul.header li .col1 {
  168. font-size: 10px;
  169. }
  170. ul.header li .col2 > div {
  171. font-size: 10px;
  172. line-height: 14px !important;
  173. height: auto;
  174. border: none;
  175. background: none;
  176. }
  177. // row
  178. li {
  179. padding-left: 20px;
  180. }
  181. li.last {
  182. background-position: 5px 5px !important;
  183. }
  184. li.closed,
  185. li.open {
  186. background-position: 0 6px !important;
  187. }
  188. li .cont {
  189. display: block;
  190. height: $row-height !important;
  191. overflow: visible !important;
  192. border-top: 1px solid $color-border !important;
  193. border-bottom: 1px solid $color-border !important;
  194. background-color: white;
  195. margin-top: -1px;
  196. }
  197. li.open ul .cont {
  198. height: $row-height !important;
  199. }
  200. .tree-default {
  201. padding-top: 1px;
  202. a {
  203. color: $gray;
  204. &:hover, &:focus, &:active {
  205. color: $black !important;
  206. }
  207. }
  208. }
  209. .tree-default .col-navigation,
  210. .tree-default .col-published {
  211. line-height: 30px;
  212. }
  213. // add additional border to separate categories
  214. li.open ul {
  215. margin-left: 0;
  216. }
  217. li .col1 > div {
  218. text-align: center;
  219. }
  220. li .col1 .title {
  221. white-space: nowrap;
  222. background: none;
  223. }
  224. li .col1 .success {
  225. color: $color-font;
  226. padding-left: 10px;
  227. }
  228. li .col1 a.changelink {
  229. display: none;
  230. line-height: 27px;
  231. margin: 6px 0 0 10px !important;
  232. }
  233. li .col1 .title,
  234. li .col1 .success {
  235. display: block;
  236. line-height: $row-height;
  237. height: $row-height;
  238. padding-left: 25px;
  239. }
  240. li .move-target-container {
  241. display: none;
  242. float: left;
  243. font-size: 14px;
  244. line-height: 27px;
  245. }
  246. li .move-target-container a:hover {
  247. text-decoration: none;
  248. }
  249. li .move-target {
  250. display: inline-block;
  251. padding: 7px 8px;
  252. border-left: 1px solid $color-border-medium;
  253. }
  254. li .move-target:first-child {
  255. border-left: none;
  256. }
  257. li .col2 > div {
  258. float: left;
  259. line-height: $row-height !important;
  260. text-align: center;
  261. white-space: nowrap;
  262. width: auto;
  263. height: $row-height;
  264. padding: 0 8px;
  265. border-left: 1px solid $color-border-medium;
  266. box-sizing: content-box;
  267. }
  268. li .col2 > div a,
  269. li .col2 > div span {
  270. vertical-align: middle;
  271. }
  272. // hide items
  273. .cont {
  274. position: relative;
  275. }
  276. .col1 {
  277. display: block;
  278. float: none !important;
  279. }
  280. .col1,
  281. .col2 {
  282. position: relative;
  283. z-index: 10;
  284. }
  285. .col2 {
  286. position: absolute;
  287. top: 0;
  288. right: 0;
  289. z-index: 100;
  290. }
  291. .moveable {
  292. position: relative;
  293. z-index: 100;
  294. }
  295. .moveable.hover,
  296. .moveable:hover {
  297. z-index: 1000;
  298. }
  299. .moveable.hover .cont,
  300. .moveable:hover .cont {
  301. position: relative;
  302. z-index: 1000;
  303. }
  304. .success {
  305. position: absolute;
  306. right: 0;
  307. top: 0;
  308. padding-right: 10px !important;
  309. line-height: $row-height;
  310. height: $row-height;
  311. }
  312. // row hover states
  313. li .cont:hover {
  314. background: $color-border-light;
  315. }
  316. // custom col asignments
  317. li.moveable .col1 .title {
  318. background: url("../img/pagetree/tree-li-drag.gif") no-repeat 0 0;
  319. }
  320. li .col-language a {
  321. text-transform: uppercase;
  322. }
  323. // edit button
  324. .cont:hover .col1 a.changelink {
  325. display: block;
  326. }
  327. // active state
  328. .cont-active {
  329. background: #f7f7f7;
  330. }
  331. .cont-pagetype {
  332. background: white;
  333. }
  334. // drag modus
  335. li#dragged {
  336. min-width: 500px;
  337. z-index: 99999;
  338. padding-right: 0;
  339. margin-right: 0;
  340. background-color: transparent;
  341. border-right: 1px solid $gray-lighter;
  342. }
  343. li#dragged .col2 {
  344. display: none;
  345. }
  346. // info handling
  347. li .info.hover {
  348. position: relative;
  349. }
  350. // remove backgrounds
  351. .moveable,
  352. .tree-default,
  353. .tree .tree-default ul,
  354. #dragged {
  355. background-image: none !important;
  356. }
  357. .moveable.open {
  358. background-image: url("../js/jstree/themes/default/fminus2.gif") !important;
  359. }
  360. .moveable.closed {
  361. background-image: url("../js/jstree/themes/default/fplus2.gif") !important;
  362. }
  363. .tree {
  364. padding-bottom: 4px;
  365. border-left: 1px solid $white;
  366. border-bottom: 1px solid $white;
  367. background: $gray-lightest;
  368. }
  369. // additional fixes
  370. #dragged .removeicon {
  371. left: 7px !important;
  372. top: 5px !important;
  373. z-index: 99 !important;
  374. }
  375. #dragged .col2 {
  376. display: none;
  377. }
  378. .title {
  379. cursor: move;
  380. &:hover {
  381. text-decoration: none;
  382. }
  383. }
  384. }
  385. // filter button on top right
  386. #changelist-filter-button {
  387. display: block;
  388. position: absolute;
  389. top: 0;
  390. right: 0;
  391. z-index: 1000;
  392. line-height: 30px;
  393. width: 150px;
  394. height: auto;
  395. margin: 0;
  396. padding: 0 0 0 10px;
  397. border: 1px solid $color-border-medium;
  398. border-top: none;
  399. border-right: none;
  400. background: $color-border-light;
  401. }
  402. #changelist-filter {
  403. top: 30px;
  404. h2 {
  405. display: none;
  406. }
  407. }
  408. #changelist-search {
  409. margin-top: 35px;
  410. margin-right: 0;
  411. }
  412. // remove background assigned from django
  413. .change-list .filtered {
  414. min-height: 0;
  415. background: white !important;
  416. }
  417. // only visible on multiple sites
  418. #site-selector {
  419. float: left;
  420. margin: 9px 18px 0 8px;
  421. }
  422. // loader on top right
  423. #loader-message {
  424. display: none;
  425. position: fixed;
  426. top: 0;
  427. right: 0;
  428. padding: 4px 8px;
  429. background: white;
  430. }
  431. #sitemap {
  432. border: 1px solid $color-border;
  433. ul.header li .col2 > div {
  434. padding: 0 8px;
  435. border-left: 1px solid transparent;
  436. }
  437. li .col-language > a {
  438. position: absolute;
  439. left: 0;
  440. top: 0;
  441. right: 0;
  442. bottom: 0;
  443. }
  444. li .col-language span {
  445. display: inline-block;
  446. color: transparent;
  447. width: 12px !important;
  448. height: 12px !important;
  449. margin: 0 !important;
  450. border: 1px solid transparent;
  451. border-radius: 7px;
  452. // colors used within the tree
  453. &.dirty {
  454. background-color: #6ba6ff;
  455. -webkit-animation: pulsate 2.5s ease-out infinite;
  456. -moz-animation: pulsate 2.5s ease-out infinite;
  457. animation: pulsate 2.5s ease-out infinite;
  458. }
  459. &.empty {
  460. border: 1px solid #b3b3b3;
  461. background-color: transparent;
  462. }
  463. &.unpublished {
  464. background-color: #b3b3b3;
  465. }
  466. &.unpublishedparent {
  467. background-color: #b3b3b3;
  468. }
  469. &.published {
  470. background-color: #65b417;
  471. }
  472. }
  473. }
  474. // dropdown for language change
  475. .col-language {
  476. position: relative;
  477. }
  478. #sitemap .tree li .tooltip {
  479. display: none;
  480. position: absolute;
  481. top: 7px;
  482. right: 20px;
  483. z-index: 999999;
  484. text-align: left;
  485. border: 1px solid $gray-lighter;
  486. border-radius: $border-radius-base;
  487. background-color: $white;
  488. h3 {
  489. display: block;
  490. position: relative;
  491. z-index: 10;
  492. color: $gray-light;
  493. font-size: $font-size-small;
  494. font-weight: normal;
  495. text-transform: uppercase;
  496. padding: 2px 10px;
  497. margin: 0;
  498. border-bottom: 1px solid $gray-lighter;
  499. background: $white;
  500. }
  501. a {
  502. display: block;
  503. padding: 10px;
  504. min-width: 100px;
  505. text-transform: none;
  506. border-bottom: 1px solid $gray-lighter;
  507. }
  508. a:last-child {
  509. border: none;
  510. }
  511. // content
  512. .inner {
  513. display: block;
  514. padding: 10px;
  515. }
  516. mark {
  517. color: $gray-light;
  518. background: none;
  519. font-weight: normal;
  520. font-style: normal;
  521. }
  522. // icons
  523. .icon-publish {
  524. background: url("../img/pagetree/publish.png") no-repeat 10px 13px;
  525. padding-left: 30px;
  526. }
  527. .icon-unpublish {
  528. background: url("../img/pagetree/unpublish.png") no-repeat 10px 13px;
  529. padding-left: 30px;
  530. }
  531. // icon on the right
  532. &:before {
  533. z-index: 1;
  534. position: absolute;
  535. top: 7px;
  536. content: '';
  537. left: 100%;
  538. width: $dropdown-arrow-side;
  539. height: $dropdown-arrow-side;
  540. margin-left: -($dropdown-arrow-side / 2);
  541. transform: rotate(45deg);
  542. background-color: $submenu-dropdown-bgcolor;
  543. box-shadow: $dropdown-shadow;
  544. }
  545. // special case
  546. &.info-details {
  547. top: -4px;
  548. right: 24px;
  549. }
  550. }
  551. #marker {
  552. margin-top: 1px;
  553. }
  554. // animation for publishing
  555. @keyframes pulsate {
  556. 0% {
  557. opacity: 0.5;
  558. }
  559. 50% {
  560. opacity: 1;
  561. }
  562. 100% {
  563. opacity: 0.5;
  564. }
  565. }