mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
Res: Add resources from xowa_app_windows_64_v4.5.26.1810
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
( function ( mw, $ ) {
|
||||
var $wpbBannerImageContainer = $( '.wpb-topbanner' ),
|
||||
$img = $( 'img.wpb-banner-image' );
|
||||
|
||||
function positionBanner( $container ) {
|
||||
/**
|
||||
* Javascript to fine tune position of banner according to position coordinates.
|
||||
*/
|
||||
// extract position parameters
|
||||
var maxOffsetTop, offsetTop, maxOffsetLeft, offsetLeft,
|
||||
minOffsetTop = 0,
|
||||
minOffsetLeft = 0,
|
||||
$wpbBannerImage = $container.find( '.wpb-banner-image' ),
|
||||
totalOffsetX = 0,
|
||||
totalOffsetY = 0,
|
||||
centerX = $wpbBannerImage.data( 'pos-x' ),
|
||||
centerY = $wpbBannerImage.data( 'pos-y' );
|
||||
// reset translations applied by css
|
||||
$wpbBannerImage.css( {
|
||||
transform: 'translate(0)',
|
||||
MozTransform: 'translate(0)',
|
||||
WebkitTransform: 'translate(0)',
|
||||
msTransform: 'translate(0)',
|
||||
'margin-left': 0,
|
||||
'margin-top': 0
|
||||
} );
|
||||
// Adjust vertical focus
|
||||
if ( $wpbBannerImage.height() > $container.height() ) {
|
||||
// this is the max shift up that can be achieved without leaving blank space below
|
||||
maxOffsetTop = $wpbBannerImage.height() -
|
||||
$container.height();
|
||||
// offset beyond center 0
|
||||
offsetTop = centerY * $wpbBannerImage.height() / 2;
|
||||
// offset for default center is maxOffsetTop/2
|
||||
// total offset = offset for center + manual offset
|
||||
totalOffsetY = maxOffsetTop / 2 + offsetTop;
|
||||
// shift the banner no more than maxOffsets on either side
|
||||
if ( totalOffsetY > maxOffsetTop ) {
|
||||
totalOffsetY = maxOffsetTop;
|
||||
} else if ( totalOffsetY < minOffsetTop ) {
|
||||
totalOffsetY = minOffsetTop;
|
||||
}
|
||||
}
|
||||
// Adjust horizontal focus
|
||||
if ( $wpbBannerImage.width() > $container.width() ) {
|
||||
// this is the max shift that can be achieved without leaving blank space
|
||||
maxOffsetLeft = $wpbBannerImage.width() -
|
||||
$container.width();
|
||||
// offset beyond center 0
|
||||
offsetLeft = centerX * $wpbBannerImage.width() / 2;
|
||||
// offset for default center is maxOffsetLeft/2
|
||||
// total offset = offset for center + manual offset
|
||||
totalOffsetX = maxOffsetLeft / 2 + offsetLeft;
|
||||
// shift the banner no more than maxOffsets on either side
|
||||
if ( totalOffsetX > maxOffsetLeft ) {
|
||||
totalOffsetX = maxOffsetLeft;
|
||||
} else if ( totalOffsetX < minOffsetLeft ) {
|
||||
totalOffsetX = minOffsetLeft;
|
||||
}
|
||||
}
|
||||
// shift the banner horizontally and vertically by the offsets calculated above
|
||||
$wpbBannerImage.css( {
|
||||
'margin-top': -totalOffsetY,
|
||||
'margin-left': -totalOffsetX
|
||||
} );
|
||||
}
|
||||
$( window ).on( 'resize', $.debounce(
|
||||
100,
|
||||
function () {
|
||||
positionBanner( $wpbBannerImageContainer );
|
||||
}
|
||||
) );
|
||||
// set focus after image has loaded
|
||||
$img.load( function () {
|
||||
positionBanner( $wpbBannerImageContainer );
|
||||
} );
|
||||
// Image might be cached
|
||||
if ( $img.length && $img[ 0 ].complete ) {
|
||||
positionBanner( $wpbBannerImageContainer );
|
||||
}
|
||||
// Expose interface for testing.
|
||||
mw.wpb = {
|
||||
positionBanner: positionBanner
|
||||
};
|
||||
}( mediaWiki, jQuery ) );
|
||||
@@ -0,0 +1,16 @@
|
||||
/* Reset style on print */
|
||||
.ext-wpb-pagebanner {
|
||||
.wpb-topbanner .wpb-name {
|
||||
position: initial;
|
||||
margin: 0;
|
||||
background: none;
|
||||
color: initial;
|
||||
padding: initial;
|
||||
line-height: initial;
|
||||
font-size: 1.8em;
|
||||
}
|
||||
|
||||
.image, .wpb-iconbox, .wpb-topbanner-toc {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
/**
|
||||
* Stylesheet for page-wide Banner in WikidataPageBanner extension.
|
||||
*/
|
||||
.ext-wpb-pagebanner {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 1em 0;
|
||||
}
|
||||
.wpb-topbanner {
|
||||
position: relative;
|
||||
max-width: 1800px;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
max-height: 300px;
|
||||
}
|
||||
.ext-wpb-pagebanner .wpb-topbanner .wpb-name {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
margin: 0.6em 0 0 0.4em;
|
||||
padding: 8px 7px;
|
||||
font-size: 1em;
|
||||
font-weight: bold;
|
||||
background: none repeat scroll 0% 0% rgba(0, 0, 0, 0.3);
|
||||
border-radius: 4px;
|
||||
color: white;
|
||||
white-space: nowrap;
|
||||
line-height: 0.9em;
|
||||
overflow: hidden;
|
||||
-webkit-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 95%;
|
||||
}
|
||||
.wpb-topbanner .wpb-banner-image {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.wpb-iconbox {
|
||||
top: 0;
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
padding: 3px;
|
||||
z-index: 3;
|
||||
background: rgba(0, 0, 0, 0.7) none repeat scroll 0% 0%;
|
||||
border-bottom-left-radius: 5px;
|
||||
}
|
||||
.wpb-iconbox p {
|
||||
float: left;
|
||||
}
|
||||
@media screen and (min-width: 768px) {
|
||||
.ext-wpb-pagebanner .wpb-topbanner .wpb-name {
|
||||
font-size: 2.2em;
|
||||
white-space: normal;
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 400px) {
|
||||
.wpb-topbanner {
|
||||
/**
|
||||
* The rules below define custom positioning for banner in case the cropped banner needs to be
|
||||
* shifted to allow focus to a different area
|
||||
*/
|
||||
}
|
||||
.wpb-topbanner .wpb-banner-image {
|
||||
max-width: none !important;
|
||||
width: auto;
|
||||
min-height: 180px;
|
||||
margin-left: 50%;
|
||||
-webkit-transform: translateX(-50%);
|
||||
-moz-transform: translateX(-50%);
|
||||
-o-transform: translateX(-50%);
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
.wpb-topbanner .wpb-left {
|
||||
-webkit-transform: translateX(-25%);
|
||||
-moz-transform: translateX(-25%);
|
||||
-o-transform: translateX(-25%);
|
||||
transform: translateX(-25%);
|
||||
}
|
||||
.wpb-topbanner .wpb-right {
|
||||
-webkit-transform: translateX(-75%);
|
||||
-moz-transform: translateX(-75%);
|
||||
-o-transform: translateX(-75%);
|
||||
transform: translateX(-75%);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
/**
|
||||
* Stylesheet for page-wide Banner in WikidataPageBanner extension.
|
||||
*/
|
||||
@import "mediawiki.mixins";
|
||||
.transform ( ... ) {
|
||||
-webkit-transform: @arguments;
|
||||
-moz-transform: @arguments;
|
||||
-o-transform: @arguments;
|
||||
transform: @arguments;
|
||||
}
|
||||
|
||||
.ext-wpb-pagebanner {
|
||||
position: relative;
|
||||
width:100%;
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
.wpb-topbanner{
|
||||
position: relative;
|
||||
max-width: 1800px;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
// rule for banners whose height may be much due to a different aspect ratio other than
|
||||
// Wikivoyage banners
|
||||
max-height: 300px;
|
||||
}
|
||||
|
||||
.ext-wpb-pagebanner .wpb-topbanner .wpb-name {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
// make banner heading more specific so that this rule overrides skin's styling of h1
|
||||
margin: 0.6em 0 0 0.4em;
|
||||
padding: 8px 7px;
|
||||
font-size: 1em;
|
||||
font-weight: bold;
|
||||
background: none repeat scroll 0% 0% rgba(0, 0, 0, 0.3);
|
||||
border-radius: 4px;
|
||||
color: white;
|
||||
white-space: nowrap;
|
||||
line-height: 0.9em;
|
||||
// hide text exceeding the line
|
||||
overflow: hidden;
|
||||
-webkit-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 95%;
|
||||
}
|
||||
|
||||
.wpb-topbanner .wpb-banner-image{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.wpb-iconbox{
|
||||
top: 0;
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
padding: 3px;
|
||||
z-index: 3;
|
||||
background: rgba(0, 0, 0, 0.7) none repeat scroll 0% 0%;
|
||||
border-bottom-left-radius: 5px;
|
||||
// each <a> link of icon will be wrapped in a <p> tag by mustache, so float them left
|
||||
p {
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
|
||||
// disable heading wrapping on large screen
|
||||
@media screen and ( min-width: 768px ) {
|
||||
.ext-wpb-pagebanner .wpb-topbanner .wpb-name {
|
||||
font-size: 2.2em;
|
||||
white-space: normal;
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
|
||||
// banner enlargement and faking banner cropping for small screens
|
||||
@media screen and ( max-width: 400px ) {
|
||||
.wpb-topbanner {
|
||||
.wpb-banner-image {
|
||||
// this rule overrides the max-width:100% rule for images in Skin Minerva so that banner
|
||||
// can be increased in size for increasing the height accordingly. The overflowing
|
||||
// banner is cropped by setting overflow hidden on containing element
|
||||
max-width: none !important;
|
||||
width: auto;
|
||||
// Banners on mobile screens should be using the origin parameter and be at least 180px in height
|
||||
min-height: 180px;
|
||||
// centre the banner by default
|
||||
margin-left: 50%;
|
||||
.transform ( translateX( -50% ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* The rules below define custom positioning for banner in case the cropped banner needs to be
|
||||
* shifted to allow focus to a different area
|
||||
*/
|
||||
|
||||
.wpb-left{
|
||||
.transform ( translateX( -25% ) );
|
||||
}
|
||||
|
||||
.wpb-right{
|
||||
.transform ( translateX( -75% ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Style tweaks for page-wide Banner in WikidataPageBanner extension for Skin Minerva.
|
||||
*/
|
||||
@import "mediawiki.mixins";
|
||||
|
||||
// mobile 62.5 corresponds to @wgMFDeviceWidthDesktop in MobileFrontend
|
||||
// FIXME: Use less variable when https://phabricator.wikimedia.org/T93675 resolved
|
||||
@media (max-width: 62.5em) {
|
||||
.ext-wpb-pagebanner.pre-content {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.ext-wpb-pagebanner {
|
||||
clear: both;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
.ext-wpb-pagebanner .wpb-bottomtoc {
|
||||
position: relative;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
.ext-wpb-pagebanner {
|
||||
.wpb-bottomtoc {
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
/**
|
||||
* Stylesheet for Table Of Contents in Banners displayed by WikidataPageBanner extension.
|
||||
* All style rules have been applied with a prefix of wrapping .banner-toc, so cloning the original
|
||||
* toc and styling the clone will have no side-effects
|
||||
*/
|
||||
.wpb-topbanner-toc {
|
||||
display: none;
|
||||
}
|
||||
@media screen and (min-width: 768px) {
|
||||
.wpb-topbanner-toc {
|
||||
display: block;
|
||||
position: absolute;
|
||||
background: rgba(0, 0, 0, 0.5) none repeat scroll 0% 0%;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
font-size: .875em;
|
||||
}
|
||||
.wpb-banner-toc {
|
||||
display: table;
|
||||
color: white;
|
||||
background: none;
|
||||
border: medium none;
|
||||
line-height: 1.6em;
|
||||
padding: .2em 2em;
|
||||
margin: 0;
|
||||
width: auto;
|
||||
}
|
||||
.wpb-banner-toc .tocnumber {
|
||||
display: none;
|
||||
}
|
||||
.wpb-banner-toc > div > ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
background: rgba(0, 0, 0, 0.6) none repeat scroll 0% 0%;
|
||||
z-index: 4;
|
||||
}
|
||||
.wpb-banner-toc a,
|
||||
.wpb-banner-toc a:visited,
|
||||
.wpb-banner-toc a:active {
|
||||
display: block;
|
||||
color: white;
|
||||
font-size: .8em;
|
||||
font-weight: bold;
|
||||
}
|
||||
.wpb-banner-toc a:hover {
|
||||
color: #BDDDFD;
|
||||
}
|
||||
.wpb-banner-toc li {
|
||||
position: relative;
|
||||
padding: 0 .4em;
|
||||
margin: 0;
|
||||
}
|
||||
.wpb-banner-toc li > ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
background: rgba(0, 0, 0, 0.6) none repeat scroll 0% 0%;
|
||||
z-index: 4;
|
||||
}
|
||||
.wpb-banner-toc li:hover {
|
||||
background: rgba(0, 0, 0, 0.8) none repeat scroll 0% 0%;
|
||||
}
|
||||
.wpb-banner-toc li:hover > ul > li {
|
||||
display: block;
|
||||
}
|
||||
.wpb-banner-toc .toclevel-2,
|
||||
.wpb-banner-toc .toclevel-3,
|
||||
.wpb-banner-toc .toclevel-4,
|
||||
.wpb-banner-toc .toclevel-5,
|
||||
.wpb-banner-toc .toclevel-6 {
|
||||
display: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.wpb-banner-toc .toclevel-1 {
|
||||
float: left;
|
||||
}
|
||||
.wpb-banner-toc .toclevel-1 > ul {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
}
|
||||
.wpb-banner-toc .toclevel-2 ul {
|
||||
position: absolute;
|
||||
left: 100%;
|
||||
top: 0;
|
||||
}
|
||||
.wpb-banner-toc #toctitle {
|
||||
display: none;
|
||||
}
|
||||
.toc,
|
||||
#toc {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
/**
|
||||
* Stylesheet for Table Of Contents in Banners displayed by WikidataPageBanner extension.
|
||||
* All style rules have been applied with a prefix of wrapping .banner-toc, so cloning the original
|
||||
* toc and styling the clone will have no side-effects
|
||||
*/
|
||||
.wpb-topbanner-toc {
|
||||
display: none;
|
||||
}
|
||||
@media screen and (min-width: 768px) {
|
||||
.wpb-topbanner-toc {
|
||||
display: block;
|
||||
position: absolute;
|
||||
background: rgba(0, 0, 0, 0.5) none repeat scroll 0% 0%;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
font-size: .875em;
|
||||
}
|
||||
.wpb-banner-toc {
|
||||
display: table;
|
||||
color: white;
|
||||
background: none;
|
||||
border: medium none;
|
||||
line-height: 1.6em;
|
||||
padding: .2em 2em;
|
||||
margin: 0;
|
||||
width: auto;
|
||||
}
|
||||
.wpb-banner-toc .tocnumber {
|
||||
display: none;
|
||||
}
|
||||
.wpb-banner-toc > div > ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
background: rgba(0, 0, 0, 0.6) none repeat scroll 0% 0%;
|
||||
z-index: 4;
|
||||
}
|
||||
.wpb-banner-toc a,
|
||||
.wpb-banner-toc a:visited,
|
||||
.wpb-banner-toc a:active {
|
||||
display: block;
|
||||
color: white;
|
||||
font-size: .8em;
|
||||
font-weight: bold;
|
||||
}
|
||||
.wpb-banner-toc a:hover {
|
||||
color: #BDDDFD;
|
||||
}
|
||||
.wpb-banner-toc li {
|
||||
position: relative;
|
||||
padding: 0 .4em;
|
||||
margin: 0;
|
||||
}
|
||||
.wpb-banner-toc li > ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
background: rgba(0, 0, 0, 0.6) none repeat scroll 0% 0%;
|
||||
z-index: 4;
|
||||
}
|
||||
.wpb-banner-toc li:hover {
|
||||
background: rgba(0, 0, 0, 0.8) none repeat scroll 0% 0%;
|
||||
}
|
||||
.wpb-banner-toc li:hover > ul > li {
|
||||
display: block;
|
||||
}
|
||||
.wpb-banner-toc .toclevel-2,
|
||||
.wpb-banner-toc .toclevel-3,
|
||||
.wpb-banner-toc .toclevel-4,
|
||||
.wpb-banner-toc .toclevel-5,
|
||||
.wpb-banner-toc .toclevel-6 {
|
||||
display: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.wpb-banner-toc .toclevel-1 {
|
||||
float: left;
|
||||
}
|
||||
.wpb-banner-toc .toclevel-1 > ul {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
}
|
||||
.wpb-banner-toc .toclevel-2 ul {
|
||||
position: absolute;
|
||||
left: 100%;
|
||||
top: 0;
|
||||
}
|
||||
.wpb-banner-toc #toctitle {
|
||||
display: none;
|
||||
}
|
||||
.toc,
|
||||
#toc {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
/*
|
||||
* Minerva styles for table of Contents inside banner added by WikidataPageBanner extension
|
||||
*/
|
||||
// Hide banner toc on Skin Minerva
|
||||
.wpb-topbanner-toc {
|
||||
display: none;
|
||||
}
|
||||
Reference in New Issue
Block a user