summaryrefslogtreecommitdiff
path: root/skins
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-07-28 00:32:19 +0200
committerPierre Schmitz <pierre@archlinux.de>2010-07-28 00:32:19 +0200
commita5be612e4169e11b51647cbaa2abc976de00d671 (patch)
treefeba598ea5f8b3a6ee27bed88e19473ff35a7806 /skins
parentbcda87d4a5bf4d72f4f92096472cd49cf0bfd3ed (diff)
make selected menu item configurable
Diffstat (limited to 'skins')
-rw-r--r--skins/ArchLinux.php10
-rw-r--r--skins/archlinux/arch.css10
2 files changed, 9 insertions, 11 deletions
diff --git a/skins/ArchLinux.php b/skins/ArchLinux.php
index 6867f729..511e20f6 100644
--- a/skins/ArchLinux.php
+++ b/skins/ArchLinux.php
@@ -63,7 +63,7 @@ class ArchLinuxTemplate extends QuickTemplate {
* @access private
*/
function execute() {
- global $wgRequest, $wgArchNavBar, $wgArchHome;
+ global $wgRequest, $wgArchNavBar, $wgArchHome, $wgArchNavBarSelected, $wgArchNavBarSelectedDefault;
$this->skin = $skin = $this->data['skin'];
$action = $wgRequest->getText( 'action' );
@@ -120,7 +120,13 @@ class ArchLinuxTemplate extends QuickTemplate {
<?php
if (isset($wgArchNavBar)) {
foreach ($wgArchNavBar as $name => $url) {
- echo '<li id="anb-'.strtolower($name).'"><a href="'.$url.'">'.$name.'</a></li>';
+ if ((isset($wgArchNavBarSelected) && $this->data['title'] == $name && in_array($name, $wgArchNavBarSelected))
+ || (!(isset($wgArchNavBarSelected) && in_array($this->data['title'], $wgArchNavBarSelected)) && isset($wgArchNavBarSelectedDefault) && $name == $wgArchNavBarSelectedDefault)) {
+ $anbClass = ' class="anb-selected"';
+ } else {
+ $anbClass = '';
+ }
+ echo '<li id="anb-'.strtolower($name).'"'.$anbClass.'><a href="'.$url.'">'.$name.'</a></li>';
}
}
?>
diff --git a/skins/archlinux/arch.css b/skins/archlinux/arch.css
index dafd997d..224f85c3 100644
--- a/skins/archlinux/arch.css
+++ b/skins/archlinux/arch.css
@@ -61,15 +61,7 @@ html > body #column-one { padding-top: 36px; }
html > body #footer ul { margin-left: 170px; }
/* highlight current website in the navbar */
-#archnavbar ul li#anb-wiki a { color: white !important; }
-
-/* highlight main menu links (specific to archlinux.de) */
-.page-Download #archnavbar ul li#anb-download a { color: white !important; }
-.page-Download #archnavbar ul li#anb-wiki a { color: #999 !important; }
-.page-Download #archnavbar ul li#anb-wiki a:hover { color: #fff !important; }
-.page-Spenden #archnavbar ul li#anb-spenden a { color: white !important; }
-.page-Spenden #archnavbar ul li#anb-wiki a { color: #999 !important; }
-.page-Spenden #archnavbar ul li#anb-wiki a:hover { color: #fff !important; }
+#archnavbar ul li.anb-selected a { color: white !important; }
/* don't highlight https links */
#bodyContent a[href ^="https://"], .link-https { background: none; padding: 0; }