updated plugin GP Premium
version 1.11.2
This commit is contained in:
@ -1,66 +1,138 @@
|
||||
<?php
|
||||
// No direct access, please
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
/**
|
||||
* This file handles all of the Secondary Navigation functionality.
|
||||
*
|
||||
* @package GP Premium
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // No direct access, please.
|
||||
}
|
||||
|
||||
if ( ! class_exists( 'GeneratePress_Secondary_Nav_CSS' ) ) :
|
||||
class GeneratePress_Secondary_Nav_CSS {
|
||||
/**
|
||||
* Generate CSS class.
|
||||
*/
|
||||
class GeneratePress_Secondary_Nav_CSS {
|
||||
|
||||
protected $_selector = '';
|
||||
protected $_selector_output = '';
|
||||
protected $_css = '';
|
||||
protected $_output = '';
|
||||
/**
|
||||
* The css selector that you're currently adding rules to.
|
||||
*
|
||||
* @access protected
|
||||
* @var string
|
||||
*/
|
||||
protected $_selector = '';
|
||||
|
||||
public function set_selector( $selector = '' )
|
||||
{
|
||||
// Render the css in the output string everytime the selector changes
|
||||
if( $this->_selector !== '' ){
|
||||
$this->add_selector_rules_to_output();
|
||||
}
|
||||
$this->_selector = $selector;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Stores the final css output with all of its rules for the current selector.
|
||||
*
|
||||
* @access protected
|
||||
* @var string
|
||||
*/
|
||||
protected $_selector_output = '';
|
||||
|
||||
public function add_property( $property, $value, $og_default = false, $unit = false )
|
||||
{
|
||||
// Add our unit to the value if it exists
|
||||
if ( $unit && '' !== $unit ) {
|
||||
$value = $value . $unit;
|
||||
if ( '' !== $og_default ) {
|
||||
$og_default = $og_default . $unit;
|
||||
/**
|
||||
* Stores all of the rules that will be added to the selector.
|
||||
*
|
||||
* @access protected
|
||||
* @var string
|
||||
*/
|
||||
protected $_css = '';
|
||||
|
||||
/**
|
||||
* The string that holds all of the css to output.
|
||||
*
|
||||
* @access protected
|
||||
* @var string
|
||||
*/
|
||||
protected $_output = '';
|
||||
|
||||
/**
|
||||
* Sets a selector to the object and changes the current selector to a new one
|
||||
*
|
||||
* @access public
|
||||
* @since 1.0
|
||||
*
|
||||
* @param string $selector - the css identifier of the html that you wish to target.
|
||||
* @return $this
|
||||
*/
|
||||
public function set_selector( $selector = '' ) {
|
||||
// Render the css in the output string everytime the selector changes.
|
||||
if ( '' !== $this->_selector ) {
|
||||
$this->add_selector_rules_to_output();
|
||||
}
|
||||
}
|
||||
|
||||
// If we don't have a value or our value is the same as our og default, bail
|
||||
if ( empty( $value ) || $og_default == $value )
|
||||
return false;
|
||||
|
||||
$this->_css .= $property . ':' . $value . ';';
|
||||
return $this;
|
||||
}
|
||||
|
||||
private function add_selector_rules_to_output()
|
||||
{
|
||||
if( !empty( $this->_css ) ) {
|
||||
$this->_selector_output = $this->_selector;
|
||||
$selector_output = sprintf( '%1$s{%2$s}', $this->_selector_output, $this->_css );
|
||||
|
||||
$this->_output .= $selector_output;
|
||||
|
||||
// Reset the css
|
||||
$this->_css = '';
|
||||
$this->_selector = $selector;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a css property with value to the css output.
|
||||
*
|
||||
* @access public
|
||||
* @since 1.0
|
||||
*
|
||||
* @param string $property - the css property.
|
||||
* @param string $value - the value to be placed with the property.
|
||||
* @param string $og_default - check to see if the value matches the default.
|
||||
* @param string $unit - the unit for the value (px).
|
||||
* @return $this
|
||||
*/
|
||||
public function add_property( $property, $value, $og_default = false, $unit = false ) {
|
||||
// Add our unit to the value if it exists.
|
||||
if ( $unit && '' !== $unit ) {
|
||||
$value = $value . $unit;
|
||||
if ( '' !== $og_default ) {
|
||||
$og_default = $og_default . $unit;
|
||||
}
|
||||
}
|
||||
|
||||
// If we don't have a value or our value is the same as our og default, bail.
|
||||
if ( empty( $value ) || $og_default == $value ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->_css .= $property . ':' . $value . ';';
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the current selector rules to the output variable
|
||||
*
|
||||
* @access private
|
||||
* @since 1.0
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
private function add_selector_rules_to_output() {
|
||||
if ( ! empty( $this->_css ) ) {
|
||||
$this->_selector_output = $this->_selector;
|
||||
$selector_output = sprintf( '%1$s{%2$s}', $this->_selector_output, $this->_css );
|
||||
|
||||
$this->_output .= $selector_output;
|
||||
|
||||
// Reset the css.
|
||||
$this->_css = '';
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the minified css in the $_output variable
|
||||
*
|
||||
* @access public
|
||||
* @since 1.0
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function css_output() {
|
||||
// Add current selector's rules to output.
|
||||
$this->add_selector_rules_to_output();
|
||||
|
||||
// Output minified css.
|
||||
return $this->_output;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function css_output()
|
||||
{
|
||||
// Add current selector's rules to output
|
||||
$this->add_selector_rules_to_output();
|
||||
|
||||
// Output minified css
|
||||
return $this->_output;
|
||||
}
|
||||
|
||||
}
|
||||
endif;
|
||||
endif;
|
||||
|
@ -0,0 +1,118 @@
|
||||
.secondary-navigation.toggled ul ul {
|
||||
transition: 0s;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.secondary-navigation.toggled ul ul.toggled-on {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.secondary-navigation.toggled .main-nav ul ul {
|
||||
position: relative;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.secondary-navigation.toggled .main-nav ul ul.toggled-on {
|
||||
position: relative;
|
||||
top: 0;
|
||||
left: auto !important;
|
||||
right: auto !important;
|
||||
width: 100%;
|
||||
pointer-events: auto;
|
||||
height: auto;
|
||||
opacity: 1;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.secondary-navigation.toggled .main-nav > ul {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.secondary-navigation.toggled .main-nav .sf-menu > li {
|
||||
float: none;
|
||||
clear: both;
|
||||
display: block !important;
|
||||
text-align: left !important;
|
||||
}
|
||||
|
||||
.secondary-navigation.toggled .main-nav .sf-menu > li.hide-on-mobile {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.secondary-navigation.toggled .dropdown-menu-toggle:before {
|
||||
content: "\f107" !important;
|
||||
}
|
||||
|
||||
.secondary-navigation.toggled .sfHover > a .dropdown-menu-toggle:before {
|
||||
content: "\f106" !important;
|
||||
}
|
||||
|
||||
.secondary-navigation.toggled .menu-item-has-children .dropdown-menu-toggle {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.dropdown-hover .secondary-navigation.toggled ul li:hover > ul,
|
||||
.dropdown-hover .secondary-navigation.toggled ul li.sfHover > ul {
|
||||
transition-delay: 0s;
|
||||
}
|
||||
|
||||
.rtl .secondary-navigation.toggled .main-nav .sf-menu > li {
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.secondary-navigation .menu-toggle {
|
||||
display: block;
|
||||
}
|
||||
.secondary-navigation ul,
|
||||
.secondary-navigation:not(.toggled) .main-nav > ul {
|
||||
display: none;
|
||||
}
|
||||
.secondary-navigation.toggled .main-nav {
|
||||
flex-basis: 100%;
|
||||
order: 3;
|
||||
}
|
||||
.secondary-nav-aligned-left .secondary-navigation.has-top-bar .menu-toggle {
|
||||
text-align: left;
|
||||
}
|
||||
.secondary-nav-aligned-left .secondary-navigation .top-bar {
|
||||
order: 2;
|
||||
}
|
||||
.secondary-nav-aligned-right .secondary-navigation.has-top-bar .menu-toggle {
|
||||
text-align: right;
|
||||
}
|
||||
.secondary-navigation.has-top-bar .top-bar .inside-top-bar .widget {
|
||||
margin: 0 20px;
|
||||
}
|
||||
.secondary-nav-aligned-center .secondary-navigation .top-bar {
|
||||
flex-basis: 100%;
|
||||
}
|
||||
.secondary-nav-float-right .secondary-navigation {
|
||||
margin-left: 0;
|
||||
width: 100%;
|
||||
margin-top: 1.5em;
|
||||
}
|
||||
.secondary-nav-float-right .header-widget {
|
||||
margin-left: auto;
|
||||
}
|
||||
.secondary-nav-float-left .secondary-navigation,
|
||||
.secondary-nav-float-left .multi-navigation-wrapper {
|
||||
margin-left: 0;
|
||||
width: 100%;
|
||||
margin-top: 1.5em;
|
||||
}
|
||||
.secondary-nav-float-left:not(.nav-float-right) .header-widget {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
order: unset;
|
||||
}
|
||||
.secondary-nav-float-left .site-logo,
|
||||
.secondary-nav-float-left .site-branding {
|
||||
order: unset;
|
||||
}
|
||||
.secondary-navigation.has-top-bar .inside-navigation, .secondary-navigation.has-menu-bar-items .inside-navigation {
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
1
wp-content/plugins/gp-premium/secondary-nav/functions/css/main-mobile.min.css
vendored
Normal file
1
wp-content/plugins/gp-premium/secondary-nav/functions/css/main-mobile.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.secondary-navigation.toggled ul ul{transition:0s;visibility:hidden}.secondary-navigation.toggled ul ul.toggled-on{visibility:visible}.secondary-navigation.toggled .main-nav ul ul{position:relative;top:0;left:0;width:100%}.secondary-navigation.toggled .main-nav ul ul.toggled-on{position:relative;top:0;left:auto!important;right:auto!important;width:100%;pointer-events:auto;height:auto;opacity:1;display:block}.secondary-navigation.toggled .main-nav>ul{display:block}.secondary-navigation.toggled .main-nav .sf-menu>li{float:none;clear:both;display:block!important;text-align:left!important}.secondary-navigation.toggled .main-nav .sf-menu>li.hide-on-mobile{display:none!important}.secondary-navigation.toggled .dropdown-menu-toggle:before{content:"\f107"!important}.secondary-navigation.toggled .sfHover>a .dropdown-menu-toggle:before{content:"\f106"!important}.secondary-navigation.toggled .menu-item-has-children .dropdown-menu-toggle{float:right}.dropdown-hover .secondary-navigation.toggled ul li.sfHover>ul,.dropdown-hover .secondary-navigation.toggled ul li:hover>ul{transition-delay:0s}.rtl .secondary-navigation.toggled .main-nav .sf-menu>li{text-align:right!important}@media (max-width:768px){.secondary-navigation .menu-toggle{display:block}.secondary-navigation ul,.secondary-navigation:not(.toggled) .main-nav>ul{display:none}.secondary-navigation.toggled .main-nav{flex-basis:100%;order:3}.secondary-nav-aligned-left .secondary-navigation.has-top-bar .menu-toggle{text-align:left}.secondary-nav-aligned-left .secondary-navigation .top-bar{order:2}.secondary-nav-aligned-right .secondary-navigation.has-top-bar .menu-toggle{text-align:right}.secondary-navigation.has-top-bar .top-bar .inside-top-bar .widget{margin:0 20px}.secondary-nav-aligned-center .secondary-navigation .top-bar{flex-basis:100%}.secondary-nav-float-right .secondary-navigation{margin-left:0;width:100%;margin-top:1.5em}.secondary-nav-float-right .header-widget{margin-left:auto}.secondary-nav-float-left .multi-navigation-wrapper,.secondary-nav-float-left .secondary-navigation{margin-left:0;width:100%;margin-top:1.5em}.secondary-nav-float-left:not(.nav-float-right) .header-widget{margin-left:auto;margin-right:auto;order:unset}.secondary-nav-float-left .site-branding,.secondary-nav-float-left .site-logo{order:unset}.secondary-navigation.has-menu-bar-items .inside-navigation,.secondary-navigation.has-top-bar .inside-navigation{justify-content:space-between}}
|
@ -0,0 +1,362 @@
|
||||
.secondary-navigation {
|
||||
z-index: 99;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.secondary-navigation .inside-navigation {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.secondary-navigation ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.secondary-navigation li {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.secondary-navigation a {
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.secondary-navigation ul ul {
|
||||
display: block;
|
||||
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
|
||||
float: left;
|
||||
position: absolute;
|
||||
left: -99999px;
|
||||
opacity: 0;
|
||||
z-index: 99999;
|
||||
width: 200px;
|
||||
text-align: left;
|
||||
top: auto;
|
||||
transition: opacity 80ms linear;
|
||||
transition-delay: 0s;
|
||||
pointer-events: none;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.secondary-navigation ul ul li {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.secondary-navigation ul ul li a {
|
||||
line-height: normal;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
.secondary-navigation.sub-menu-left .sub-menu {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.secondary-navigation .main-nav > ul {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.secondary-navigation .main-nav ul ul li a {
|
||||
line-height: normal;
|
||||
font-size: 12px;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.secondary-navigation .main-nav ul li.menu-item-has-children > a {
|
||||
padding-right: 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.secondary-navigation .main-nav ul li a {
|
||||
font-family: inherit;
|
||||
font-weight: normal;
|
||||
text-transform: none;
|
||||
font-size: 13px;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.secondary-navigation .menu-toggle {
|
||||
font-family: inherit;
|
||||
font-weight: normal;
|
||||
text-transform: none;
|
||||
font-size: 13px;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
line-height: 40px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.secondary-navigation .menu-item-has-children .dropdown-menu-toggle {
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.secondary-navigation .menu-item-has-children ul .dropdown-menu-toggle {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
margin-top: -10px;
|
||||
}
|
||||
|
||||
.secondary-navigation .secondary-menu-bar-items {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.secondary-navigation .menu-bar-item {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.secondary-navigation .menu-bar-item.search-item {
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
.secondary-navigation .menu-bar-item > a {
|
||||
font-family: inherit;
|
||||
font-weight: normal;
|
||||
text-transform: none;
|
||||
font-size: 13px;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.dropdown-hover .secondary-navigation:not(.toggled) ul li:hover > ul,
|
||||
.dropdown-hover .secondary-navigation:not(.toggled) ul li.sfHover > ul {
|
||||
left: auto;
|
||||
opacity: 1;
|
||||
transition-delay: 150ms;
|
||||
pointer-events: auto;
|
||||
height: auto;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.dropdown-hover .secondary-navigation:not(.toggled) ul ul li:hover > ul,
|
||||
.dropdown-hover .secondary-navigation:not(.toggled) ul ul li.sfHover > ul {
|
||||
left: 100%;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.dropdown-hover .secondary-navigation.sub-menu-left:not(.toggled) ul ul li:hover > ul,
|
||||
.dropdown-hover .secondary-navigation.sub-menu-left:not(.toggled) ul ul li.sfHover > ul {
|
||||
right: 100%;
|
||||
top: 0;
|
||||
left: auto;
|
||||
}
|
||||
|
||||
.secondary-nav-float-right .header-widget {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.secondary-nav-float-right .secondary-navigation {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.secondary-nav-float-right .secondary-navigation .main-nav ul ul li a {
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.secondary-nav-float-right .secondary-navigation ul ul ul {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.secondary-nav-float-right .multi-navigation-wrapper {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.secondary-nav-float-left .secondary-navigation,
|
||||
.secondary-nav-float-left .multi-navigation-wrapper {
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.secondary-nav-float-left .site-logo,
|
||||
.secondary-nav-float-left .site-branding {
|
||||
order: 5;
|
||||
}
|
||||
|
||||
.secondary-nav-float-left:not(.nav-float-right) .header-widget {
|
||||
order: -10;
|
||||
margin-left: 0;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.secondary-nav-float-left.nav-float-right .site-branding,
|
||||
.secondary-nav-float-left.nav-float-right .site-logo {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.secondary-nav-float-left.nav-float-right .inside-header .main-navigation,
|
||||
.secondary-nav-float-left.nav-float-right .header-widget {
|
||||
order: 10;
|
||||
}
|
||||
|
||||
.secondary-nav-float-right.nav-float-left .secondary-navigation {
|
||||
order: 10;
|
||||
}
|
||||
|
||||
.multi-navigation-wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.widget-area .secondary-navigation li {
|
||||
display: block;
|
||||
float: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.widget-area .secondary-navigation ul ul {
|
||||
left: 100%;
|
||||
top: 0;
|
||||
width: 220px;
|
||||
}
|
||||
|
||||
.secondary-nav-aligned-right .secondary-navigation .inside-navigation {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.secondary-nav-aligned-right.rtl .secondary-navigation .inside-navigation {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.secondary-nav-aligned-center .secondary-navigation .inside-navigation {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.secondary-nav-aligned-left.rtl .secondary-navigation .inside-navigation {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.dropdown-click .secondary-navigation ul ul {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.dropdown-click .secondary-navigation ul.toggled-on,
|
||||
.dropdown-click .secondary-navigation ul li.sfHover > ul.toggled-on {
|
||||
left: auto;
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
pointer-events: auto;
|
||||
height: auto;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.dropdown-click .secondary-navigation ul ul ul.toggled-on {
|
||||
left: 0;
|
||||
top: auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.dropdown-click .widget-area .secondary-navigation ul ul {
|
||||
top: auto;
|
||||
position: absolute;
|
||||
float: none;
|
||||
width: 100%;
|
||||
left: -99999px;
|
||||
}
|
||||
|
||||
.dropdown-click .widget-area .secondary-navigation ul ul.toggled-on {
|
||||
position: relative;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.both-right .widget-area .secondary-navigation ul ul,
|
||||
.right-sidebar .widget-area .secondary-navigation ul ul,
|
||||
.both-sidebars .widget-area .inside-right-sidebar .secondary-navigation ul ul {
|
||||
left: auto;
|
||||
right: 100%;
|
||||
}
|
||||
|
||||
.dropdown-click.both-right .widget-area .secondary-navigation ul ul,
|
||||
.dropdown-click.right-sidebar .widget-area .secondary-navigation ul ul,
|
||||
.dropdown-click.both-sidebars .widget-area .inside-right-sidebar .secondary-navigation ul ul {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.dropdown-hover .widget-area .secondary-navigation:not(.toggled) ul li:hover ul,
|
||||
.dropdown-hover .widget-area .secondary-navigation:not(.toggled) ul li.sfHover > ul {
|
||||
top: 0;
|
||||
left: 100%;
|
||||
width: 220px;
|
||||
}
|
||||
|
||||
.dropdown-hover.both-right .widget-area .secondary-navigation:not(.toggled) ul li:hover ul,
|
||||
.dropdown-hover.both-right .widget-area .secondary-navigation:not(.toggled) ul li.sfHover ul,
|
||||
.dropdown-hover.right-sidebar .widget-area .secondary-navigation:not(.toggled) ul li:hover ul,
|
||||
.dropdown-hover.right-sidebar .widget-area .secondary-navigation:not(.toggled) ul li.sfHover ul,
|
||||
.dropdown-hover.both-sidebars .widget-area .inside-right-sidebar .secondary-navigation:not(.toggled) ul li:hover ul,
|
||||
.dropdown-hover.both-sidebars .widget-area .inside-right-sidebar .secondary-navigation:not(.toggled) ul li.sfHover ul {
|
||||
right: 100%;
|
||||
left: auto;
|
||||
}
|
||||
|
||||
.rtl .secondary-navigation ul ul {
|
||||
float: right;
|
||||
left: auto;
|
||||
right: 0;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.rtl .secondary-navigation ul ul ul {
|
||||
left: auto;
|
||||
right: 100%;
|
||||
}
|
||||
|
||||
.rtl .secondary-navigation .menu-item-has-children ul .dropdown-menu-toggle {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
/* Top bar */
|
||||
.secondary-navigation.has-top-bar .menu-toggle, .secondary-navigation.has-menu-bar-items .menu-toggle {
|
||||
flex-grow: 0;
|
||||
}
|
||||
|
||||
.secondary-navigation .top-bar {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.secondary-navigation .top-bar a {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.secondary-navigation .inside-top-bar {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.secondary-nav-aligned-right .secondary-navigation .top-bar {
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.secondary-nav-aligned-right .secondary-navigation .top-bar .inside-top-bar .widget {
|
||||
margin: 0 10px;
|
||||
}
|
||||
|
||||
.secondary-nav-aligned-left .secondary-navigation .top-bar {
|
||||
order: 2;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.secondary-nav-aligned-left .secondary-navigation .top-bar .inside-top-bar .widget {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.secondary-nav-aligned-center .secondary-navigation.has-top-bar .inside-top-bar {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.secondary-nav-aligned-center .secondary-navigation.has-top-bar .inside-navigation {
|
||||
display: block;
|
||||
}
|
1
wp-content/plugins/gp-premium/secondary-nav/functions/css/main.min.css
vendored
Normal file
1
wp-content/plugins/gp-premium/secondary-nav/functions/css/main.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
.secondary-navigation.toggled ul ul{transition:0s;visibility:hidden}.dropdown-hover .secondary-navigation.toggled ul li.sfHover>ul,.dropdown-hover .secondary-navigation.toggled ul li:hover>ul{transition-delay:0s}.secondary-navigation.toggled ul ul.toggled-on{visibility:visible}.secondary-navigation.toggled .main-nav ul ul.toggled-on{position:relative;top:0;left:auto!important;right:auto!important;width:100%;pointer-events:auto;height:auto;opacity:1;display:block}.secondary-navigation.toggled .main-nav>ul{display:block}.secondary-navigation.toggled .main-nav ul ul{position:relative;top:0;left:0;width:100%}.secondary-navigation.toggled .main-nav .sf-menu>li{float:none;clear:both;display:block!important;text-align:left!important}.secondary-navigation.toggled .main-nav .sf-menu>li.hide-on-mobile{display:none!important}.secondary-navigation.toggled .dropdown-menu-toggle:before{content:"\f107"!important}.secondary-navigation.toggled .sfHover>a .dropdown-menu-toggle:before{content:"\f106"!important}.secondary-navigation.toggled .menu-item-has-children .dropdown-menu-toggle{float:right}.secondary-navigation.toggled .sf-menu>li.menu-item-float-right{float:none!important;display:inline-block}.rtl .secondary-navigation.toggled .main-nav .sf-menu>li{text-align:right!important}@media (max-width:768px){.secondary-nav-aligned-center .secondary-navigation .top-bar+.menu-toggle+div,.secondary-navigation .menu-toggle{display:block}.secondary-navigation ul{display:none}.secondary-nav-aligned-left .secondary-navigation .top-bar{position:absolute;right:0}.secondary-nav-aligned-left .secondary-navigation .top-bar+.menu-toggle{text-align:left}.secondary-nav-aligned-right .secondary-navigation .top-bar{position:absolute;left:0}.secondary-nav-aligned-right .secondary-navigation .top-bar+.menu-toggle{text-align:right}}
|
@ -1,13 +1,5 @@
|
||||
.secondary-navigation.toggled ul ul {
|
||||
transition: 0s;
|
||||
}
|
||||
|
||||
.dropdown-hover .secondary-navigation.toggled ul li:hover > ul,
|
||||
.dropdown-hover .secondary-navigation.toggled ul li.sfHover > ul {
|
||||
transition-delay: 0s;
|
||||
}
|
||||
|
||||
.secondary-navigation.toggled ul ul {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
@ -15,6 +7,13 @@
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.secondary-navigation.toggled .main-nav ul ul {
|
||||
position: relative;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.secondary-navigation.toggled .main-nav ul ul.toggled-on {
|
||||
position: relative;
|
||||
top: 0;
|
||||
@ -31,13 +30,6 @@
|
||||
display: block;
|
||||
}
|
||||
|
||||
.secondary-navigation.toggled .main-nav ul ul {
|
||||
position: relative;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.secondary-navigation.toggled .main-nav .sf-menu > li {
|
||||
float: none;
|
||||
clear: both;
|
||||
@ -66,37 +58,39 @@
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.dropdown-hover .secondary-navigation.toggled ul li:hover > ul,
|
||||
.dropdown-hover .secondary-navigation.toggled ul li.sfHover > ul {
|
||||
transition-delay: 0s;
|
||||
}
|
||||
|
||||
.rtl .secondary-navigation.toggled .main-nav .sf-menu > li {
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.secondary-nav-float-left .inside-header .secondary-navigation {
|
||||
float: none;
|
||||
}
|
||||
.secondary-navigation .menu-toggle {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.secondary-navigation ul {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.secondary-nav-aligned-left .secondary-navigation .top-bar {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.secondary-nav-aligned-left .secondary-navigation .top-bar + .menu-toggle {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.secondary-nav-aligned-right .secondary-navigation .top-bar {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.secondary-nav-aligned-right .secondary-navigation .top-bar + .menu-toggle {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.secondary-nav-aligned-center .secondary-navigation .top-bar + .menu-toggle + div {
|
||||
display: block;
|
||||
}
|
1
wp-content/plugins/gp-premium/secondary-nav/functions/css/style-mobile.min.css
vendored
Normal file
1
wp-content/plugins/gp-premium/secondary-nav/functions/css/style-mobile.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.secondary-navigation.toggled ul ul{transition:0s;visibility:hidden}.secondary-navigation.toggled ul ul.toggled-on{visibility:visible}.secondary-navigation.toggled .main-nav ul ul{position:relative;top:0;left:0;width:100%}.secondary-navigation.toggled .main-nav ul ul.toggled-on{position:relative;top:0;left:auto!important;right:auto!important;width:100%;pointer-events:auto;height:auto;opacity:1;display:block}.secondary-navigation.toggled .main-nav>ul{display:block}.secondary-navigation.toggled .main-nav .sf-menu>li{float:none;clear:both;display:block!important;text-align:left!important}.secondary-navigation.toggled .main-nav .sf-menu>li.hide-on-mobile{display:none!important}.secondary-navigation.toggled .dropdown-menu-toggle:before{content:"\f107"!important}.secondary-navigation.toggled .sfHover>a .dropdown-menu-toggle:before{content:"\f106"!important}.secondary-navigation.toggled .menu-item-has-children .dropdown-menu-toggle{float:right}.secondary-navigation.toggled .sf-menu>li.menu-item-float-right{float:none!important;display:inline-block}.dropdown-hover .secondary-navigation.toggled ul li.sfHover>ul,.dropdown-hover .secondary-navigation.toggled ul li:hover>ul{transition-delay:0s}.rtl .secondary-navigation.toggled .main-nav .sf-menu>li{text-align:right!important}@media (max-width:768px){.secondary-nav-float-left .inside-header .secondary-navigation{float:none}.secondary-navigation .menu-toggle{display:block}.secondary-navigation ul{display:none}.secondary-nav-aligned-left .secondary-navigation .top-bar{position:absolute;right:0}.secondary-nav-aligned-left .secondary-navigation .top-bar+.menu-toggle{text-align:left}.secondary-nav-aligned-right .secondary-navigation .top-bar{position:absolute;left:0}.secondary-nav-aligned-right .secondary-navigation .top-bar+.menu-toggle{text-align:right}.secondary-nav-aligned-center .secondary-navigation .top-bar+.menu-toggle+div{display:block}}
|
@ -1,5 +1,7 @@
|
||||
.secondary-navigation {
|
||||
clear: both;
|
||||
z-index: 99;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.secondary-navigation ul {
|
||||
@ -40,10 +42,60 @@
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.secondary-navigation ul ul li a {
|
||||
line-height: normal;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
.secondary-navigation.sub-menu-left .sub-menu {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.secondary-navigation .main-nav ul ul li a {
|
||||
line-height: normal;
|
||||
font-size: 12px;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.secondary-navigation .main-nav ul li.menu-item-has-children > a {
|
||||
padding-right: 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.secondary-navigation .main-nav ul li a {
|
||||
font-family: inherit;
|
||||
font-weight: normal;
|
||||
text-transform: none;
|
||||
font-size: 13px;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.secondary-navigation .menu-toggle {
|
||||
font-family: inherit;
|
||||
font-weight: normal;
|
||||
text-transform: none;
|
||||
font-size: 13px;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
line-height: 40px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.secondary-navigation .menu-item-has-children .dropdown-menu-toggle {
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.secondary-navigation .menu-item-has-children ul .dropdown-menu-toggle {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
margin-top: -10px;
|
||||
}
|
||||
|
||||
.dropdown-hover .secondary-navigation:not(.toggled) ul li:hover > ul,
|
||||
.dropdown-hover .secondary-navigation:not(.toggled) ul li.sfHover > ul {
|
||||
left: auto;
|
||||
@ -71,13 +123,12 @@
|
||||
float: right;
|
||||
}
|
||||
|
||||
.secondary-navigation .main-nav ul ul li a,
|
||||
.secondary-nav-float-right .secondary-navigation .main-nav ul ul li a {
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.secondary-nav-float-right .secondary-navigation ul ul ul{
|
||||
top: 0
|
||||
.secondary-nav-float-right .secondary-navigation ul ul ul {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.secondary-nav-float-left .inside-header .secondary-navigation {
|
||||
@ -85,6 +136,12 @@
|
||||
clear: left;
|
||||
}
|
||||
|
||||
.secondary-nav-float-left .inside-header:after {
|
||||
clear: both;
|
||||
content: '';
|
||||
display: table;
|
||||
}
|
||||
|
||||
.secondary-nav-float-left:not(.nav-float-right) .inside-header .site-branding,
|
||||
.secondary-nav-float-left:not(.nav-float-right) .inside-header .site-logo {
|
||||
float: right;
|
||||
@ -92,63 +149,44 @@
|
||||
}
|
||||
|
||||
.secondary-nav-float-left.nav-float-right .inside-header .site-branding,
|
||||
.secondary-nav-float-left.nav-float-right .inside-header .site-logo,
|
||||
.nav-float-left.secondary-nav-float-right .inside-header .site-branding,
|
||||
.nav-float-left.secondary-nav-float-right .inside-header .site-logo {
|
||||
.secondary-nav-float-left.nav-float-right .inside-header .site-logo {
|
||||
float: none;
|
||||
clear: none;
|
||||
}
|
||||
|
||||
.secondary-nav-float-left .inside-header:after {
|
||||
clear: both;
|
||||
content: '';
|
||||
display: table;
|
||||
}
|
||||
|
||||
.secondary-nav-float-left.nav-float-right .site-header,
|
||||
.nav-float-left.secondary-nav-float-right .site-header {
|
||||
.secondary-nav-float-left.nav-float-right .site-header {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.secondary-navigation {
|
||||
z-index: 99;
|
||||
.secondary-nav-float-right.nav-float-left .inside-header .site-branding,
|
||||
.secondary-nav-float-right.nav-float-left .inside-header .site-logo {
|
||||
float: none;
|
||||
clear: none;
|
||||
}
|
||||
|
||||
.secondary-navigation {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.secondary-navigation .menu-toggle {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.secondary-navigation ul ul li a {
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.secondary-navigation ul ul li a {
|
||||
font-size: 90%;
|
||||
.secondary-nav-float-right.nav-float-left .site-header {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.widget-area .secondary-navigation li {
|
||||
display: block;
|
||||
float: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
display: block;
|
||||
float: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.widget-area .secondary-navigation ul ul {
|
||||
left: 100%;
|
||||
top: 0;
|
||||
width: 220px;
|
||||
left: 100%;
|
||||
top: 0;
|
||||
width: 220px;
|
||||
}
|
||||
|
||||
.both-right .widget-area .secondary-navigation ul ul,
|
||||
.right-sidebar .widget-area .secondary-navigation ul ul,
|
||||
.both-sidebars .widget-area .inside-right-sidebar .secondary-navigation ul ul {
|
||||
left: auto;
|
||||
right: 100%;
|
||||
left: auto;
|
||||
right: 100%;
|
||||
}
|
||||
|
||||
.secondary-nav-aligned-right.secondary-nav-below-header .secondary-navigation .sf-menu > li,
|
||||
@ -169,6 +207,13 @@
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.secondary-nav-aligned-left.secondary-nav-below-header .secondary-navigation:after,
|
||||
.secondary-nav-aligned-left.secondary-nav-above-header .secondary-navigation:after {
|
||||
clear: both;
|
||||
content: '';
|
||||
display: table;
|
||||
}
|
||||
|
||||
.secondary-nav-aligned-center.secondary-nav-below-header .secondary-navigation,
|
||||
.secondary-nav-aligned-center.secondary-nav-above-header .secondary-navigation {
|
||||
text-align: center;
|
||||
@ -199,12 +244,6 @@
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.dropdown-click.both-right .widget-area .secondary-navigation ul ul,
|
||||
.dropdown-click.right-sidebar .widget-area .secondary-navigation ul ul,
|
||||
.dropdown-click.both-sidebars .widget-area .inside-right-sidebar .secondary-navigation ul ul {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.dropdown-click .widget-area .secondary-navigation ul ul {
|
||||
top: auto;
|
||||
position: absolute;
|
||||
@ -219,24 +258,17 @@
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.secondary-navigation .main-nav ul li.menu-item-has-children > a {
|
||||
padding-right: 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.widget-area .secondary-navigation li {
|
||||
float: none;
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
.dropdown-click.both-right .widget-area .secondary-navigation ul ul,
|
||||
.dropdown-click.right-sidebar .widget-area .secondary-navigation ul ul,
|
||||
.dropdown-click.both-sidebars .widget-area .inside-right-sidebar .secondary-navigation ul ul {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.dropdown-hover .widget-area .secondary-navigation:not(.toggled) ul li:hover ul,
|
||||
.dropdown-hover .widget-area .secondary-navigation:not(.toggled) ul li.sfHover > ul {
|
||||
top: 0;
|
||||
left: 100%;
|
||||
width:220px;
|
||||
width: 220px;
|
||||
}
|
||||
|
||||
.dropdown-hover.both-right .widget-area .secondary-navigation:not(.toggled) ul li:hover ul,
|
||||
@ -249,66 +281,22 @@
|
||||
left: auto;
|
||||
}
|
||||
|
||||
.widget-area .secondary-navigation ul ul {
|
||||
top: 0;
|
||||
left: 100%;
|
||||
width: 220px;
|
||||
}
|
||||
|
||||
.rtl .secondary-navigation ul ul {
|
||||
float: right;
|
||||
left: auto;
|
||||
right: 0;
|
||||
text-align: right;
|
||||
float: right;
|
||||
left: auto;
|
||||
right: 0;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.rtl .secondary-navigation ul ul ul {
|
||||
left: auto;
|
||||
right: 100%;
|
||||
left: auto;
|
||||
right: 100%;
|
||||
}
|
||||
|
||||
.rtl .secondary-navigation .menu-item-has-children ul .dropdown-menu-toggle {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
/* Default styles */
|
||||
.widget-area .secondary-navigation {
|
||||
margin-bottom: 11px;
|
||||
}
|
||||
|
||||
.secondary-navigation ul ul {
|
||||
top: auto;
|
||||
}
|
||||
|
||||
.secondary-navigation .main-nav ul li a,
|
||||
.secondary-navigation .menu-toggle {
|
||||
font-family: inherit;
|
||||
font-weight: normal;
|
||||
text-transform: none;
|
||||
font-size: 13px;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.secondary-navigation .main-nav ul ul li a {
|
||||
font-size: 12px;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.secondary-navigation .menu-item-has-children ul .dropdown-menu-toggle {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
margin-top: -10px;
|
||||
}
|
||||
|
||||
.secondary-navigation .menu-item-has-children .dropdown-menu-toggle {
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
/* Top bar */
|
||||
.secondary-navigation .top-bar {
|
||||
background: transparent;
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
(function( $ ){
|
||||
/**
|
||||
(function( $ ){
|
||||
/**
|
||||
* Navigation width
|
||||
*/
|
||||
wp.customize( 'generate_secondary_nav_settings[secondary_nav_layout_setting]', function( value ) {
|
||||
@ -16,8 +16,8 @@
|
||||
}
|
||||
} );
|
||||
} );
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
* Inner navigation width
|
||||
*/
|
||||
wp.customize( 'generate_secondary_nav_settings[secondary_nav_inner_width]', function( value ) {
|
||||
@ -30,84 +30,7 @@
|
||||
}
|
||||
} );
|
||||
} );
|
||||
|
||||
/**
|
||||
* Navigation position
|
||||
*/
|
||||
wp.customize( 'generate_secondary_nav_settings[secondary_nav_position_setting]', function( value ) {
|
||||
value.bind( function( newval ) {
|
||||
// Refresh if our top bar is in the secondary navigation and we're moving the secondary nav from above the header
|
||||
if ( ( $( '.secondary-navigation .top-bar' ).length || $( '.top-bar' ).next( '.secondary-navigation' ).length ) && 'secondary-nav-above-header' !== newval ) {
|
||||
wp.customize.preview.send( 'refresh' );
|
||||
return false;
|
||||
}
|
||||
|
||||
// Refresh if our top bar exists and we're moving the secondary nav above the header
|
||||
if ( $( '.top-bar' ).length && 'secondary-nav-above-header' == newval ) {
|
||||
wp.customize.preview.send( 'refresh' );
|
||||
return false;
|
||||
}
|
||||
|
||||
// Refresh if our secondary nav was in the sidebar
|
||||
if ( $( '.gen-sidebar-secondary-nav' ).length ) {
|
||||
wp.customize.preview.send( 'refresh' );
|
||||
return false;
|
||||
}
|
||||
|
||||
// Refresh if we're moving the secondary nav into the left sidebar
|
||||
if ( 'secondary-nav-left-sidebar' == newval ) {
|
||||
wp.customize.preview.send( 'refresh' );
|
||||
return false;
|
||||
}
|
||||
|
||||
// Refresh if we're moving the secondary nav into the right sidebar
|
||||
if ( 'secondary-nav-right-sidebar' == newval ) {
|
||||
wp.customize.preview.send( 'refresh' );
|
||||
return false;
|
||||
}
|
||||
|
||||
// Update our body classes depending on our setting
|
||||
var classes = [ 'secondary-nav-below-header', 'secondary-nav-above-header', 'secondary-nav-float-right', 'secondary-nav-float-left', 'secondary-nav-left-sidebar', 'secondary-nav-right-sidebar' ];
|
||||
if ( 'secondary-nav-left-sidebar' !== newval && 'secondary-nav-right-sidebar' !== newval ) {
|
||||
$.each( classes, function( i, v ) {
|
||||
$( 'body' ).removeClass( v );
|
||||
});
|
||||
}
|
||||
$( 'body' ).addClass( newval );
|
||||
|
||||
// Make sure we move the secondary nav below the primary nav if it's below the header
|
||||
if ( 'secondary-nav-below-header' == newval ) {
|
||||
if ( $( 'body' ).hasClass( 'nav-below-header' ) ) {
|
||||
$( '#secondary-navigation' ).insertAfter( '#site-navigation' ).show();
|
||||
} else {
|
||||
$( '#secondary-navigation' ).insertAfter( '.site-header' ).show();
|
||||
}
|
||||
}
|
||||
|
||||
// Insert our secondary nav before the header
|
||||
if ( 'secondary-nav-above-header' == newval ) {
|
||||
$( '#secondary-navigation' ).insertBefore( '.site-header' ).show();
|
||||
}
|
||||
|
||||
// Insert our nav into the header
|
||||
if ( 'secondary-nav-float-right' == newval ) {
|
||||
$( '#secondary-navigation' ).prependTo( '.inside-header' ).show();
|
||||
}
|
||||
if ( 'secondary-nav-float-left' == newval ) {
|
||||
$( '#secondary-navigation' ).appendTo( '.inside-header' ).show();
|
||||
}
|
||||
|
||||
// If we're hiding the secondary nav, either refresh or simply hide it
|
||||
if ( '' == newval ) {
|
||||
if ( $( '.gen-sidebar-secondary-nav' ).length ) {
|
||||
wp.customize.preview.send( 'refresh' );
|
||||
} else {
|
||||
$( '#secondary-navigation' ).hide();
|
||||
}
|
||||
}
|
||||
} );
|
||||
} );
|
||||
|
||||
|
||||
wp.customize( 'generate_secondary_nav_settings[secondary_nav_alignment]', function( value ) {
|
||||
value.bind( function( newval ) {
|
||||
var classes = [ 'secondary-nav-aligned-left', 'secondary-nav-aligned-center', 'secondary-nav-aligned-right' ];
|
||||
@ -117,25 +40,25 @@
|
||||
$( 'body' ).addClass( 'secondary-nav-aligned-' + newval );
|
||||
} );
|
||||
} );
|
||||
|
||||
|
||||
wp.customize( 'generate_secondary_nav_settings[secondary_menu_item]', function( value ) {
|
||||
value.bind( function( newval ) {
|
||||
jQuery( 'head' ).append( '<style id="secondary_menu_item">.secondary-navigation .main-nav ul li a, .secondary-navigation .menu-toggle{padding: 0 ' + newval + 'px;}.secondary-navigation .menu-item-has-children .dropdown-menu-toggle{padding-right:' + newval + 'px;}</style>' );
|
||||
jQuery( 'head' ).append( '<style id="secondary_menu_item">.secondary-navigation .main-nav ul li a, .secondary-navigation .menu-toggle, .secondary-menu-bar-items .menu-bar-item > a{padding: 0 ' + newval + 'px;}.secondary-navigation .menu-item-has-children .dropdown-menu-toggle{padding-right:' + newval + 'px;}</style>' );
|
||||
setTimeout(function() {
|
||||
jQuery( 'style#secondary_menu_item' ).not( ':last' ).remove();
|
||||
}, 50);
|
||||
} );
|
||||
} );
|
||||
|
||||
|
||||
wp.customize( 'generate_secondary_nav_settings[secondary_menu_item_height]', function( value ) {
|
||||
value.bind( function( newval ) {
|
||||
jQuery( 'head' ).append( '<style id="secondary_menu_item_height">.secondary-navigation .main-nav ul li a, .secondary-navigation .menu-toggle, .secondary-navigation .top-bar{line-height: ' + newval + 'px;}.secondary-navigation ul ul{top:' + newval + 'px;}</style>' );
|
||||
jQuery( 'head' ).append( '<style id="secondary_menu_item_height">.secondary-navigation .main-nav ul li a, .secondary-navigation .menu-toggle, .secondary-navigation .top-bar, .secondary-navigation .menu-bar-item > a{line-height: ' + newval + 'px;}.secondary-navigation ul ul{top:' + newval + 'px;}</style>' );
|
||||
setTimeout(function() {
|
||||
jQuery( 'style#secondary_menu_item_height' ).not( ':last' ).remove();
|
||||
}, 50);
|
||||
} );
|
||||
} );
|
||||
|
||||
|
||||
wp.customize( 'generate_secondary_nav_settings[secondary_sub_menu_item_height]', function( value ) {
|
||||
value.bind( function( newval ) {
|
||||
jQuery( 'head' ).append( '<style id="secondary_sub_menu_item_height">.secondary-navigation .main-nav ul ul li a{padding-top: ' + newval + 'px;padding-bottom: ' + newval + 'px;}</style>' );
|
||||
@ -145,4 +68,4 @@
|
||||
} );
|
||||
} );
|
||||
|
||||
})( jQuery );
|
||||
})( jQuery );
|
||||
|
@ -1,19 +1,20 @@
|
||||
<?php
|
||||
/*
|
||||
Addon Name: Generate Secondary Nav
|
||||
Author: Thomas Usborne
|
||||
Author URI: http://edge22.com
|
||||
*/
|
||||
/**
|
||||
* The Secondary Nav module.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @package GP Premium
|
||||
*/
|
||||
|
||||
// No direct access, please
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
exit; // No direct access, please.
|
||||
}
|
||||
|
||||
// Define the version
|
||||
// Define the version.
|
||||
if ( ! defined( 'GENERATE_SECONDARY_NAV_VERSION' ) ) {
|
||||
define( 'GENERATE_SECONDARY_NAV_VERSION', GP_PREMIUM_VERSION );
|
||||
}
|
||||
|
||||
// Include functions identical between standalone addon and GP Premium
|
||||
// Include functions identical between standalone addon and GP Premium.
|
||||
require plugin_dir_path( __FILE__ ) . 'functions/functions.php';
|
||||
|
Reference in New Issue
Block a user