diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2016-04-27 21:13:26 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2016-04-27 21:13:26 (GMT) |
commit | a69a107a3597eb2b31458593a415fcbccf0eda8b (patch) | |
tree | 3ce0970d3ad47545e2a008c2fd5604c49b4cd3e5 | |
parent | 7cd8ce6cce8ebfa940c1e1419186bce1f122b027 (diff) |
Identified the main page using a CSS selector.
-rw-r--r-- | Toha.skin.php | 20 | ||||
-rw-r--r-- | 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 "<body>" 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; |