2019-01-02 00:11:47 +01:00
|
|
|
/*
|
|
|
|
TODO this chooser style has been made more generic based on two identical
|
|
|
|
methods for choosing pages and images that were previously included in their
|
|
|
|
own less files in each app directory (and since deleted). It would be best if
|
|
|
|
an admin 'theme' provided all the design for a UI in a single place, but
|
|
|
|
should that be a series of overrides to the css provided from an app? If so,
|
|
|
|
perhaps those two previous less files should be re-instated and then
|
2021-08-06 18:35:13 +02:00
|
|
|
overridden here? hmm.
|
2019-01-02 00:11:47 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
.chooser {
|
|
|
|
// We show the 'chosen' state...
|
|
|
|
@include clearfix();
|
|
|
|
|
|
|
|
input[type=text] {
|
|
|
|
float: left;
|
|
|
|
width: 50%;
|
|
|
|
margin-right: 1em;
|
|
|
|
}
|
|
|
|
|
|
|
|
.chosen {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
|
|
|
.unchosen,
|
|
|
|
.chosen {
|
|
|
|
position: relative;
|
|
|
|
|
2021-04-16 16:43:13 +02:00
|
|
|
.icon {
|
|
|
|
color: $color-grey-3;
|
|
|
|
@include svg-icon(2.5em);
|
|
|
|
vertical-align: middle;
|
|
|
|
margin-right: 0.625rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
// TODO: [icon-font] remove when the Wagtail icon font is removed
|
2019-01-02 00:11:47 +01:00
|
|
|
&:before {
|
|
|
|
vertical-align: middle;
|
|
|
|
font-family: wagtail;
|
|
|
|
content: '';
|
|
|
|
// position: relative
|
|
|
|
display: inline-block;
|
|
|
|
// float: left;
|
|
|
|
color: $color-grey-3;
|
|
|
|
line-height: 1em;
|
|
|
|
font-size: 2.5em;
|
|
|
|
margin-right: 0.3em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.unchosen {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.actions {
|
|
|
|
@include clearfix;
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
li {
|
|
|
|
float: left;
|
|
|
|
margin: 0.3em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ...unless the .page-chooser has the 'blank' class set
|
|
|
|
&.blank {
|
|
|
|
.chosen { display: none; }
|
|
|
|
|
|
|
|
.unchosen { display: block; }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// standard way of doing a chooser where the chosen object's title is overlaid
|
|
|
|
.page-chooser,
|
|
|
|
.snippet-chooser,
|
|
|
|
.document-chooser {
|
|
|
|
.chosen {
|
|
|
|
.title {
|
|
|
|
color: $color-grey-1;
|
|
|
|
// display: block;
|
|
|
|
padding-left: 1em;
|
|
|
|
display: inline-block;
|
|
|
|
}
|
|
|
|
|
|
|
|
.actions {
|
|
|
|
clear: both;
|
|
|
|
padding-top: 0.6em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-16 16:43:13 +02:00
|
|
|
// TODO: [icon-font] remove when the Wagtail icon font is removed
|
|
|
|
.page-chooser,
|
|
|
|
.snippet-chooser,
|
|
|
|
.document-chooser,
|
|
|
|
.image-chooser {
|
2019-01-02 00:11:47 +01:00
|
|
|
.unchosen,
|
|
|
|
.chosen {
|
|
|
|
&:before {
|
2021-04-16 16:43:13 +02:00
|
|
|
display: none;
|
2019-01-02 00:11:47 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.image-chooser {
|
|
|
|
.chosen {
|
|
|
|
padding-left: $thumbnail-width;
|
|
|
|
|
|
|
|
&:before {
|
2021-04-16 16:43:13 +02:00
|
|
|
display: inline-block;
|
2019-01-02 00:11:47 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.preview-image {
|
|
|
|
float: left;
|
|
|
|
margin-left: -($thumbnail-width);
|
|
|
|
margin-right: 1em;
|
|
|
|
max-width: $thumbnail-width;
|
|
|
|
|
|
|
|
// Resize standard Wagtail thumbnail size (165x165) to 130 for space-saving purposes.
|
|
|
|
// We could request a 130x130 rendition, but that's just unnecessary and burdens installations
|
|
|
|
// where images are store off-site with higher rendering times.
|
|
|
|
img {
|
|
|
|
max-width: $thumbnail-width;
|
|
|
|
max-height: $thumbnail-width;
|
|
|
|
height: auto;
|
|
|
|
width: auto;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|