From a69a107a3597eb2b31458593a415fcbccf0eda8b Mon Sep 17 00:00:00 2001 From: Cyrille Bagard Date: Wed, 27 Apr 2016 23:13:26 +0200 Subject: Identified the main page using a CSS selector. --- Toha.skin.php | 20 ++++++++++++++++++-- resources/screen.css | 2 +- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Toha.skin.php b/Toha.skin.php index 26a7ea6..e4cb89a 100644 --- a/Toha.skin.php +++ b/Toha.skin.php @@ -18,7 +18,7 @@ class SkinToha extends SkinTemplate { $template = 'TohaTemplate', $useHeadElement = true; /** - * initialize the page + * Initialize the page */ public function initPage( OutputPage $out ) { parent::initPage( $out ); @@ -40,7 +40,7 @@ class SkinToha extends SkinTemplate { } /** - * initialize various variables and generate the template + * Initialize various variables and generate the template * * @since 1.23 * @return QuickTemplate The template to be executed by outputPage @@ -53,6 +53,22 @@ class SkinToha extends SkinTemplate { } + /** + * Override the creation of the "" tag to add attributes. + * + * @param Title $title + */ + function getPageClasses( $title ) { + + $list = parent::getPageClasses( $title ); + + if ( $title->isMainPage() ) + $list .= ' main_page'; + + return $list; + + } + } /** diff --git a/resources/screen.css b/resources/screen.css index 0b74aa3..d177d51 100644 --- a/resources/screen.css +++ b/resources/screen.css @@ -756,7 +756,7 @@ html, body { } -body:not(.page-Page_Main):not(.page-Accueil):not(.page-Chrysalide) *:not(#toctitle):not(.h2) > h2 { +body:not(.main_page) *:not(#toctitle):not(.h2) > h2 { position: relative; left: -30px; -- cgit v0.11.2-87-g4458