jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/403913 )
Change subject: Allow loading custom CSS for the landing page
......................................................................
Allow loading custom CSS for the landing page
Currently, the community is trying to customize the look of the page
with {{hidden title}} which ends up just looking awkward and doesn't
remove other unneeded parts of the page like the subheader and the
categories.
See https://en.wikipedia.org/wiki/Wikipedia:New_user_landing_page.
Change-Id: I61c6fb9e3561f5a261fa5d1348e7df4299488fef
---
M extension.json
M includes/Hooks.php
A modules/ext.acw.landingPage.css
3 files changed, 18 insertions(+), 0 deletions(-)
Approvals:
MaxSem: Looks good to me, approved
jenkins-bot: Verified
diff --git a/extension.json b/extension.json
index 4c3b73f..ec0fb15 100644
--- a/extension.json
+++ b/extension.json
@@ -32,6 +32,11 @@
"scripts": [
"ext.acw.eventlogging.js"
]
+ },
+ "ext.acw.landingPageStyles": {
+ "styles": [
+ "ext.acw.landingPage.css"
+ ]
}
},
"config": {
@@ -51,6 +56,10 @@
}
},
"merge_strategy": "array_plus_2d"
+ },
+ "UseCustomLandingPageStyles": {
+ "description": "Whether to load custom CSS for the
landing page",
+ "value": true
}
},
"ConfigRegistry": {
diff --git a/includes/Hooks.php b/includes/Hooks.php
index d9f79fa..2062cb0 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -79,6 +79,9 @@
->makeConfig( 'ArticleCreationWorkflow' );
$workflow = new Workflow( $config );
if ( $out->getPageTitle() == $workflow->getLandingPageTitle() )
{
+ if ( $config->get( 'UseCustomLandingPageStyles' ) ) {
+ $out->addModuleStyles(
'ext.acw.landingPageStyles' );
+ }
$out->addModules( 'ext.acw.eventlogging' );
}
}
diff --git a/modules/ext.acw.landingPage.css b/modules/ext.acw.landingPage.css
new file mode 100644
index 0000000..1c0eb12
--- /dev/null
+++ b/modules/ext.acw.landingPage.css
@@ -0,0 +1,6 @@
+/*
+ * Hide unneeded page elements.
+ */
+#firstHeading, #siteSub, #catlinks {
+ display: none !important;
+}
--
To view, visit https://gerrit.wikimedia.org/r/403913
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I61c6fb9e3561f5a261fa5d1348e7df4299488fef
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/ArticleCreationWorkflow
Gerrit-Branch: master
Gerrit-Owner: Kaldari <[email protected]>
Gerrit-Reviewer: MaxSem <[email protected]>
Gerrit-Reviewer: MusikAnimal <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits