mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-23 22:03:39 +00:00
Remove special page resource module handling
This is handled by MobileFrontend now, just as it should do. We rely on skinStyles where possible. Depends-On: I665f6fe60939475249786fdc951149c38473fda6 Bug: T173597 Change-Id: I0fe9efcf98bbd8e188d91a29d4cfda897d47808d
This commit is contained in:
parent
d5e09c91e9
commit
61ba76efdb
|
@ -106,7 +106,7 @@ class MinervaHooks {
|
|||
case 'CreateAccount':
|
||||
// FIXME: Note mobile.ajax.styles should not be necessary here.
|
||||
// It's used by the Captcha extension (see T162196)
|
||||
$out->addModuleStyles( [ 'mobile.ajax.styles', 'skins.minerva.special.userlogin.styles' ] );
|
||||
$out->addModuleStyles( [ 'mobile.ajax.styles' ] );
|
||||
// Add default warning message to Special:UserLogin and Special:UserCreate
|
||||
// if no warning message set.
|
||||
if (
|
||||
|
@ -117,9 +117,6 @@ class MinervaHooks {
|
|||
$request->setVal( 'warning', 'mobile-frontend-generic-login-new' );
|
||||
}
|
||||
break;
|
||||
case 'Search':
|
||||
$out->addModuleStyles( 'skins.minerva.special.search.styles' );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -264,8 +264,6 @@ class SkinMinerva extends SkinTemplate implements ICustomizableSkin {
|
|||
|
||||
if ( $title->isMainPage() ) {
|
||||
$className .= ' page-Main_Page ';
|
||||
} elseif ( $title->isSpecialPage() ) {
|
||||
$className .= ' mw-mf-special ';
|
||||
}
|
||||
|
||||
if ( $this->isAuthenticatedUser() ) {
|
||||
|
@ -1369,12 +1367,6 @@ class SkinMinerva extends SkinTemplate implements ICustomizableSkin {
|
|||
} elseif ( $this->getUserPageHelper()->isUserPage() ) {
|
||||
$styles[] = 'skins.minerva.userpage.styles';
|
||||
$styles[] = 'skins.minerva.userpage.icons';
|
||||
} elseif ( $title->isSpecialPage() ) {
|
||||
$styles[] = 'mobile.messageBox.styles';
|
||||
$styles['special'] = 'skins.minerva.special.styles';
|
||||
}
|
||||
if ( $this->getOutput()->getRequest()->getText( 'oldid' ) ) {
|
||||
$styles[] = 'mobile.messageBox.styles';
|
||||
}
|
||||
|
||||
return $styles;
|
||||
|
|
|
@ -1,63 +0,0 @@
|
|||
@import 'minerva.variables';
|
||||
@import 'minerva.mixins';
|
||||
|
||||
// FIXME: Apply these styles to all special pages
|
||||
.mw-mf-special #content {
|
||||
@verticalPadding: 0.5em;
|
||||
#section_0 {
|
||||
padding: @verticalPadding 0;
|
||||
text-align: center;
|
||||
font-size: 1.25em;
|
||||
font-weight: bold;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.pre-content {
|
||||
padding: 0;
|
||||
border-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// used in Special:Nearby and Special:UserLogin
|
||||
.errorbox,
|
||||
.error {
|
||||
color: @colorErrorText;
|
||||
background: @colorErrorBackground;
|
||||
}
|
||||
|
||||
.mw-mf-special {
|
||||
h1,
|
||||
h2 {
|
||||
font-family: @fontFamily;
|
||||
}
|
||||
|
||||
.content-header {
|
||||
padding: 0 0 20px;
|
||||
border-bottom: 1px solid @colorGray12;
|
||||
|
||||
h2 {
|
||||
padding: 0;
|
||||
font-size: 1.1em;
|
||||
font-weight: bold;
|
||||
border-bottom: 0;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
// don't apply these styles to headings in message boxes
|
||||
> h2 {
|
||||
text-align: center;
|
||||
margin: 0.7em 0;
|
||||
font-size: 1.1em;
|
||||
color: @grayMedium;
|
||||
}
|
||||
}
|
||||
|
||||
.error {
|
||||
h2 {
|
||||
margin-top: 0;
|
||||
text-transform: none;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
@import 'mediawiki.mixins.less';
|
||||
@import 'minerva.variables.less';
|
||||
@import 'minerva.mixins.less';
|
||||
|
||||
form {
|
||||
// FIXME: work out what to do with these
|
||||
#mw-prefs-restoreprefs {
|
||||
display: none;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
font-size: 0.9em;
|
||||
|
||||
.htmlform-tip {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mw-label,
|
||||
.mw-ui-checkbox {
|
||||
font-style: italic;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
legend {
|
||||
color: @grayMedium;
|
||||
font-size: 0.8em;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
margin: 0 0 1em 0.3em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// For old style forms
|
||||
// Special:MovePage?target=San%20Francisco
|
||||
// Special:Import
|
||||
// Special:NewPages
|
||||
// Special:RecentChanges
|
||||
// Special:Prefixindex
|
||||
// Special:Contributions
|
||||
// Special:ChangePassword
|
||||
// Special:ChangeEmail
|
||||
// Special:Allpages
|
||||
.mw-input [type='submit'],
|
||||
.mw-submit {
|
||||
margin-top: 8px;
|
||||
min-width: 80%;
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
( function ( M, $ ) {
|
||||
var WatchList = M.require( 'mobile.watchlist/WatchList' );
|
||||
|
||||
/**
|
||||
* Initialises JavaScript on Special:Watchlist
|
||||
* @method
|
||||
* @ignore
|
||||
*/
|
||||
function init() {
|
||||
var $watchlist = $( 'ul.page-list' );
|
||||
|
||||
// FIXME: find more elegant way to not show watchlist stars on recent changes
|
||||
if ( $( '.mw-mf-watchlist-selector' ).length === 0 ) {
|
||||
// eslint-disable-next-line no-new
|
||||
new WatchList( {
|
||||
api: new mw.Api(),
|
||||
el: $watchlist,
|
||||
funnel: 'watchlist',
|
||||
enhance: true
|
||||
} );
|
||||
$watchlist.find( '.page-summary .info' ).css( 'visibility', 'visible' );
|
||||
}
|
||||
// not needed now we have JS view which has infinite scrolling
|
||||
$( '.more' ).remove();
|
||||
}
|
||||
|
||||
$( function () {
|
||||
init();
|
||||
} );
|
||||
|
||||
}( mw.mobileFrontend, jQuery ) );
|
|
@ -1,8 +0,0 @@
|
|||
@import 'minerva.variables';
|
||||
@import 'minerva.mixins';
|
||||
|
||||
.client-js {
|
||||
.page-summary .info {
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
51
skin.json
51
skin.json
|
@ -36,6 +36,12 @@
|
|||
},
|
||||
"ResourceModuleSkinStyles": {
|
||||
"minerva": {
|
||||
"mediawiki.special.userlogin.common.styles": [
|
||||
"skinStyles/mediawiki.special.userlogin.common.styles/minerva.less"
|
||||
],
|
||||
"mediawiki.special.search.styles": [
|
||||
"skinStyles/mediawiki.special.search.styles/minerva.less"
|
||||
],
|
||||
"mediawiki.skinning.content.parsoid": [],
|
||||
"mediawiki.hlist": [
|
||||
"skinStyles/mediawiki.hlist/minerva.less"
|
||||
|
@ -47,6 +53,12 @@
|
|||
"skinStyles/mobile.startup/toast.less",
|
||||
"skinStyles/mobile.startup/Overlay.less"
|
||||
],
|
||||
"mediawiki.special": [
|
||||
"skinStyles/mobile.special.styles/minerva.less"
|
||||
],
|
||||
"mobile.special.styles": [
|
||||
"skinStyles/mobile.special.styles/minerva.less"
|
||||
],
|
||||
"mobile.toggle": [
|
||||
"skinStyles/mobile.toggle/minerva.less"
|
||||
],
|
||||
|
@ -239,45 +251,6 @@
|
|||
"resources/skins.minerva.mainMenu/MainMenu.js"
|
||||
]
|
||||
},
|
||||
"skins.minerva.special.styles": {
|
||||
"targets": "mobile",
|
||||
"position": "top",
|
||||
"styles": [
|
||||
"resources/skins.minerva.special.styles/common.less",
|
||||
"resources/skins.minerva.special.styles/forms.less"
|
||||
]
|
||||
},
|
||||
"skins.minerva.special.search.styles": {
|
||||
"targets": "mobile",
|
||||
"position": "top",
|
||||
"styles": [
|
||||
"resources/skins.minerva.special.search.styles/search.less"
|
||||
]
|
||||
},
|
||||
"skins.minerva.special.watchlist.styles": {
|
||||
"targets": "mobile",
|
||||
"position": "top",
|
||||
"styles": [
|
||||
"resources/skins.minerva.special.watchlist.styles/specialWatchlist.less"
|
||||
]
|
||||
},
|
||||
"skins.minerva.special.watchlist.scripts": {
|
||||
"targets": "mobile",
|
||||
"dependencies": [
|
||||
"mobile.startup",
|
||||
"mobile.watchlist"
|
||||
],
|
||||
"scripts": [
|
||||
"resources/skins.minerva.special.watchlist.scripts/watchlist.js"
|
||||
]
|
||||
},
|
||||
"skins.minerva.special.userlogin.styles": {
|
||||
"targets": "mobile",
|
||||
"position": "top",
|
||||
"styles": [
|
||||
"resources/skins.minerva.special.userlogin.styles/userlogin.less"
|
||||
]
|
||||
},
|
||||
"skins.minerva.scripts": {
|
||||
"targets": [
|
||||
"mobile",
|
||||
|
|
25
skinStyles/mobile.special.styles/minerva.less
Normal file
25
skinStyles/mobile.special.styles/minerva.less
Normal file
|
@ -0,0 +1,25 @@
|
|||
@import 'minerva.variables';
|
||||
|
||||
.ns-special {
|
||||
#content {
|
||||
@verticalPadding: 0.5em;
|
||||
#section_0 {
|
||||
padding: @verticalPadding 0;
|
||||
text-align: center;
|
||||
font-size: 1.25em;
|
||||
font-weight: bold;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.pre-content {
|
||||
padding: 0;
|
||||
border-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
h1,
|
||||
h2 {
|
||||
// Important given we have no idea which rules special pages are enforcing
|
||||
font-family: @fontFamily !important;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue