mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-17 21:04:11 +00:00
77a483086f
Displays a blurred version of the thumbnail while the actual image loads Displays a progress bar showing the image load progress Animates into focus once the actual image is loaded Change-Id: I2b8bc4691c20ffb5b3f16da9a8b9d6fd1796d784 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/146
383 lines
6.1 KiB
Plaintext
383 lines
6.1 KiB
Plaintext
/**
|
|
* Override multilightbox styles that don't apply to us
|
|
*/
|
|
.mlb-wrapper {
|
|
position: absolute;
|
|
bottom: auto;
|
|
}
|
|
|
|
.mlb-main {
|
|
height: auto;
|
|
|
|
.jq-fullscreened {
|
|
background-color: black;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Some variables
|
|
*/
|
|
@title-height: 64px;
|
|
@drag-height: 18px;
|
|
@bottom-height: (@title-height + @drag-height);
|
|
@metadata-background: rgb(251, 251, 251);
|
|
@progress-height: 3px;
|
|
|
|
.mlb-image-wrapper,
|
|
.mw-mlb-controls {
|
|
top: 0px;
|
|
bottom: @bottom-height;
|
|
}
|
|
|
|
.jq-fullscreened {
|
|
.mlb-image-wrapper,
|
|
.mlb-post-image,
|
|
.mw-mlb-controls {
|
|
bottom: 0px;
|
|
}
|
|
|
|
.mw-mlb-drag-affordance {
|
|
display: none;
|
|
}
|
|
|
|
.mlb-post-image,
|
|
.mlb-controls {
|
|
@fullscreen-padding: 10px;
|
|
padding: (@fullscreen-padding / 2) 0;
|
|
height: (@title-height + @fullscreen-padding);
|
|
background-color: rgba(251, 251, 251, 0);
|
|
transition: background-color 0.25s;
|
|
min-height: 0;
|
|
|
|
&:hover {
|
|
background-color: @metadata-background;
|
|
}
|
|
}
|
|
|
|
.mlb-post-image {
|
|
position: fixed;
|
|
}
|
|
|
|
.mlb-controls {
|
|
opacity: 0;
|
|
transition: opacity 0.25s;
|
|
|
|
&:hover {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
}
|
|
|
|
.cursor-hidden {
|
|
cursor: none;
|
|
}
|
|
|
|
.mlb-image-wrapper {
|
|
position: fixed;
|
|
}
|
|
|
|
.mlb-post-image {
|
|
bottom: auto;
|
|
height: auto;
|
|
background-color: @metadata-background;
|
|
position: absolute;
|
|
min-height: (@bottom-height + 1);
|
|
}
|
|
|
|
.mlb-controls {
|
|
height: auto;
|
|
border-bottom: 1px solid #cccccc;
|
|
}
|
|
|
|
.mw-mlb-controls {
|
|
border: none;
|
|
|
|
div {
|
|
border: none;
|
|
display: block;
|
|
}
|
|
}
|
|
|
|
body.mobile .mw-mlb-controls,
|
|
.mw-mlb-controls-position:hover .mw-mlb-controls {
|
|
display: block;
|
|
}
|
|
|
|
.mw-lightbox-title-div,
|
|
.mw-lightbox-extra-info-div {
|
|
text-align: left;
|
|
height: 50px;
|
|
position: absolute;
|
|
right: 0px;
|
|
left: 0px;
|
|
}
|
|
|
|
.mw-lightbox-title-div {
|
|
bottom: 0px;
|
|
}
|
|
|
|
.mw-lightbox-extra-info-div {
|
|
bottom: -50px;
|
|
}
|
|
|
|
.mw-lightbox-extra-info-div a,
|
|
.mw-lightbox-extra-info-div a:hover,
|
|
.mw-lightbox-extra-info-div a:visited,
|
|
.mw-lightbox-extra-info-div a:active,
|
|
.mw-lightbox-extra-info-div a:link {
|
|
text-decoration: none;
|
|
}
|
|
|
|
.mw-lightbox .lb-container {
|
|
position: absolute;
|
|
top: 0px;
|
|
bottom: 0px;
|
|
left: 0px;
|
|
right: 0px;
|
|
}
|
|
|
|
.mlb-overlay {
|
|
background-color: rgb(0,0,0);
|
|
}
|
|
|
|
.mw-mlb-license,
|
|
.mw-mlb-title-contain {
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.mw-mlb-title-para {
|
|
margin-bottom: 1px;
|
|
margin-top: 0px;
|
|
padding: 0px;
|
|
}
|
|
|
|
.mw-mlb-title {
|
|
font-size: 1.2em;
|
|
max-width: 60%;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.mw-mlb-image-metadata {
|
|
width: 100%;
|
|
background-color: #fbfbfb;
|
|
position: relative;
|
|
}
|
|
|
|
.jq-fullscreened .mw-mlb-image-metadata {
|
|
display: none;
|
|
}
|
|
|
|
.mw-mlb-image-desc-div {
|
|
width: 50%;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.mw-mlb-image-links-div {
|
|
width: 50%;
|
|
}
|
|
|
|
.mw-mlb-image-desc-div,
|
|
.mw-mlb-image-links-div {
|
|
display: inline-block;
|
|
vertical-align: top;
|
|
}
|
|
|
|
.mw-mlb-image-desc-div {
|
|
max-height: 150px;
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
@littlefont: 0.8em;
|
|
|
|
.mw-mlb-caption,
|
|
.mw-mlb-image-desc {
|
|
font-size: @littlefont;
|
|
color: #555555;
|
|
}
|
|
|
|
.mw-mlb-image-links {
|
|
li {
|
|
list-style: none;
|
|
font-size: @littlefont;
|
|
color: #3f4040;
|
|
|
|
&.empty {
|
|
display: none;
|
|
}
|
|
|
|
&:before {
|
|
display: inline-block;
|
|
vertical-align: middle;
|
|
height: 16px;
|
|
width: 16px;
|
|
content: ' ';
|
|
margin-right: 10px;
|
|
background-size: contain;
|
|
background-position: right center;
|
|
background-repeat: no-repeat;
|
|
}
|
|
|
|
&.mw-mlb-repo-li:before {
|
|
/* @embed */
|
|
background-image: url(img/repo.svg);
|
|
}
|
|
|
|
&.mw-mlb-datetime-li:before {
|
|
/* @embed */
|
|
background-image: url(img/time.svg);
|
|
}
|
|
|
|
&.mw-mlb-username-li:before {
|
|
/* @embed */
|
|
background-image: url(img/user-ltr.svg);
|
|
}
|
|
|
|
&.mw-mlb-location-li:before {
|
|
/* @embed */
|
|
background-image: url(img/location.svg);
|
|
}
|
|
|
|
&.empty:before {
|
|
background-image: none !important;
|
|
}
|
|
}
|
|
}
|
|
|
|
.mw-mlb-license,
|
|
.mw-mlb-title-credit {
|
|
display: inline-block;
|
|
}
|
|
|
|
.mw-mlb-title-credit {
|
|
width: 100%;
|
|
height: @title-height;
|
|
}
|
|
|
|
.mw-mlb-license {
|
|
color: #888888;
|
|
font-size: 0.9em;
|
|
padding-left: 10px;
|
|
vertical-align: baseline;
|
|
|
|
&.empty {
|
|
display: none;
|
|
}
|
|
|
|
&.cc-license:before {
|
|
background-size: contain;
|
|
/* @embed */
|
|
background-image: url(img/cc.svg);
|
|
display: inline-block;
|
|
vertical-align: text-bottom;
|
|
height: 20px;
|
|
width: 20px;
|
|
content: ' ';
|
|
margin-right: 5px;
|
|
}
|
|
}
|
|
|
|
.mw-mlb-license-contain,
|
|
.mw-mlb-license {
|
|
text-align: right;
|
|
}
|
|
|
|
.mw-mlb-title-para,
|
|
.mw-mlb-credit,
|
|
.mw-mlb-image-desc,
|
|
.mw-mlb-caption {
|
|
padding-left: 20px;
|
|
}
|
|
|
|
.mw-mlb-image-desc-div.empty .mw-mlb-image-desc {
|
|
color: rgb(136, 136, 136);
|
|
font-style: italic;
|
|
}
|
|
|
|
.mw-mlb-caption.empty {
|
|
display: none;
|
|
}
|
|
|
|
.mw-mlb-mmv-about-links {
|
|
font-size: @littlefont;
|
|
padding: 20px;
|
|
width: 50%;
|
|
}
|
|
|
|
.mlb-image.empty img {
|
|
display: none;
|
|
}
|
|
|
|
.mlb-image img.blurred {
|
|
/**
|
|
* SVG is for Firefox
|
|
* Cannot be embedded because of the hash needed to access the filter inside the SVG
|
|
*/
|
|
filter: url(img/blur.svg#gaussian-blur);
|
|
filter: blur(3px);
|
|
-webkit-filter: blur(3px);
|
|
opacity: 0.8;
|
|
}
|
|
|
|
body.mw-mlb-lightbox-open {
|
|
overflow-y: auto;
|
|
}
|
|
|
|
body.mw-mlb-lightbox-open #mw-page-base,
|
|
body.mw-mlb-lightbox-open #mw-head-base,
|
|
body.mw-mlb-lightbox-open #mw-navigation,
|
|
body.mw-mlb-lightbox-open #mw-footer,
|
|
body.mw-mlb-lightbox-open #content {
|
|
/** Stop the article from scrolling in the background */
|
|
display: none;
|
|
}
|
|
|
|
.mw-mlb-drag-affordance {
|
|
width: 100%;
|
|
height: @drag-height;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.mw-mlb-drag-icon {
|
|
width: 64px;
|
|
height: @drag-height;
|
|
/* @embed */
|
|
background-image: url(img/drag.svg);
|
|
background-repeat: no-repeat;
|
|
background-position: center bottom;
|
|
margin: 0 auto;
|
|
opacity: 0.6;
|
|
transition: opacity 0.25s;
|
|
|
|
&.pointing-down {
|
|
background-position: center top;
|
|
transform: rotate(180deg);
|
|
-moz-transform: rotate(180deg);
|
|
-o-transform: rotate(180deg);
|
|
-webkit-transform: rotate(180deg);
|
|
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2.0);
|
|
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2.0)";
|
|
}
|
|
}
|
|
|
|
.mlb-post-image:hover .mw-mlb-drag-icon {
|
|
opacity: 1;
|
|
}
|
|
|
|
.mw-mlb-progress {
|
|
width: 100%;
|
|
height: @progress-height;
|
|
background-color: rgb( 204, 204, 204 );
|
|
margin-top: -@progress-height;
|
|
}
|
|
|
|
.mw-mlb-progress.empty {
|
|
display: none;
|
|
}
|
|
|
|
.mw-mlb-progress-percent {
|
|
width: 0;
|
|
height: @progress-height;
|
|
background-color: rgb( 0, 113, 188 );
|
|
}
|