0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-29 17:36:49 +01:00
wagtail/client/scss/components/_listing.scss

747 lines
14 KiB
SCSS
Raw Normal View History

2015-11-03 13:15:33 +01:00
// General listings, like for pages, images or snippets
ul.listing {
@include unlist();
}
.listing {
margin-bottom: 2em;
color: $color-text-base;
font-size: 0.95em;
2014-07-24 16:11:45 +02:00
ul {
2015-11-19 07:05:57 +01:00
list-style-type: none;
padding-left: 0;
// @include unlist();
}
2015-11-03 13:15:33 +01:00
> li {
padding: 1em 0;
border-bottom: 1px dashed $color-input-border;
}
h3 {
margin: 0;
font-size: 1em;
}
td,
2015-11-03 13:15:33 +01:00
th {
padding: 1.2em 1em;
2017-01-05 11:45:41 +01:00
&.no-padding {
padding: 0;
}
}
&.small td,
2015-11-03 13:15:33 +01:00
th {
padding: 0.6em 1em;
}
thead {
font-size: 1.1em;
2014-07-24 16:11:45 +02:00
color: $color-text-base;
border-bottom: 1px solid $color-grey-4;
th {
font-size: 0.9em;
text-align: left;
font-weight: normal;
white-space: nowrap;
text-transform: uppercase;
}
2015-11-03 13:15:33 +01:00
th.children {
border: 0;
}
th a {
text-decoration: none;
color: inherit;
position: relative;
&.icon:after {
opacity: 0.5;
right: 0;
}
}
}
&.full-width td:first-child,
&.full-width th:first-child {
padding-left: 20px;
}
&.full-width {
2015-11-03 13:15:33 +01:00
margin-bottom: -3em; // this negates the padding added to the bottom of .content
}
2015-11-03 13:15:33 +01:00
&.full-width th {
background-color: $color-thead-bg;
}
.table-headers {
2015-11-03 13:15:33 +01:00
border-bottom: 1px solid $color-grey-4;
}
tbody {
border-bottom: 1px dashed $color-input-border;
tr {
border-top: 1px dashed $color-input-border;
&:first-child {
border-top: 1px dashed $color-input-border;
2014-07-24 16:11:45 +02:00
}
&:hover {
background-color: #fcfcfc;
}
}
tr.selected {
background-color: #c8eae9;
&:hover {
background-color: #b5e3e2;
}
}
}
2014-07-24 16:11:45 +02:00
&.full-width tbody {
border: 0;
}
2015-11-03 13:15:33 +01:00
&.chooser {
tbody .title a {
@include transition(none);
2015-11-03 13:15:33 +01:00
display: block;
}
2015-11-03 13:15:33 +01:00
tbody tr:hover {
background-color: $color-teal;
2015-11-03 13:15:33 +01:00
color: $color-white;
.title a,
2015-11-03 13:15:33 +01:00
.title a:hover {
color: $color-white;
}
2015-11-03 13:15:33 +01:00
.parent a {
color: $color-white;
}
.status-tag {
2015-11-03 13:15:33 +01:00
border-color: $color-white;
}
}
2015-11-03 13:15:33 +01:00
tbody tr.disabled td {
opacity: 0.25;
}
2015-11-03 13:15:33 +01:00
tbody tr.disabled td.children {
opacity: 1;
}
2015-11-03 13:15:33 +01:00
tbody tr.disabled:hover {
background-color: inherit;
color: inherit;
.title {
cursor: not-allowed;
}
2015-11-03 13:15:33 +01:00
.status-tag {
border-color: inherit;
}
}
}
&.small tbody tr {
font-size: 1em;
}
&.full-width .divider td {
padding-left: 20px;
}
2015-11-03 13:15:33 +01:00
// specific columns
.bulk {
padding-right: 0;
label {
font-size: 1em;
display: block;
width: 100%;
position: relative;
}
2015-11-03 13:15:33 +01:00
label span {
@include visuallyhidden();
}
2015-11-03 13:15:33 +01:00
input {
margin-top: 3px;
}
}
2014-03-07 16:41:17 +01:00
.title {
word-break: break-word;
.title-wrapper,
h2 {
text-transform: none;
margin: 0;
font-size: 1.15em;
font-weight: 600;
color: $color-text-base;
line-height: 1.5em;
a {
color: inherit;
text-decoration: none;
// stylelint-disable max-nesting-depth
&:hover {
color: $color-link;
}
}
}
}
.actions {
@include clearfix();
margin-top: 0.8em;
text-transform: uppercase;
margin-bottom: -0.5em;
font-size: 0.8rem;
a {
text-decoration: none;
}
2015-11-19 07:05:57 +01:00
> li {
float: left;
padding: 0 0.5em 0 0;
2015-11-03 13:15:33 +01:00
margin: 0 0 0.5em;
2015-11-19 07:05:57 +01:00
// line-height: 1em;
}
2014-03-07 16:41:17 +01:00
}
&--inline-actions .actions {
display: inline-block;
margin-top: 0;
vertical-align: inherit;
}
.button-secondary {
border-color: $color-grey-3;
2015-11-03 13:15:33 +01:00
background: $color-white;
2014-03-07 16:41:17 +01:00
&:hover {
border-color: $color-teal;
background-color: $color-teal;
}
}
.button-secondary {
2015-11-03 13:15:33 +01:00
background-color: $color-white;
}
.moderate-actions form {
float: left;
margin: 0 1em 1em 0;
}
.children,
.no-children {
2015-11-03 13:15:33 +01:00
padding: 0;
&:hover {
background-color: $color-grey-5;
}
2014-07-24 16:11:45 +02:00
a {
display: block;
padding: 2em 0;
2014-07-24 16:11:45 +02:00
}
}
.children a {
color: $color-teal;
display: block;
&:before {
font-size: 3rem;
}
}
2014-07-24 16:11:45 +02:00
.no-children a {
color: $color-grey-3;
display: block;
&:before {
font-size: 1.5rem;
}
2015-11-03 13:15:33 +01:00
&:hover,
&:focus {
color: $color-teal;
}
&:focus {
opacity: 1; //opacity is already changed on hover on the parent tr
}
}
2014-07-24 16:11:45 +02:00
&.small .children a:before {
font-size: 30px;
}
th.ord {
text-align: center;
2015-11-03 13:15:33 +01:00
.icon {
width: 15px;
height: 18px;
vertical-align: middle;
2015-11-03 13:15:33 +01:00
&::before {
margin-right: 2px;
}
}
&--active a,
a:hover {
color: $color-teal;
}
&--active .icon {
opacity: 1;
}
}
2015-11-03 13:15:33 +01:00
.handle {
cursor: move;
width: 20px;
&:before {
font-size: 20px;
color: $color-grey-3;
width: 1em;
}
2015-11-03 13:15:33 +01:00
&:hover:before {
color: $color-text-base;
}
}
.ui-sortable-helper {
border: 1px dashed $color-input-border;
border-width: 1px 0;
td {
display: none;
}
2015-11-03 13:15:33 +01:00
.ord,
.title {
display: table-cell;
}
}
2015-11-03 13:15:33 +01:00
.dropzone {
height: 80px;
background-color: $color-grey-1;
&:hover {
background-color: $color-grey-1;
}
2015-11-03 13:15:33 +01:00
td {
2015-11-03 13:15:33 +01:00
padding: 0;
}
}
table .no-results-message {
padding-left: 20px;
}
.unpublished .title-wrapper {
opacity: 0.7;
}
2014-03-07 16:41:17 +01:00
.index {
background-color: $color-grey-4;
2014-03-07 16:41:17 +01:00
.title .title-wrapper {
font-size: 1.2em;
opacity: 1;
2014-07-24 16:23:05 +02:00
a {
2014-03-07 16:41:17 +01:00
@include transition(opacity 0.2s ease);
}
2015-11-03 13:15:33 +01:00
a:hover {
opacity: 0.7;
2014-03-07 16:41:17 +01:00
}
}
2015-11-03 13:15:33 +01:00
.actions {
margin-top: 1em;
2014-03-07 16:41:17 +01:00
}
2015-11-03 13:15:33 +01:00
.button {
background-color: $color-white;
color: $color-teal;
2018-10-10 12:49:50 +02:00
border-color: rgba(0, 0, 0, 0.35);
2014-03-07 16:41:17 +01:00
&:hover {
2015-11-03 13:15:33 +01:00
color: $color-white;
background: $color-teal-darker;
border-color: $color-teal-darker;
2014-03-07 16:41:17 +01:00
}
2015-11-19 07:05:57 +01:00
&:active {
color: $color-white;
background: #333;
border-color: #333;
}
&.bicolor {
background: $color-teal-darker;
2015-11-19 07:05:57 +01:00
border: solid 1px darken($color-teal-darker, 10%);
&:active {
color: $color-white;
background: #484848;
border-color: #333;
}
2014-03-07 16:41:17 +01:00
}
}
}
.indicator {
margin-right: 0;
font-size: 1em;
opacity: 0.7;
}
&.images img {
@include transition(border-color 0.2s ease);
2015-11-03 13:15:33 +01:00
border: 3px solid $color-white;
}
}
2015-11-03 13:15:33 +01:00
.image-choice {
// Force the link to be displayed as a block, so its focus outline has the right shape.
display: block;
color: inherit;
overflow-wrap: break-word;
word-wrap: break-word;
}
ul.listing {
border-top: 1px dashed $color-input-border;
margin-bottom: 2em;
}
2015-11-03 13:15:33 +01:00
table.listing {
width: 100%;
}
2015-11-03 13:15:33 +01:00
// explorer specific tweaks
2014-03-07 16:41:17 +01:00
.page-explorer .listing {
position: relative;
.index {
2015-11-03 13:15:33 +01:00
color: $color-white;
background-color: $color-header-bg;
2014-03-07 16:41:17 +01:00
td {
padding-top: 1.5em;
padding-bottom: 1.5em;
}
2014-03-07 16:41:17 +01:00
.privacy-indicator {
font-size: 1em;
opacity: 1;
position: absolute;
right: 10%;
top: 2em;
}
2015-11-03 13:15:33 +01:00
.locked-indicator {
font-size: 0.8em;
2014-09-16 18:06:10 +02:00
}
.title {
h2 {
2015-11-03 13:15:33 +01:00
color: $color-white;
font-size: 1.8em;
font-weight: 500;
2014-03-07 16:41:17 +01:00
a:hover {
2015-11-03 13:15:33 +01:00
color: $color-white;
2014-03-07 16:41:17 +01:00
}
}
}
.button {
background-color: transparent;
color: $color-white;
2018-10-10 12:49:50 +02:00
border-color: rgba(0, 0, 0, 0.35);
&:hover {
color: $color-white;
background: $color-teal-darker;
}
&.bicolor {
background: $color-teal-darker;
}
2014-03-07 16:41:17 +01:00
}
}
.table-headers {
height: 35px;
2015-11-03 13:15:33 +01:00
.title {
padding-left: 0;
2014-03-07 16:41:17 +01:00
}
}
2015-11-03 13:15:33 +01:00
tbody .title {
padding-left: 0;
2014-03-07 16:41:17 +01:00
}
}
.pagination {
text-align: center;
2015-11-03 13:15:33 +01:00
p {
margin: 0;
}
2015-11-03 13:15:33 +01:00
ul {
@include unlist();
}
2015-11-03 13:15:33 +01:00
ul {
margin-top: -1.7em;
}
2015-11-03 13:15:33 +01:00
li {
line-height: 1em;
}
2015-11-03 13:15:33 +01:00
.prev {
float: left;
}
2015-11-03 13:15:33 +01:00
.next {
float: right;
}
}
.listing.full-width + .pagination {
2014-02-05 13:19:20 +01:00
margin-top: 3em;
border-top: 1px dashed #d9d9d9;
2015-11-03 13:15:33 +01:00
padding: 2em 50px 0;
2014-02-05 13:19:20 +01:00
}
2015-11-03 13:15:33 +01:00
// listing filters
.listing-filter {
@include clearfix();
background-color: $color-grey-5;
border-width: 1px 0;
margin: 3em 0;
}
2015-11-03 13:15:33 +01:00
.filter-title {
float: left;
text-transform: uppercase;
font-size: 0.95em;
padding: 1em;
2015-11-03 13:15:33 +01:00
margin: 0 1em 0 0;
background-color: $color-grey-4;
}
2015-11-03 13:15:33 +01:00
.filter-options {
@include unlist();
@include clearfix();
overflow: hidden;
li {
padding: 0.8em;
float: left;
}
}
@include media-breakpoint-up(sm) {
.listing {
&.horiz > li {
2015-11-03 13:15:33 +01:00
float: left;
}
2015-11-03 13:15:33 +01:00
&.images {
@include clearfix();
border: 1px solid $color-grey-4;
2015-11-03 13:15:33 +01:00
border-width: 0 0 0 1px;
> li {
padding: 1.3em;
width: 200px;
height: 220px;
text-align: center;
margin-top: -1px;
border: 1px solid $color-grey-4;
border-width: 1px 1px 1px 0;
.image {
text-align: center;
height: 180px;
&:before {
content: '';
display: inline-block;
height: 100%;
vertical-align: middle;
margin-right: -0.25em;
}
img {
display: inline-block;
vertical-align: middle;
}
}
&:hover {
2015-11-03 13:15:33 +01:00
background-color: #fdfdfd;
img {
border-color: $color-teal;
}
}
}
}
2015-11-03 13:15:33 +01:00
.actions {
2015-11-03 13:15:33 +01:00
visibility: hidden;
}
2015-11-03 13:15:33 +01:00
.index .actions {
visibility: visible;
}
2015-11-03 13:15:33 +01:00
2015-11-19 07:05:57 +01:00
td:hover .actions {
visibility: visible;
}
2015-11-03 13:15:33 +01:00
.no-children {
border-color: transparent;
a {
opacity: 0;
2014-07-24 16:11:45 +02:00
}
}
2015-11-03 13:15:33 +01:00
tr:hover .no-children a {
opacity: 1;
}
2015-11-03 13:15:33 +01:00
tr:hover .children {
background-color: $color-teal;
a:before {
2015-11-03 13:15:33 +01:00
color: $color-white;
}
}
td.children:hover {
background-color: $color-teal-darker;
}
2014-02-05 12:10:09 +01:00
table .no-results-message {
padding-left: 50px;
2014-02-05 12:10:09 +01:00
}
&.full-width td:first-child,
&.full-width th:first-child {
padding-left: 25px;
2014-02-05 12:10:09 +01:00
}
&.full-width .divider td {
padding-left: 50px;
2014-02-05 12:10:09 +01:00
}
}
}
2015-11-19 07:05:57 +01:00
// State
.listing__item--active {
> .actions {
visibility: visible;
}
}
2015-11-03 13:15:33 +01:00
// Transitions
.listing {
thead .dropdown ul {
@include transition(none);
}
2015-11-03 13:15:33 +01:00
.children,
.no-children {
@include transition(background-color 0.2s ease);
}
2015-11-03 13:15:33 +01:00
.children a,
.no-children a {
@include transition(all 0.2s ease);
}
2015-11-03 13:15:33 +01:00
}
// Ordering
td.ord {
.handle {
// Align with the row's title text, and the column's label.
2016-10-27 22:26:22 +02:00
margin-top: -28px;
margin-left: 13px;
}
}
table.listing {
th.ordered {
color: $color-teal;
&.ascending {
&:before {
content: '\25B2'; // up arrow
display: inline-block;
height: 100%;
vertical-align: middle;
}
}
&.descending {
&:before {
content: '\25BC'; // down arrow
display: inline-block;
height: 100%;
vertical-align: middle;
}
}
}
}