2
0

_listing.scss 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728
  1. // General listings, like for pages, images or snippets
  2. ul.listing {
  3. @include unlist();
  4. }
  5. .listing {
  6. margin-bottom: 2em;
  7. color: $color-text-base;
  8. font-size: 0.95em;
  9. ul {
  10. list-style-type: none;
  11. padding-left: 0;
  12. // @include unlist();
  13. }
  14. > li {
  15. padding: 1em 0;
  16. border-bottom: 1px dashed $color-input-border;
  17. }
  18. h3 {
  19. margin: 0;
  20. font-size: 1em;
  21. }
  22. td,
  23. th {
  24. padding: 1.2em 1em;
  25. &.no-padding {
  26. padding: 0;
  27. }
  28. }
  29. &.small td,
  30. th {
  31. padding: 0.6em 1em;
  32. }
  33. thead {
  34. font-size: 1.1em;
  35. color: $color-text-base;
  36. border-bottom: 1px solid $color-grey-4;
  37. th {
  38. font-size: 0.9em;
  39. text-align: left;
  40. font-weight: normal;
  41. white-space: nowrap;
  42. text-transform: uppercase;
  43. }
  44. th.children {
  45. border: 0;
  46. }
  47. th a {
  48. text-decoration: none;
  49. color: inherit;
  50. position: relative;
  51. &.icon:after {
  52. opacity: 0.5;
  53. right: 0;
  54. }
  55. }
  56. }
  57. &.full-width td:first-child,
  58. &.full-width th:first-child {
  59. padding-left: 20px;
  60. }
  61. &.full-width {
  62. margin-bottom: -3em; // this negates the padding added to the bottom of .content
  63. }
  64. &.full-width th {
  65. background-color: $color-thead-bg;
  66. }
  67. .table-headers {
  68. border-bottom: 1px solid $color-grey-4;
  69. }
  70. tbody {
  71. border-bottom: 1px dashed $color-input-border;
  72. tr {
  73. border-top: 1px dashed $color-input-border;
  74. &:first-child {
  75. border-top: 1px dashed $color-input-border;
  76. }
  77. &:hover {
  78. background-color: #fcfcfc;
  79. }
  80. }
  81. tr.selected {
  82. background-color: #c8eae9;
  83. &:hover {
  84. background-color: #b5e3e2;
  85. }
  86. }
  87. }
  88. &.full-width tbody {
  89. border: 0;
  90. }
  91. &.chooser {
  92. tbody .title a {
  93. @include transition(none);
  94. display: block;
  95. }
  96. tbody tr:hover {
  97. background-color: $color-teal;
  98. color: $color-white;
  99. .title a,
  100. .title a:hover {
  101. color: $color-white;
  102. }
  103. .parent a {
  104. color: $color-white;
  105. }
  106. .status-tag {
  107. border-color: $color-white;
  108. }
  109. }
  110. tbody tr.disabled td {
  111. opacity: 0.25;
  112. }
  113. tbody tr.disabled td.children {
  114. opacity: 1;
  115. }
  116. tbody tr.disabled:hover {
  117. background-color: inherit;
  118. color: inherit;
  119. .title {
  120. cursor: not-allowed;
  121. }
  122. .status-tag {
  123. border-color: inherit;
  124. }
  125. }
  126. }
  127. &.small tbody tr {
  128. font-size: 1em;
  129. }
  130. &.full-width .divider td {
  131. padding-left: 20px;
  132. }
  133. // specific columns
  134. .bulk {
  135. padding-right: 0;
  136. label {
  137. font-size: 1em;
  138. display: block;
  139. width: 100%;
  140. position: relative;
  141. }
  142. label span {
  143. @include visuallyhidden();
  144. }
  145. input {
  146. margin-top: 3px;
  147. }
  148. }
  149. .title {
  150. h2 {
  151. text-transform: none;
  152. margin: 0;
  153. font-size: 1.15em;
  154. font-weight: 600;
  155. color: $color-text-base;
  156. line-height: 1.5em;
  157. a {
  158. color: inherit;
  159. text-decoration: none;
  160. // stylelint-disable max-nesting-depth
  161. &:hover {
  162. color: $color-link;
  163. }
  164. }
  165. }
  166. }
  167. .actions {
  168. @include clearfix();
  169. margin-top: 0.8em;
  170. text-transform: uppercase;
  171. margin-bottom: -0.5em;
  172. font-size: 0.8rem;
  173. a {
  174. text-decoration: none;
  175. }
  176. > li {
  177. float: left;
  178. padding: 0 0.5em 0 0;
  179. margin: 0 0 0.5em;
  180. // line-height: 1em;
  181. }
  182. }
  183. .button-secondary {
  184. border-color: $color-grey-3;
  185. background: $color-white;
  186. &:hover {
  187. border-color: $color-teal;
  188. background-color: $color-teal;
  189. }
  190. }
  191. .button-secondary {
  192. background-color: $color-white;
  193. }
  194. .moderate-actions form {
  195. float: left;
  196. margin: 0 1em 1em 0;
  197. }
  198. .children,
  199. .no-children {
  200. padding: 0;
  201. &:hover {
  202. background-color: $color-grey-5;
  203. }
  204. a {
  205. display: block;
  206. padding: 2em 0;
  207. }
  208. }
  209. .children a {
  210. color: $color-teal;
  211. display: block;
  212. &:before {
  213. font-size: 3rem;
  214. }
  215. }
  216. .no-children a {
  217. color: $color-grey-3;
  218. display: block;
  219. &:before {
  220. font-size: 1.5rem;
  221. }
  222. &:hover {
  223. color: $color-teal;
  224. }
  225. }
  226. &.small .children a:before {
  227. font-size: 30px;
  228. }
  229. th.ord {
  230. text-align: center;
  231. .icon {
  232. opacity: 0.5;
  233. &::before {
  234. margin-right: 2px;
  235. }
  236. }
  237. &--active a,
  238. a:hover {
  239. color: $color-teal;
  240. }
  241. &--active .icon {
  242. opacity: 1;
  243. }
  244. }
  245. .handle {
  246. cursor: move;
  247. width: 20px;
  248. &:before {
  249. font-size: 20px;
  250. color: $color-grey-3;
  251. width: 1em;
  252. }
  253. &:hover:before {
  254. color: $color-text-base;
  255. }
  256. }
  257. .ui-sortable-helper {
  258. border: 1px dashed $color-input-border;
  259. border-width: 1px 0;
  260. td {
  261. display: none;
  262. }
  263. .ord,
  264. .title {
  265. display: table-cell;
  266. }
  267. }
  268. .dropzone {
  269. height: 80px;
  270. background-color: $color-grey-1;
  271. &:hover {
  272. background-color: $color-grey-1;
  273. }
  274. td {
  275. padding: 0;
  276. }
  277. }
  278. table .no-results-message {
  279. padding-left: 20px;
  280. }
  281. .unpublished h2 {
  282. opacity: 0.7;
  283. }
  284. .index {
  285. background-color: $color-grey-4;
  286. .title h2 {
  287. font-size: 1.2em;
  288. opacity: 1;
  289. a {
  290. @include transition(opacity 0.2s ease);
  291. }
  292. a:hover {
  293. opacity: 0.7;
  294. }
  295. }
  296. .actions {
  297. margin-top: 1em;
  298. }
  299. .button {
  300. background-color: $color-white;
  301. color: $color-teal;
  302. border-color: rgba(0, 0, 0, 0.35);
  303. &:hover {
  304. color: $color-white;
  305. background: $color-teal-darker;
  306. border-color: $color-teal-darker;
  307. }
  308. &:active {
  309. color: $color-white;
  310. background: #333;
  311. border-color: #333;
  312. }
  313. &.bicolor {
  314. background: $color-teal-darker;
  315. border: solid 1px darken($color-teal-darker, 10%);
  316. &:active {
  317. color: $color-white;
  318. background: #484848;
  319. border-color: #333;
  320. }
  321. }
  322. }
  323. }
  324. .indicator {
  325. margin-right: 0;
  326. font-size: 1em;
  327. opacity: 0.7;
  328. }
  329. &.images img {
  330. @include transition(border-color 0.2s ease);
  331. border: 3px solid $color-white;
  332. }
  333. }
  334. .image-choice {
  335. color: inherit;
  336. overflow-wrap: break-word;
  337. word-wrap: break-word;
  338. }
  339. ul.listing {
  340. border-top: 1px dashed $color-input-border;
  341. margin-bottom: 2em;
  342. }
  343. table.listing {
  344. width: 100%;
  345. }
  346. // explorer specific tweaks
  347. .page-explorer .listing {
  348. position: relative;
  349. .index {
  350. color: $color-white;
  351. background-color: $color-header-bg;
  352. td {
  353. padding-top: 1.5em;
  354. padding-bottom: 1.5em;
  355. }
  356. .privacy-indicator {
  357. font-size: 1em;
  358. opacity: 1;
  359. position: absolute;
  360. right: 10%;
  361. top: 2em;
  362. }
  363. .locked-indicator {
  364. font-size: 0.8em;
  365. }
  366. .title {
  367. h2 {
  368. color: $color-white;
  369. font-size: 1.8em;
  370. font-weight: 500;
  371. a:hover {
  372. color: $color-white;
  373. }
  374. }
  375. }
  376. .button {
  377. background-color: transparent;
  378. color: $color-white;
  379. border-color: rgba(0, 0, 0, 0.35);
  380. &:hover {
  381. color: $color-white;
  382. background: $color-teal-darker;
  383. }
  384. &.bicolor {
  385. background: $color-teal-darker;
  386. }
  387. }
  388. }
  389. .table-headers {
  390. height: 35px;
  391. .title {
  392. padding-left: 0;
  393. }
  394. }
  395. tbody .title {
  396. padding-left: 0;
  397. }
  398. }
  399. .pagination {
  400. text-align: center;
  401. p {
  402. margin: 0;
  403. }
  404. ul {
  405. @include unlist();
  406. }
  407. ul {
  408. margin-top: -1.7em;
  409. }
  410. li {
  411. line-height: 1em;
  412. }
  413. .prev {
  414. float: left;
  415. }
  416. .next {
  417. float: right;
  418. }
  419. }
  420. .listing.full-width + .pagination {
  421. margin-top: 3em;
  422. border-top: 1px dashed #d9d9d9;
  423. padding: 2em 50px 0;
  424. }
  425. // listing filters
  426. .listing-filter {
  427. @include clearfix();
  428. background-color: $color-grey-5;
  429. border-width: 1px 0;
  430. margin: 3em 0;
  431. }
  432. .filter-title {
  433. float: left;
  434. text-transform: uppercase;
  435. font-size: 0.95em;
  436. padding: 1em;
  437. margin: 0 1em 0 0;
  438. background-color: $color-grey-4;
  439. }
  440. .filter-options {
  441. @include unlist();
  442. @include clearfix();
  443. overflow: hidden;
  444. li {
  445. padding: 0.8em;
  446. float: left;
  447. }
  448. }
  449. @include media-breakpoint-up(sm) {
  450. .listing {
  451. &.horiz > li {
  452. float: left;
  453. }
  454. &.images {
  455. @include clearfix();
  456. border: 1px solid $color-grey-4;
  457. border-width: 0 0 0 1px;
  458. > li {
  459. padding: 1.3em;
  460. width: 200px;
  461. height: 220px;
  462. text-align: center;
  463. margin-top: -1px;
  464. border: 1px solid $color-grey-4;
  465. border-width: 1px 1px 1px 0;
  466. .image {
  467. text-align: center;
  468. height: 180px;
  469. &:before {
  470. content: '';
  471. display: inline-block;
  472. height: 100%;
  473. vertical-align: middle;
  474. margin-right: -0.25em;
  475. }
  476. img {
  477. display: inline-block;
  478. vertical-align: middle;
  479. }
  480. }
  481. &:hover {
  482. background-color: #fdfdfd;
  483. img {
  484. border-color: $color-teal;
  485. }
  486. }
  487. }
  488. }
  489. .actions {
  490. visibility: hidden;
  491. }
  492. .index .actions {
  493. visibility: visible;
  494. }
  495. td:hover .actions {
  496. visibility: visible;
  497. }
  498. .no-children {
  499. border-color: transparent;
  500. a {
  501. opacity: 0;
  502. }
  503. }
  504. tr:hover .no-children a {
  505. opacity: 1;
  506. }
  507. tr:hover .children {
  508. background-color: $color-teal;
  509. a:before {
  510. color: $color-white;
  511. }
  512. }
  513. td.children:hover {
  514. background-color: $color-teal-darker;
  515. }
  516. table .no-results-message {
  517. padding-left: 50px;
  518. }
  519. &.full-width td:first-child,
  520. &.full-width th:first-child {
  521. padding-left: 25px;
  522. }
  523. &.full-width .divider td {
  524. padding-left: 50px;
  525. }
  526. }
  527. }
  528. // State
  529. .listing__item--active {
  530. > .actions {
  531. visibility: visible;
  532. }
  533. }
  534. // Transitions
  535. .listing {
  536. thead .dropdown ul {
  537. @include transition(none);
  538. }
  539. .children,
  540. .no-children {
  541. @include transition(background-color 0.2s ease);
  542. }
  543. .children a,
  544. .no-children a {
  545. @include transition(all 0.2s ease);
  546. }
  547. }
  548. // Ordering
  549. td.ord {
  550. .handle {
  551. // Align with the row's title text, and the column's label.
  552. margin-top: -28px;
  553. margin-left: 13px;
  554. }
  555. }
  556. table.listing {
  557. th.ordered {
  558. color: $color-teal;
  559. &.ascending {
  560. &:before {
  561. content: '\25B2'; // up arrow
  562. display: inline-block;
  563. height: 100%;
  564. vertical-align: middle;
  565. }
  566. }
  567. &.descending {
  568. &:before {
  569. content: '\25BC'; // down arrow
  570. display: inline-block;
  571. height: 100%;
  572. vertical-align: middle;
  573. }
  574. }
  575. }
  576. }