diff --git a/css/wetkit_menu.css b/css/wetkit_menu.css index 326d6aa..da9c902 100644 --- a/css/wetkit_menu.css +++ b/css/wetkit_menu.css @@ -1,15 +1 @@ -/** @file Custom SCSS for the WetKit Menu module. */ -.mb-menu li h4 a { text-decoration: none !important; } -.mb-menu li h4 a:hover { text-decoration: underline !important; } -.mb-menu ul li.top-level a { text-decoration: none !important; } -.mb-menu ul li.top-level a:hover { text-decoration: underline !important; } - -.pane-menu-tree .top-level-alt { margin: 0 0 3px; } -.pane-menu-tree .top-level-alt a { background: #0b3048; padding-top: 8px; padding-bottom: 8px; font-size: 1.1em; color: white !important; font-weight: bold; } - -#wb-sec .expanded .list-group .list-group .list-group-item { background: #F2F2F2 !important; color: #555 !important; padding-left: 2.8em !important; } -#wb-sec .expanded .list-group .list-group .list-group .list-group-item { background: #e6e6e6 !important; color: #555 !important; padding-left: 3.8em !important; } -#wb-sec .list-group .list-group a.list-group-item.wb-navcurr { background: #146094 !important; color: #fff !important; } -#wb-sec .list-group .list-group a.list-group-item[href]:focus, #wb-sec .list-group .list-group a.list-group-item[href]:hover { background: #146094 !important; color: #fff !important; } -#wb-sec .list-group .list-group .list-group a.list-group-item.wb-navcurr { background: #146094 !important; color: #fff !important; } -#wb-sec .list-group .list-group .list-group a.list-group-item[href]:focus, #wb-sec .list-group .list-group .list-group a.list-group-item[href]:hover { background: #146094 !important; color: #fff !important; } +.mb-menu li h4 a{text-decoration:none !important}.mb-menu li h4 a:hover{text-decoration:underline !important}.mb-menu ul li.top-level a{text-decoration:none !important}.mb-menu ul li.top-level a:hover{text-decoration:underline !important}.pane-menu-tree .top-level-alt{margin:0 0 3px}.pane-menu-tree .top-level-alt a{background:#0b3048;padding-top:8px;padding-bottom:8px;font-size:1.1em;color:white !important;font-weight:bold}#wb-sec .expanded .list-group .list-group .list-group-item{background:#F2F2F2 !important;color:#555 !important;padding-left:2.8em !important}#wb-sec .expanded .list-group .list-group .list-group .list-group-item{background:#e6e6e6 !important;color:#555 !important;padding-left:3.8em !important}#wb-sec .list-group .list-group a.list-group-item.wb-navcurr{background:#146094 !important;color:#fff !important}#wb-sec .list-group .list-group a.list-group-item[href]:focus,#wb-sec .list-group .list-group a.list-group-item[href]:hover{background:#146094 !important;color:#fff !important}#wb-sec .list-group .list-group .list-group a.list-group-item.wb-navcurr{background:#146094 !important;color:#fff !important}#wb-sec .list-group .list-group .list-group a.list-group-item[href]:focus,#wb-sec .list-group .list-group .list-group a.list-group-item[href]:hover{background:#146094 !important;color:#fff !important}.sidebar-nav-right{margin-bottom:30px}.sidebar-nav-right .nav>li>a{padding:0}.sidebar-nav-right .list-group{margin:0;border-radius:0}.sidebar-nav-right .list-group .list-group-item.active a:hover{background:#0A466F}.sidebar-nav-right .list-group .list-group-item.active .list-group a:hover{background:#e6e6e6}.sidebar-nav-right .list-group .list-group-item{padding:0;background:#eee;border-radius:0;border-left:0;border-right:0}.sidebar-nav-right .list-group .list-group-item .list-group-item{border-left:0;border-right:0}.sidebar-nav-right .list-group .list-group-item a{padding:10px 15px 10px 25px;display:block;border-radius:0}.sidebar-nav-right .list-group .list-group-item a:hover{background:#e6e6e6}.sidebar-nav-right .list-group .list-group-item.active{padding:0;background:#146094}.sidebar-nav-right .list-group .list-group-item.active a{color:#fff}.sidebar-nav-right .list-group .list-group .list-group-item{padding:0;background:#ddd}.sidebar-nav-right .list-group .list-group .list-group-item a{padding:10px 15px 10px 40px}.sidebar-nav-right .list-group .list-group .list-group .list-group-item a{padding:10px 15px 10px 55px}.sidebar-nav-right .list-group .list-group .list-group .list-group .list-group-item a{padding:10px 15px 10px 70px}.sidebar-nav-right .list-group-item.active{background:#146094;border:none}.sidebar-nav-right .list-group-item.active a{color:#fff}.sidebar-nav-right .list-group-item.active a:hover{background:#0A466F}.sidebar-nav-right .list-group-item.active .list-group a{color:#295376}.sidebar-nav-right .menu.nav>li{padding:0}.sidebar-nav-right .menu.nav>li>{padding:10px 15px} diff --git a/sass/wetkit_menu.scss b/sass/wetkit_menu.scss index 79b58c6..b462605 100644 --- a/sass/wetkit_menu.scss +++ b/sass/wetkit_menu.scss @@ -96,3 +96,53 @@ } } } +.sidebar-nav-right { margin-bottom:30px; + .nav>li>a { padding:0; } + .list-group { margin:0; border-radius: 0; + .list-group-item.active { + a { + &:hover { background:#0A466F; } + } + .list-group { + a { + &:hover { background:#e6e6e6;} + } + } + } + .list-group-item { padding:0; background:#eee; border-radius: 0; border-left:0; border-right:0; + .list-group-item { border-left:0; border-right:0; } + a { padding:10px 15px 10px 25px; display: block; border-radius: 0; + &:hover { background:#e6e6e6; } + } + &.active { padding:0; background:#146094; + a { color:#fff; } + } + } + .list-group { + .list-group-item { padding:0; background:#ddd; + a { padding:10px 15px 10px 40px; } + } + .list-group { + .list-group-item { + a { padding:10px 15px 10px 55px; } + } + .list-group { + .list-group-item { + a { padding:10px 15px 10px 70px; } + } + } + } + } + } + .list-group-item.active { background:#146094; border:none; + a { color:#fff; + &:hover { background:#0A466F; } + } + .list-group { + a { color:#295376; } + } + } + .menu.nav>li { padding:0; + &> { padding:10px 15px; } + } +} diff --git a/templates/panes/sidebar_nav_right.tpl.php b/templates/panes/sidebar_nav_right.tpl.php new file mode 100644 index 0000000..42ea5da --- /dev/null +++ b/templates/panes/sidebar_nav_right.tpl.php @@ -0,0 +1,61 @@ +type: the content type inside this pane + * - $pane->subtype: The subtype, if applicable. If a view it will be the + * view name; if a node it will be the nid, etc. + * - $title: The title of the content + * - $content: The actual content + * - $links: Any links associated with the content + * - $more: An optional 'more' link (destination only) + * - $admin_links: Administrative links associated with the content + * - $feeds: Any feed icons or associated with the content + * - $display: The complete panels display object containing all kinds of + * data including the contexts and all of the other panes being displayed. + */ +?> + + diff --git a/theme/menu.theme.inc b/theme/menu.theme.inc index c830d4a..a9dcdc9 100644 --- a/theme/menu.theme.inc +++ b/theme/menu.theme.inc @@ -425,12 +425,12 @@ function wetkit_menu_menu_link_menu_block_sidebar_right($variables) { $element = $variables['element']; $sub_menu = ''; if (isset($element['#below']) && is_array($element['#below'])) { - $sub_menu = drupal_render($element['#below']); + unset($element['#below']['#theme_wrappers']); + $sub_menu = ''; } $output = ''; - + $element['#attributes']['class'][] = 'list-group-item'; $output .= '' . l($element['#title'], $element['#href'], $element['#localized_options']) . $sub_menu . "\n"; - return $output; } diff --git a/wetkit_menu.module b/wetkit_menu.module index 27b9c82..c70e3e8 100644 --- a/wetkit_menu.module +++ b/wetkit_menu.module @@ -41,6 +41,9 @@ function wetkit_menu_preprocess_panels_pane(&$variables) { $variables['theme_hook_suggestions'][] = 'wetkit_menu_panels_pane'; } } + if ($variables['content']['#config']['theme'] == 'menu_link__menu_block__wxt_sidebar_right') { + $variables['theme_hook_suggestions'][] = 'wetkit_menu_panels_pane_sidebar_right'; + } } } @@ -120,7 +123,7 @@ function wetkit_menu_theme($existing, $type, $theme, $path) { 'wetkit_menu_panels_pane_sidebar_right' => array( 'render element' => 'element', 'path' => drupal_get_path('module', 'wetkit_menu') . '/templates/panes', - 'template' => 'megamenu_sidebar', + 'template' => 'sidebar_nav_right', ), ); } @@ -177,6 +180,15 @@ function wetkit_menu_theme_registry_alter(&$theme_registry) { $theme_registry['menu_link__menu_block__wxt_group_list']['function'] = 'wetkit_menu_menu_link_menu_block_group_list'; $theme_registry['menu_link__menu_block__wxt_group_list']['type'] = 'theme_engine'; $theme_registry['menu_link__menu_block__wxt_group_list']['final'] = TRUE; + + + $theme_registry['menu_link__menu_block__wxt_sidebar_right']['base hook'] = 'menu_link'; + $theme_registry['menu_link__menu_block__wxt_sidebar_right']['render element'] = 'element'; + $theme_registry['menu_link__menu_block__wxt_sidebar_right']['theme path'] = drupal_get_path('module', 'wetkit_menu'); + $theme_registry['menu_link__menu_block__wxt_sidebar_right']['file'] = drupal_get_path('module', 'wetkit_menu') . '/theme/menu.theme.inc'; + $theme_registry['menu_link__menu_block__wxt_sidebar_right']['function'] = 'wetkit_menu_menu_link_menu_block_sidebar_right'; + $theme_registry['menu_link__menu_block__wxt_sidebar_right']['type'] = 'theme_engine'; + $theme_registry['menu_link__menu_block__wxt_sidebar_right']['final'] = TRUE; } }