]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Show some menu fixup for settings for some themes
authorEvan Prodromou <evan@status.net>
Sat, 8 Jan 2011 00:22:27 +0000 (19:22 -0500)
committerEvan Prodromou <evan@status.net>
Sat, 8 Jan 2011 00:22:27 +0000 (19:22 -0500)
plugins/NewMenu/NewMenuPlugin.php
plugins/NewMenu/newmenu.css [new file with mode: 0644]

index 3d19d909a1cf26b6165f3b369ecd4dc9bfc8c139..7397d4fbc93154643f458d85798a17b29d2da924 100644 (file)
@@ -51,6 +51,8 @@ if (!defined('STATUSNET')) {
  */
 class NewMenuPlugin extends Plugin
 {
+    public $loadCSS = false;
+
     /**
      * Load related modules when needed
      *
@@ -354,6 +356,18 @@ class NewMenuPlugin extends Plugin
         Event::handle('EndConnectSettingsNav', array(&$action));
     }
 
+    function onEndShowStyles($action)
+    {
+        if (($this->showCSS ||
+             in_array(common_config('site', 'theme'),
+                      array('default', 'identica', 'h4ck3r'))) &&
+            ($action instanceof AccountSettingsAction ||
+             $action instanceof ConnectSettingsAction)) {
+            $action->cssLink(common_path('plugins/NewMenu/newmenu.css'));
+        }
+        return true;
+    }
+
     /**
      * Return version information for this plugin
      *
diff --git a/plugins/NewMenu/newmenu.css b/plugins/NewMenu/newmenu.css
new file mode 100644 (file)
index 0000000..f700fdc
--- /dev/null
@@ -0,0 +1,47 @@
+body[id$=settings] #site_nav_local_views {
+position:relative;
+z-index:9;
+float:right;
+margin-right:10.65%;
+width:22.25%;
+}
+body[id$=settings] #site_nav_local_views li {
+width:100%;
+margin-right:0;
+margin-bottom:7px;
+}
+body[id$=settings] #site_nav_local_views a {
+display:block;
+width:80%;
+padding-right:10%;
+padding-left:10%;
+border-radius-toprleft:0;
+-moz-border-radius-topleft:0;
+-webkit-border-top-left-radius:0;
+border-radius-topright:4px;
+-moz-border-radius-topright:4px;
+-webkit-border-top-right-radius:4px;
+border-radius-bottomright:4px;
+-moz-border-radius-bottomright:4px;
+-webkit-border-bottom-right-radius:4px;
+}
+body[id$=settings] #site_nav_local_views li.current {
+box-shadow:none;
+-moz-box-shadow:none;
+-webkit-box-shadow:none;
+}
+
+body[id$=settings] #content {
+border-radius-topleft:7px;
+border-radius-topright:7px;
+-moz-border-radius-topleft:7px;
+-moz-border-radius-topright:7px;
+-webkit-border-top-left-radius:7px;
+-webkit-border-top-right-radius:7px;
+border-radius-topright:0;
+-moz-border-radius-topright:0;
+-webkit-border-top-right-radius:0;
+}
+body[id$=settings] #aside_primary {
+display:none;
+}