Sumit has uploaded a new change for review. https://gerrit.wikimedia.org/r/226762
Change subject: WikidataPageBanner add parameter tocbelow ...................................................................... WikidataPageBanner add parameter tocbelow Add a parameter 'tocbelow' to {{PAGEBANNER}} which when set to yes would cause the toc to appear below the banner. Bug: T106534 Change-Id: I1ff8770875f889ff3d8b89cf91f338532490bffc --- M includes/WikidataPageBanner.hooks.php M resources/ext.WikidataPageBanner.toc.styles/ext.WikidataPageBanner.toc.less M templates/banner.mustache 3 files changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataPageBanner refs/changes/62/226762/1 diff --git a/includes/WikidataPageBanner.hooks.php b/includes/WikidataPageBanner.hooks.php index 04a80f6..2782976 100644 --- a/includes/WikidataPageBanner.hooks.php +++ b/includes/WikidataPageBanner.hooks.php @@ -129,6 +129,10 @@ if ( isset( $argumentsFromParserFunction['tooltip'] ) ) { $paramsForBannerTemplate['tooltip'] = $argumentsFromParserFunction['tooltip']; } + if ( isset( $argumentsFromParserFunction['tocbelow'] ) && + $argumentsFromParserFunction['tocbelow'] === 'yes' ) { + $paramsForBannerTemplate['tocbelow'] = true; + } WikidataPageBannerFunctions::addToc( $paramsForBannerTemplate, $argumentsFromParserFunction ); WikidataPageBannerFunctions::addIcons( $paramsForBannerTemplate, diff --git a/resources/ext.WikidataPageBanner.toc.styles/ext.WikidataPageBanner.toc.less b/resources/ext.WikidataPageBanner.toc.styles/ext.WikidataPageBanner.toc.less index 062f367..2042436 100644 --- a/resources/ext.WikidataPageBanner.toc.styles/ext.WikidataPageBanner.toc.less +++ b/resources/ext.WikidataPageBanner.toc.styles/ext.WikidataPageBanner.toc.less @@ -21,6 +21,10 @@ width: 100%; } + .tocbelow { + position: relative; + } + .wpb-banner-toc { display: table; color: white; diff --git a/templates/banner.mustache b/templates/banner.mustache index 165b9a0..e926120 100644 --- a/templates/banner.mustache +++ b/templates/banner.mustache @@ -10,7 +10,7 @@ {{/icons}} </div> {{/hasIcons}} - <div class="wpb-topbanner-toc"><div class="wpb-banner-toc">{{{toc}}}</div></div> + <div class="wpb-topbanner-toc {{#tocbelow}}tocbelow{{/tocbelow}}"><div class="wpb-banner-toc">{{{toc}}}</div></div> </div> </div> </div> -- To view, visit https://gerrit.wikimedia.org/r/226762 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1ff8770875f889ff3d8b89cf91f338532490bffc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikidataPageBanner Gerrit-Branch: master Gerrit-Owner: Sumit <asthana.sumi...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits