mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-17 12:53:24 +00:00
2ac50f49bf
With latest refactorings, the animatin looked like a glitch. The position of the panel has been adjusted to (a) make the initial position the same as shown while the progress bar for better continuity, and (b) make the move more noticeable by increasing the distance the panel moves. To test, clear the local storage variable mmv.hasOpenedMetadata Change-Id: Ie3ed29826fa15bf4c6b38f0fc8bde4bd84563fb9
352 lines
5.7 KiB
Plaintext
352 lines
5.7 KiB
Plaintext
@import "../mmv.globals";
|
|
@import "../mmv.mixins";
|
|
@import "mediawiki.mixins.animation";
|
|
|
|
@info-box-color: #FFFFFF;
|
|
@info-box-border-color: #DDDDDD;
|
|
@info-box-border-shadow-color: #C9C9C9;
|
|
|
|
@secondary-text-color: rgb(136, 136, 136);
|
|
|
|
.mw-mmv-info-box {
|
|
display: inline-block;
|
|
overflow: hidden;
|
|
|
|
border: 1px solid @info-box-border-color;
|
|
border-bottom: 2px solid @info-box-border-shadow-color;
|
|
.box-round(3px);
|
|
|
|
background-color: @info-box-color;
|
|
}
|
|
|
|
.mw-mmv-post-image {
|
|
.animation( mw-mmv-appear-animation 0.5s ease 0s 1 normal forwards );
|
|
&.invite {
|
|
.animation( mw-mmv-invite-animation 0.5s ease 0s 1 normal forwards );
|
|
}
|
|
}
|
|
|
|
.mw-mmv-appear-animation() {
|
|
0% {
|
|
opacity: 0.6;
|
|
}
|
|
50% {
|
|
opacity: 0.9;
|
|
}
|
|
100% {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
@-webkit-keyframes mw-mmv-appear-animation {
|
|
.mw-mmv-appear-animation;
|
|
}
|
|
|
|
@-moz-keyframes mw-mmv-appear-animation {
|
|
.mw-mmv-appear-animation;
|
|
}
|
|
|
|
@-o-keyframes mw-mmv-appear-animation {
|
|
.mw-mmv-appear-animation;
|
|
}
|
|
|
|
@keyframes mw-mmv-appear-animation {
|
|
.mw-mmv-appear-animation;
|
|
}
|
|
|
|
.mw-mmv-invite-animation() {
|
|
0% {
|
|
margin-top: 0px;
|
|
}
|
|
50% {
|
|
margin-top: -15px;
|
|
}
|
|
100% {
|
|
margin-top: 0;
|
|
}
|
|
}
|
|
|
|
@-webkit-keyframes mw-mmv-invite-animation {
|
|
.mw-mmv-invite-animation;
|
|
}
|
|
|
|
@-moz-keyframes mw-mmv-invite-animation {
|
|
.mw-mmv-invite-animation;
|
|
}
|
|
|
|
@-o-keyframes mw-mmv-invite-animation {
|
|
.mw-mmv-invite-animation;
|
|
}
|
|
|
|
@keyframes mw-mmv-invite-animation {
|
|
.mw-mmv-invite-animation;
|
|
}
|
|
|
|
.mw-mmv-title-contain {
|
|
position: relative;
|
|
}
|
|
|
|
.mw-mmv-license,
|
|
.mw-mmv-title-contain {
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.mw-mmv-title-para {
|
|
margin-bottom: 1px;
|
|
margin-top: 0px;
|
|
padding: 0px;
|
|
}
|
|
|
|
.mw-mmv-title {
|
|
font-size: 1.2em;
|
|
max-width: 60%;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.mw-mmv-image-metadata {
|
|
width: 100%;
|
|
background-color: #fbfbfb;
|
|
position: relative;
|
|
padding-top: 10px;
|
|
}
|
|
|
|
.jq-fullscreened .mw-mmv-image-metadata {
|
|
display: none;
|
|
}
|
|
|
|
.mw-mmv-image-desc-div {
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.mw-mmv-image-desc-div,
|
|
.mw-mmv-image-links-div {
|
|
display: inline-block;
|
|
vertical-align: top;
|
|
}
|
|
|
|
.mw-mmv-image-desc-div {
|
|
max-height: 150px;
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
@littlefont: 0.85em;
|
|
@mediumfont: 1em;
|
|
|
|
.mw-mmv-caption,
|
|
.mw-mmv-image-desc {
|
|
font-size: @mediumfont;
|
|
color: #555555;
|
|
}
|
|
|
|
.mw-mmv-image-links {
|
|
margin: 0 20px;
|
|
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-mmv-datetime-li:before {
|
|
/* @embed */
|
|
background-image: url(img/time.svg);
|
|
}
|
|
|
|
&.mw-mmv-username-li:before {
|
|
/* @embed */
|
|
background-image: url(img/user-ltr.svg);
|
|
}
|
|
|
|
&.mw-mmv-location-li:before {
|
|
/* @embed */
|
|
background-image: url(img/location.svg);
|
|
}
|
|
|
|
&.mw-mmv-repo-li:before {
|
|
display: none;
|
|
}
|
|
|
|
&.empty:before {
|
|
background-image: none !important;
|
|
}
|
|
}
|
|
}
|
|
|
|
.mw-mmv-repo-li {
|
|
@padding: 5px;
|
|
@icon-size: 16px;
|
|
|
|
display: block;
|
|
min-height: @icon-size;
|
|
border: 1px solid @info-box-border-color;
|
|
.box-round(5px);
|
|
padding: @padding;
|
|
padding-left: @icon-size + 2 * @padding;
|
|
margin-top: 10px;
|
|
|
|
/* @embed */
|
|
background-image: url(img/repo.svg);
|
|
background-repeat: no-repeat;
|
|
background-size: auto @icon-size;
|
|
background-position: @padding center;
|
|
background-color: @info-box-color;
|
|
|
|
line-height: 1.3;
|
|
|
|
&.commons { // there is an extra subtitle for Commons images, box should be larger
|
|
/* @embed */
|
|
background-image: url(img/commons.svg);
|
|
@icon-size: 32px;
|
|
min-height: @icon-size;
|
|
padding-left: @icon-size + 2 * @padding;
|
|
background-size: auto @icon-size;
|
|
background-position: (@padding + 4px) center;
|
|
}
|
|
|
|
.mw-mmv-repo,
|
|
.mw-mmv-repo-subtitle {
|
|
display: block;
|
|
}
|
|
|
|
.mw-mmv-repo-subtitle {
|
|
color: @secondary-text-color;
|
|
font-size: small;
|
|
}
|
|
}
|
|
|
|
.mw-mmv-title-credit {
|
|
height: @metadatabar-top-content-height;
|
|
}
|
|
|
|
.mw-mmv-license {
|
|
color: #888888;
|
|
font-size: 0.9em;
|
|
padding-left: 10px;
|
|
|
|
&.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-mmv-license-contain,
|
|
.mw-mmv-license {
|
|
text-align: right;
|
|
}
|
|
|
|
// These are single-line; make sure it looks sane when they are too long
|
|
.mw-mmv-title-para,
|
|
.mw-mmv-credit {
|
|
overflow: hidden;
|
|
padding-right: 20px;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.mw-mmv-title-para,
|
|
.mw-mmv-credit,
|
|
.mw-mmv-image-desc,
|
|
.mw-mmv-caption {
|
|
padding-left: 20px;
|
|
}
|
|
|
|
.mw-mmv-image-desc-div.empty .mw-mmv-image-desc {
|
|
color: @secondary-text-color;
|
|
font-style: italic;
|
|
}
|
|
|
|
.mw-mmv-caption.empty {
|
|
display: none;
|
|
}
|
|
|
|
.mw-mmv-about-links {
|
|
font-size: @littlefont;
|
|
padding: 20px;
|
|
width: 50%;
|
|
}
|
|
|
|
.mw-mmv-drag-affordance {
|
|
width: 100%;
|
|
height: @metadatabar-drag-height;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.mw-mmv-drag-icon {
|
|
width: 64px;
|
|
height: @metadatabar-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;
|
|
.rotate(180deg);
|
|
}
|
|
}
|
|
|
|
.mw-mmv-post-image:hover .mw-mmv-drag-icon {
|
|
opacity: 1;
|
|
}
|
|
|
|
.mw-mmv-label {
|
|
color: #333333;
|
|
margin-left: 6px;
|
|
.box-round(3px);
|
|
padding: 2px 5px;
|
|
background-color: #dddddd;
|
|
font-size: 0.9em;
|
|
&:hover {
|
|
background-color: #c9c9c9;
|
|
}
|
|
}
|
|
|
|
.mw-mmv-image-metadata-column {
|
|
float: left;
|
|
}
|
|
|
|
.mw-mmv-image-metadata-desc-column {
|
|
width: 66.5%;
|
|
}
|
|
|
|
.mw-mmv-image-metadata-links-column {
|
|
width: 33.5%;
|
|
}
|
|
|
|
.mw-mmv-permission-link {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.mw-mmv-about-links {
|
|
clear: both;
|
|
}
|