mirror of
https://ghproxy.net/https://github.com/AlxMedia/splits.git
synced 2025-08-26 00:20:57 +08:00
1.4.1
This commit is contained in:
parent
503f8822f3
commit
3adf01523b
11 changed files with 995 additions and 299 deletions
12
footer.php
12
footer.php
|
@ -43,12 +43,12 @@
|
|||
</div><!--/.container-->
|
||||
<?php } ?>
|
||||
|
||||
<?php if ( has_nav_menu( 'footer' ) ): ?>
|
||||
<nav class="nav-container group" id="nav-footer">
|
||||
<div class="nav-toggle"><i class="fas fa-bars"></i></div>
|
||||
<div class="nav-text"><!-- put your mobile menu text here --></div>
|
||||
<div class="nav-wrap"><?php wp_nav_menu( array('theme_location'=>'footer','menu_class'=>'nav container group','container'=>'','menu_id'=>'','fallback_cb'=>false) ); ?></div>
|
||||
</nav><!--/#nav-footer-->
|
||||
<?php if ( has_nav_menu('footer') ): ?>
|
||||
<div id="wrap-nav-footer" class="wrap-nav">
|
||||
<div class="container">
|
||||
<?php \AlxMedia\Nav::nav_menu(array('theme_location'=>'footer','menu_id' => 'nav-footer','fallback_cb'=> false)); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div id="footer-bottom">
|
||||
|
|
|
@ -95,6 +95,19 @@ if ( ! function_exists( 'split_setup' ) ) {
|
|||
add_action( 'after_setup_theme', 'split_setup' );
|
||||
|
||||
|
||||
/* Custom navigation
|
||||
/* ------------------------------------ */
|
||||
require_once 'functions/nav.php';
|
||||
$nav = new \AlxMedia\Nav();
|
||||
$nav->enqueue(
|
||||
[
|
||||
'script' => 'js/nav.js',
|
||||
'inline' => false,
|
||||
]
|
||||
);
|
||||
$nav->init();
|
||||
|
||||
|
||||
/* Custom logo
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'split_custom_logo' ) ) {
|
||||
|
|
|
@ -144,8 +144,6 @@ a,
|
|||
.themeform button[type="button"],
|
||||
.themeform button[type="reset"],
|
||||
.themeform button[type="submit"],
|
||||
#nav-topbar.nav-container,
|
||||
#nav-topbar .nav ul,
|
||||
.post-comments,
|
||||
.post-tags a:hover,
|
||||
.widget_calendar caption,
|
||||
|
@ -161,16 +159,18 @@ a,
|
|||
.comment-tabs li.active a,
|
||||
.wp-pagenavi a:hover,
|
||||
.wp-pagenavi a:active,
|
||||
.wp-pagenavi span.current { border-bottom-color: '.esc_attr( get_theme_mod('color-1') ).'!important; }
|
||||
.wp-pagenavi span.current { border-bottom-color: '.esc_attr( get_theme_mod('color-1') ).'!important; }
|
||||
|
||||
#wrap-nav-topbar { background: '.esc_attr( get_theme_mod('color-1') ).'; }
|
||||
#wrap-nav-topbar .nav-menu:not(.mobile) .menu ul { background: '.esc_attr( get_theme_mod('color-1') ).'; }
|
||||
#wrap-nav-topbar .nav-menu:not(.mobile) .menu ul:after { border-bottom-color: '.esc_attr( get_theme_mod('color-1') ).'; }
|
||||
#wrap-nav-topbar .nav-menu:not(.mobile) .menu ul ul:after { border-right-color: '.esc_attr( get_theme_mod('color-1') ).'; border-bottom-color: transparent; }
|
||||
'."\n";
|
||||
}
|
||||
// mobile menu color
|
||||
if ( get_theme_mod('color-mobile-menu','#cd483c') != '#cd483c' ) {
|
||||
$styles .= '
|
||||
#nav-mobile.nav-container { background-color: '.esc_attr( get_theme_mod('color-mobile-menu') ).'; }
|
||||
@media only screen and (min-width: 720px) {
|
||||
#nav-mobile .nav ul { background-color: '.esc_attr( get_theme_mod('color-mobile-menu') ).'; }
|
||||
}
|
||||
#wrap-nav-mobile .nav-menu.mobile { background-color: '.esc_attr( get_theme_mod('color-mobile-menu') ).'; }
|
||||
'."\n";
|
||||
}
|
||||
// footer menu color
|
||||
|
@ -179,11 +179,13 @@ a,
|
|||
#footer-bottom #back-to-top { color: rgba(255,255,255,0.7); }
|
||||
#footer-bottom #back-to-top:hover { color: #fff; }
|
||||
#footer-bottom { border-color: '.esc_attr( get_theme_mod('color-footer-menu') ).'; }
|
||||
#nav-footer.nav-container,
|
||||
#wrap-nav-footer,
|
||||
#footer-bottom #back-to-top { background-color: '.esc_attr( get_theme_mod('color-footer-menu') ).'; }
|
||||
@media only screen and (min-width: 720px) {
|
||||
#nav-footer .nav ul { background-color: '.esc_attr( get_theme_mod('color-footer-menu') ).'; }
|
||||
}
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) .menu ul { background: '.esc_attr( get_theme_mod('color-footer-menu') ).'; }
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) .menu ul:after { border-top-color: '.esc_attr( get_theme_mod('color-footer-menu') ).'; border-bottom-color: transparent; }
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) .menu ul ul:after { border-right-color: '.esc_attr( get_theme_mod('color-footer-menu') ).'; border-top-color: transparent; }
|
||||
|
||||
#wrap-nav-footer .nav-menu.mobile { background: '.esc_attr( get_theme_mod('color-footer-menu') ).'; }
|
||||
'."\n";
|
||||
}
|
||||
// footer color
|
||||
|
|
305
functions/nav.php
Normal file
305
functions/nav.php
Normal file
|
@ -0,0 +1,305 @@
|
|||
<?php // phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase
|
||||
/**
|
||||
* An accessible and mobile-friendly implementation for navigation menus.
|
||||
*/
|
||||
|
||||
namespace AlxMedia;
|
||||
|
||||
/**
|
||||
* Object containing all methods and hooks to modify default menus.
|
||||
*/
|
||||
class Nav {
|
||||
|
||||
/**
|
||||
* Whether the script has already been enqueued or not.
|
||||
*
|
||||
* @static
|
||||
*
|
||||
* @access protected
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected static $enqueued = false;
|
||||
|
||||
/**
|
||||
* Whether we added scripts & styles inline or not.
|
||||
*
|
||||
* @access protected
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $inline = false;
|
||||
|
||||
/**
|
||||
* An array containing URLs for our assets.
|
||||
*
|
||||
* @access protected
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $assets = [];
|
||||
|
||||
/**
|
||||
* Prefix for asset handles.
|
||||
*
|
||||
* @access protected
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $handle_prefix = 'alexmedia-nav';
|
||||
|
||||
/**
|
||||
* Init.
|
||||
*
|
||||
* @access public
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function init() {
|
||||
add_filter( 'walker_nav_menu_start_el', [ $this, 'add_nav_sub_menu_buttons' ], 10, 4 );
|
||||
add_filter( 'nav_menu_item_title', [ $this, 'nav_menu_item_title' ], 10, 4 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueue assets.
|
||||
*
|
||||
* @access public
|
||||
*
|
||||
* @param array $args The arguments [script=>URL,style=>URL,inline=>true|false].
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function enqueue( $args = false ) {
|
||||
if ( ! $args ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Early exit if we've already enqueued our assets.
|
||||
if ( self::$enqueued ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$args = wp_parse_args(
|
||||
$args,
|
||||
[
|
||||
'script' => false,
|
||||
'style' => false,
|
||||
'inline' => false,
|
||||
]
|
||||
);
|
||||
|
||||
$this->assets['script'] = $args['script'];
|
||||
$this->assets['style'] = $args['style'];
|
||||
$this->inline = $args['inline'];
|
||||
|
||||
if ( $this->inline ) {
|
||||
add_action( 'wp_footer', [ $this, 'inline_assets' ] );
|
||||
} else {
|
||||
add_action( 'wp_enqueue_scripts', [ $this, 'enqueue_assets' ] );
|
||||
}
|
||||
self::$enqueued = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Inline assets.
|
||||
*
|
||||
* @access public
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function inline_assets() {
|
||||
if ( $this->assets['script'] ) {
|
||||
echo '<script>';
|
||||
include get_theme_file_path( $this->assets['script'] );
|
||||
echo '</script>';
|
||||
}
|
||||
|
||||
if ( $this->assets['style'] ) {
|
||||
echo '<style>';
|
||||
include get_theme_file_path( $this->assets['style'] );
|
||||
echo '</style>';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueue assets.
|
||||
*
|
||||
* @access public
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function enqueue_assets() {
|
||||
if ( $this->assets['style'] ) {
|
||||
wp_enqueue_style(
|
||||
$this->handle_prefix . '-style',
|
||||
get_theme_file_uri( $this->assets['style'] ),
|
||||
[],
|
||||
filemtime( get_theme_file_path( $this->assets['style'] ) )
|
||||
);
|
||||
}
|
||||
|
||||
if ( $this->assets['script'] ) {
|
||||
wp_enqueue_script(
|
||||
$this->handle_prefix . '-script',
|
||||
get_theme_file_uri( $this->assets['script'] ),
|
||||
[],
|
||||
filemtime( get_theme_file_path( $this->assets['script'] ) ),
|
||||
true
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A wrapper for the wp_nav_menu function, adding our custom HTML for the expand/collapse button.
|
||||
*
|
||||
* @static
|
||||
*
|
||||
* @access public
|
||||
*
|
||||
* @param array $args The arguments to pass to wp_nav_menu().
|
||||
* @param string|false $toggle_label The label for our toggle button.
|
||||
* @param string $nav_classes CSS classes to add to the <nav> element.
|
||||
* If left false then the default will be used.
|
||||
* @return void
|
||||
*/
|
||||
public static function nav_menu( $args, $toggle_label = false, $nav_classes = 'main-navigation nav-menu' ) {
|
||||
if ( false === $toggle_label ) {
|
||||
$toggle_label = '<span class="screen-reader-text">' . esc_html__( 'Expand Menu', 'split' ) . '</span><div class="menu-toggle-icon"><span></span><span></span><span></span></div>';
|
||||
}
|
||||
?>
|
||||
<nav id="<?php echo esc_attr( $args['menu_id'] ); ?>-nav" class="<?php echo esc_attr( $nav_classes ); ?>">
|
||||
<button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false">
|
||||
<?php
|
||||
/**
|
||||
* Note to code reviewers:
|
||||
* The $toggle_label variable is hardcoded and there is no user input involved.
|
||||
* There is no need to escape hardcoded strings, so we can ignore the PHPCS notices here.
|
||||
*/
|
||||
echo $toggle_label; // phpcs:ignore WordPress.Security.EscapeOutput
|
||||
?>
|
||||
</button>
|
||||
<?php wp_nav_menu( $args ); ?>
|
||||
</nav>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the HTML output of a nav menu item to add the dropdown button that reveal the sub-menu.
|
||||
*
|
||||
* @access public
|
||||
*
|
||||
* @param string $item_output The menu item's starting HTML output.
|
||||
* @param WP_Post $item Menu item data object.
|
||||
* @param int $depth Depth of menu item. Used for padding.
|
||||
* @param stdClass $args An object of wp_nav_menu() arguments.
|
||||
*
|
||||
* @return string Modified nav menu item HTML.
|
||||
*/
|
||||
public function add_nav_sub_menu_buttons( $item_output, $item, $depth, $args ) {
|
||||
|
||||
if ( ! $args->theme_location ) {
|
||||
return $item_output;
|
||||
}
|
||||
|
||||
$html = '<span class="menu-item-wrapper">';
|
||||
|
||||
// Skip when the item has no sub-menu.
|
||||
if ( in_array( 'menu-item-has-children', $item->classes, true ) ) {
|
||||
$html = '<span class="menu-item-wrapper has-arrow">';
|
||||
$item_output .= '<button onClick="alxMediaMenu.toggleItem(this)"><span class="screen-reader-text">' . esc_html__( 'Toggle Child Menu', 'split' ) . '</span><svg class="svg-icon" aria-hidden="true" role="img" focusable="false" xmlns="http://www.w3.org/2000/svg" width="14" height="8" viewBox="0 0 20 12"><polygon fill="" fill-rule="evenodd" points="1319.899 365.778 1327.678 358 1329.799 360.121 1319.899 370.021 1310 360.121 1312.121 358" transform="translate(-1310 -358)"></polygon></svg></button>';
|
||||
}
|
||||
|
||||
$html .= $item_output;
|
||||
$html .= '</span>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters a menu item's title.
|
||||
*
|
||||
* This is an accessibility improvement.
|
||||
* Verbally highlights the current item for screen-readers.
|
||||
*
|
||||
* @access public
|
||||
*
|
||||
* @param string $title The menu item's title.
|
||||
* @param WP_Post $item The current menu item.
|
||||
* @param stdClass $args An object of wp_nav_menu() arguments.
|
||||
* @param int $depth Depth of menu item. Used for padding.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function nav_menu_item_title( $title, $item, $args, $depth ) {
|
||||
|
||||
if ( ! $args->theme_location ) {
|
||||
return $title;
|
||||
}
|
||||
|
||||
// Classes that can be used to indicate the currently active menu item.
|
||||
$is_current_classes = [
|
||||
'current-menu-item',
|
||||
'current_page_item',
|
||||
];
|
||||
|
||||
// Classes that can be used to indicate the parent of a currently active menu item.
|
||||
$is_current_parent_classes = [
|
||||
'current-page-ancestor',
|
||||
'current-menu-ancestor',
|
||||
'current-menu-parent',
|
||||
'current-page-parent',
|
||||
'current_page_parent',
|
||||
'current_page_ancestor',
|
||||
];
|
||||
|
||||
// Figure out if this menu-item is the current one.
|
||||
$is_current = false;
|
||||
foreach ( $is_current_classes as $class ) {
|
||||
if ( in_array( $class, $item->classes, true ) ) {
|
||||
$is_current = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Figure out if this menu-item is a parent of the current one.
|
||||
$is_current_parent = false;
|
||||
if ( ! $is_current ) {
|
||||
foreach ( $is_current_parent_classes as $class ) {
|
||||
if ( in_array( $class, $item->classes, true ) ) {
|
||||
$is_current_parent = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Change the title text for current items.
|
||||
if ( $is_current ) {
|
||||
/**
|
||||
* Use sprintf() to allow LTR languages to reverse the order
|
||||
* and put the title before the prefix.
|
||||
*/
|
||||
return sprintf(
|
||||
/* Translators: %1$s: "Current Page:". %2$s: The menu-item title. */
|
||||
__( '<span class="screen-reader-text">%1$s </span>%2$s', 'split' ),
|
||||
esc_html__( 'Current Page:', 'split' ),
|
||||
$title
|
||||
);
|
||||
}
|
||||
|
||||
// Change the title text for current item parents.
|
||||
if ( $is_current_parent ) {
|
||||
/**
|
||||
* Use sprintf() to allow LTR languages to reverse the order
|
||||
* and put the title before the prefix.
|
||||
*/
|
||||
return sprintf(
|
||||
/* Translators: %1$s: "Current Page Parent:". %2$s: The menu-item title. */
|
||||
__( '<span class="screen-reader-text">%1$s </span>%2$s', 'split' ),
|
||||
esc_html__( 'Current Page Parent', 'split' ),
|
||||
$title
|
||||
);
|
||||
}
|
||||
|
||||
return $title;
|
||||
}
|
||||
}
|
33
header.php
33
header.php
|
@ -25,19 +25,17 @@
|
|||
<?php endif; ?>
|
||||
|
||||
<?php if ( has_nav_menu('mobile') ): ?>
|
||||
<nav class="nav-container group" id="nav-mobile">
|
||||
<div class="nav-toggle"><i class="fas fa-bars"></i></div>
|
||||
<div class="nav-text"><!-- put your mobile menu text here --></div>
|
||||
<div class="nav-wrap container"><?php wp_nav_menu(array('theme_location'=>'mobile','menu_class'=>'nav container-inner group','container'=>'','menu_id' => '','fallback_cb'=> false)); ?></div>
|
||||
</nav><!--/#nav-mobile-->
|
||||
<div id="wrap-nav-mobile" class="wrap-nav">
|
||||
<?php \AlxMedia\Nav::nav_menu(array('theme_location'=>'mobile','menu_id' => 'nav-mobile','fallback_cb'=> false)); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( has_nav_menu('topbar') ): ?>
|
||||
<nav class="nav-container group" id="nav-topbar">
|
||||
<div class="nav-toggle"><i class="fas fa-bars"></i></div>
|
||||
<div class="nav-text"><!-- put your mobile menu text here --></div>
|
||||
<div class="nav-wrap container"><?php wp_nav_menu(array('theme_location'=>'topbar','menu_class'=>'nav container-inner group','container'=>'','menu_id' => '','fallback_cb'=> false)); ?></div>
|
||||
</nav><!--/#nav-topbar-->
|
||||
<div id="wrap-nav-topbar" class="wrap-nav">
|
||||
<div class="container">
|
||||
<?php \AlxMedia\Nav::nav_menu(array('theme_location'=>'topbar','menu_id' => 'nav-topbar','fallback_cb'=> false)); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<header id="header" class="group">
|
||||
|
@ -45,7 +43,10 @@
|
|||
<?php if ( get_theme_mod( 'header-search', 'on' ) == 'on' ): ?>
|
||||
<div class="container group">
|
||||
<div class="group pad">
|
||||
<div class="toggle-search"><i class="fas fa-search"></i></div>
|
||||
<button class="toggle-search">
|
||||
<svg class="svg-icon" id="svg-search" aria-hidden="true" role="img" focusable="false" xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewBox="0 0 23 23"><path d="M38.710696,48.0601792 L43,52.3494831 L41.3494831,54 L37.0601792,49.710696 C35.2632422,51.1481185 32.9839107,52.0076499 30.5038249,52.0076499 C24.7027226,52.0076499 20,47.3049272 20,41.5038249 C20,35.7027226 24.7027226,31 30.5038249,31 C36.3049272,31 41.0076499,35.7027226 41.0076499,41.5038249 C41.0076499,43.9839107 40.1481185,46.2632422 38.710696,48.0601792 Z M36.3875844,47.1716785 C37.8030221,45.7026647 38.6734666,43.7048964 38.6734666,41.5038249 C38.6734666,36.9918565 35.0157934,33.3341833 30.5038249,33.3341833 C25.9918565,33.3341833 22.3341833,36.9918565 22.3341833,41.5038249 C22.3341833,46.0157934 25.9918565,49.6734666 30.5038249,49.6734666 C32.7048964,49.6734666 34.7026647,48.8030221 36.1716785,47.3875844 C36.2023931,47.347638 36.2360451,47.3092237 36.2726343,47.2726343 C36.3092237,47.2360451 36.347638,47.2023931 36.3875844,47.1716785 Z" transform="translate(-20 -31)"></path></svg>
|
||||
<svg class="svg-icon" id="svg-close" aria-hidden="true" role="img" focusable="false" xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewBox="0 0 16 16"><polygon fill="" fill-rule="evenodd" points="6.852 7.649 .399 1.195 1.445 .149 7.899 6.602 14.352 .149 15.399 1.195 8.945 7.649 15.399 14.102 14.352 15.149 7.899 8.695 1.445 15.149 .399 14.102"></polygon></svg>
|
||||
</button>
|
||||
<div class="search-expand">
|
||||
<div class="search-expand-inner">
|
||||
<?php get_search_form(); ?>
|
||||
|
@ -56,18 +57,16 @@
|
|||
<?php endif; ?>
|
||||
|
||||
<div class="container group">
|
||||
<div class="group pad">
|
||||
<div class="group pad nav-menu-dropdown-left">
|
||||
<?php echo split_site_title(); ?>
|
||||
<?php if ( display_header_text() == true ): ?>
|
||||
<p class="site-description"><?php bloginfo( 'description' ); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( has_nav_menu('header') ): ?>
|
||||
<nav class="nav-container group" id="nav-header">
|
||||
<div class="nav-toggle"><i class="fas fa-bars"></i></div>
|
||||
<div class="nav-text"><!-- put your mobile menu text here --></div>
|
||||
<div class="nav-wrap container"><?php wp_nav_menu(array('theme_location'=>'header','menu_class'=>'nav group','container'=>'','menu_id' => '','fallback_cb'=> false)); ?></div>
|
||||
</nav><!--/#nav-header-->
|
||||
<div id="wrap-nav-header" class="wrap-nav">
|
||||
<?php \AlxMedia\Nav::nav_menu(array('theme_location'=>'header','menu_id' => 'nav-header','fallback_cb'=> false)); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div><!--/.pad-->
|
||||
|
|
319
js/nav.js
Normal file
319
js/nav.js
Normal file
|
@ -0,0 +1,319 @@
|
|||
/**
|
||||
* Polyfill for IE11 - adds NodeList.foreach().
|
||||
*
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach
|
||||
*/
|
||||
if ( window.NodeList && ! NodeList.prototype.forEach ) {
|
||||
NodeList.prototype.forEach = function( callback, thisArg ) {
|
||||
thisArg = thisArg || window;
|
||||
for ( var i = 0; i < this.length; i++ ) { // eslint-disable-line vars-on-top
|
||||
callback.call( thisArg, this[ i ], i, this );
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
window.alxMediaMenu = {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {Object} args - The arguments.
|
||||
* @param {string} args.selector - The navigation selector.
|
||||
* @param {int} args.breakpoint - The breakpoint in pixels.
|
||||
*/
|
||||
init: function( args ) {
|
||||
var self = this,
|
||||
navs = document.querySelectorAll( args.selector );
|
||||
|
||||
if ( ! navs.length ) {
|
||||
return;
|
||||
}
|
||||
|
||||
navs.forEach( function( nav ) {
|
||||
var menuToggler = nav.querySelector( '.menu-toggle' );
|
||||
|
||||
// Hide menu toggle button if menu is empty and return early.
|
||||
if ( ! nav.querySelector( 'ul' ) && nav.querySelector( '.menu-toggle' ) ) {
|
||||
nav.querySelector( '.menu-toggle' ).style.display = 'none';
|
||||
}
|
||||
|
||||
// Add nav-menu class.
|
||||
if ( ! nav.classList.contains( 'nav-menu' ) ) {
|
||||
nav.classList.add( 'nav-menu' );
|
||||
}
|
||||
|
||||
// Toggle the hover event listeners.
|
||||
self.toggleHoverEventListeners( nav );
|
||||
|
||||
// Toggle focus classes on links.
|
||||
nav.querySelectorAll( 'a,button' ).forEach( function( link ) {
|
||||
link.addEventListener( 'focus', window.alxMediaMenu.toggleFocus, true );
|
||||
link.addEventListener( 'blur', window.alxMediaMenu.toggleFocus, true );
|
||||
});
|
||||
|
||||
menuToggler.addEventListener( 'click', function() {
|
||||
if ( nav.classList.contains( 'toggled' ) ) {
|
||||
menuToggler.setAttribute( 'aria-expanded', 'false' );
|
||||
nav.classList.remove( 'toggled' );
|
||||
} else {
|
||||
menuToggler.setAttribute( 'aria-expanded', 'true' );
|
||||
nav.classList.add( 'toggled' );
|
||||
}
|
||||
});
|
||||
|
||||
// If on mobile nav, close it when clicking outside.
|
||||
// If on desktop, close expanded submenus when clicking outside.
|
||||
document.addEventListener( 'click', function( event ) {
|
||||
if ( ! nav.contains( event.target ) ) {
|
||||
|
||||
// Mobile.
|
||||
nav.classList.remove( 'toggled' );
|
||||
|
||||
// Desktop.
|
||||
nav.querySelectorAll( 'button.active,.sub-menu.active' ).forEach( function( el ) {
|
||||
el.classList.remove( 'active' );
|
||||
});
|
||||
|
||||
menuToggler.setAttribute( 'aria-expanded', 'false' );
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Toggle mobile classes on initial load.
|
||||
window.alxMediaMenu.toggleMobile( args.selector, args.breakpoint );
|
||||
|
||||
// Toggle mobile classes on resize.
|
||||
window.addEventListener( 'resize', function() {
|
||||
|
||||
// If timer is null, reset it to our bounceDelay and run, otherwise wait until timer is cleared.
|
||||
if ( ! window.resizeDebouncedTimeout ) {
|
||||
window.resizeDebouncedTimeout = setTimeout( function() {
|
||||
window.resizeDebouncedTimeout = null;
|
||||
window.alxMediaMenu.toggleMobile( args.selector, args.breakpoint );
|
||||
}, 250 );
|
||||
}
|
||||
});
|
||||
|
||||
// Toggle focus classes to allow submenu access on tables.
|
||||
document.querySelectorAll( args.selector ).forEach( function( el ) {
|
||||
window.alxMediaMenu.toggleFocusTouch( el );
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Expand a menu item.
|
||||
*
|
||||
* @param {Element} - The menu item (DOM element).
|
||||
* @return {void}
|
||||
*/
|
||||
toggleItem: function( el ) {
|
||||
var parentLi = this.helper.firstAncestorMatch( el, 'li' ),
|
||||
parentUl = this.helper.firstAncestorMatch( el, 'ul' ),
|
||||
ul = parentLi.querySelector( 'ul.sub-menu' );
|
||||
|
||||
parentLi.classList.remove( 'hover' );
|
||||
|
||||
ul.setAttribute( 'tabindex', '-1' );
|
||||
this.helper.toggleClass( ul, 'active' );
|
||||
this.helper.toggleClass( el, 'active' );
|
||||
|
||||
// Go one level up in the list, and close other items that are already open.
|
||||
parentUl.querySelectorAll( 'ul.sub-menu' ).forEach( function( subMenu ) {
|
||||
var subMenuButton;
|
||||
if ( ! parentLi.contains( subMenu ) ) {
|
||||
subMenu.classList.remove( 'active' );
|
||||
subMenuButton = subMenu.parentNode.querySelector( 'button.active' );
|
||||
if ( subMenuButton ) {
|
||||
subMenuButton.classList.remove( 'active' );
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Toggles a mobile class to elements matching our selector,
|
||||
* depending on the defined breakpoint.
|
||||
*
|
||||
* @param {string} selector - The elements where we want to toggle our mobile class.
|
||||
* @param {string} className - The class-name we want to toggle.
|
||||
* @param {int} breakpoint - The breakpoint.
|
||||
* @return {void}
|
||||
*/
|
||||
toggleMobile: function( selector, breakpoint ) {
|
||||
var self = this,
|
||||
screenWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,
|
||||
navs = document.body.querySelectorAll( selector ),
|
||||
isMobile;
|
||||
|
||||
breakpoint = breakpoint || 720;
|
||||
isMobile = breakpoint > screenWidth;
|
||||
|
||||
if ( isMobile ) {
|
||||
navs.forEach( function( nav ) {
|
||||
if ( ! nav.classList.contains( 'mobile' ) ) {
|
||||
nav.classList.add( 'mobile' );
|
||||
self.toggleHoverEventListeners( nav );
|
||||
}
|
||||
});
|
||||
} else {
|
||||
navs.forEach( function( nav ) {
|
||||
if ( nav.classList.contains( 'mobile' ) ) {
|
||||
nav.classList.remove( 'mobile' );
|
||||
self.toggleHoverEventListeners( nav );
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Add a "hover" class.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
liMouseEnterEvent: function() {
|
||||
this.classList.add( 'hover' );
|
||||
},
|
||||
|
||||
/**
|
||||
* Remove the "hover" class.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
liMouseLeaveEvent: function() {
|
||||
this.classList.remove( 'hover' );
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {Element} nav - The nav element.
|
||||
* @return {void}
|
||||
*/
|
||||
toggleHoverEventListeners: function( nav ) {
|
||||
if ( nav.classList.contains( 'mobile' ) ) {
|
||||
this.removeHoverEventListeners( nav );
|
||||
} else {
|
||||
this.addHoverEventListeners( nav );
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Add event-listeners for hover events.
|
||||
*
|
||||
* @param {Element} nav - The nav element.
|
||||
* @return {void}
|
||||
*/
|
||||
addHoverEventListeners: function( nav ) {
|
||||
nav.querySelectorAll( 'li' ).forEach( function( li ) {
|
||||
li.addEventListener( 'mouseenter', window.alxMediaMenu.liMouseEnterEvent );
|
||||
li.addEventListener( 'mouseleave', window.alxMediaMenu.liMouseLeaveEvent );
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Remove event-listeners for hover events.
|
||||
*
|
||||
* @param {Element} nav - The nav element.
|
||||
* @return {void}
|
||||
*/
|
||||
removeHoverEventListeners: function( nav ) {
|
||||
nav.querySelectorAll( 'li' ).forEach( function( li ) {
|
||||
li.removeEventListener( 'mouseenter', window.alxMediaMenu.liMouseEnterEvent );
|
||||
li.removeEventListener( 'mouseleave', window.alxMediaMenu.liMouseLeaveEvent );
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets or removes .focus class on an element.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
toggleFocus: function() {
|
||||
var self = this;
|
||||
|
||||
// Move up through the ancestors of the current link until we hit .nav-menu.
|
||||
while ( -1 === self.className.indexOf( 'nav-menu' ) ) {
|
||||
// On li elements toggle the class .focus.
|
||||
if ( 'li' === self.tagName.toLowerCase() ) {
|
||||
if ( -1 !== self.className.indexOf( 'focus' ) ) {
|
||||
self.className = self.className.replace( ' focus', '' );
|
||||
} else {
|
||||
self.className += ' focus';
|
||||
}
|
||||
}
|
||||
|
||||
self = self.parentElement;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Toggle focus classes to allow submenu access on tables.
|
||||
*
|
||||
* @param {Element} el - The menu element.
|
||||
* @return {void}
|
||||
*/
|
||||
toggleFocusTouch: function( el ) {
|
||||
var touchStartFn,
|
||||
parentLinks = el.querySelectorAll( '.menu-item-has-children > a, .page_item_has_children > a' );
|
||||
|
||||
if ( 'ontouchstart' in window ) {
|
||||
touchStartFn = function( e ) {
|
||||
var menuItem = this.parentNode;
|
||||
|
||||
if ( ! menuItem.classList.contains( 'focus' ) ) {
|
||||
e.preventDefault();
|
||||
menuItem.parentNode.children.forEach( function( child ) {
|
||||
if ( menuItem !== child ) {
|
||||
child.classList.remove( 'focus' );
|
||||
}
|
||||
});
|
||||
menuItem.classList.add( 'focus' );
|
||||
} else {
|
||||
menuItem.classList.remove( 'focus' );
|
||||
}
|
||||
};
|
||||
|
||||
parentLinks.forEach( function( parentLink ) {
|
||||
parentLink.addEventListener( 'touchstart', touchStartFn, false );
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Helper methods.
|
||||
*/
|
||||
helper: {
|
||||
|
||||
/**
|
||||
* Toggle a class to an element.
|
||||
*
|
||||
* @param {Element} el - The element.
|
||||
* @param {string} className - The class we want to toggle.
|
||||
* @return {void}
|
||||
*/
|
||||
toggleClass: function( el, className ) {
|
||||
if ( el.classList.contains( className ) ) {
|
||||
el.classList.remove( className );
|
||||
} else {
|
||||
el.classList.add( className );
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Get the 1st ancestor of an element that matches our selector.
|
||||
*
|
||||
* @param {Element} el - The element.
|
||||
* @param {string} selector - The class we want to toggle.
|
||||
* @return {Element}
|
||||
*/
|
||||
firstAncestorMatch: function( el, selector ) {
|
||||
if ( el.parentNode.matches( selector ) ) {
|
||||
return el.parentNode;
|
||||
}
|
||||
return this.firstAncestorMatch( el.parentNode, selector );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
window.alxMediaMenu.init({
|
||||
selector: '.main-navigation.nav-menu',
|
||||
breakpoint: 720
|
||||
});
|
|
@ -88,18 +88,6 @@ jQuery(document).ready(function($) {
|
|||
}
|
||||
});
|
||||
|
||||
/* Dropdown menu animation
|
||||
/* ------------------------------------ */
|
||||
$('.nav ul.sub-menu').hide();
|
||||
$('.nav li').hover(
|
||||
function() {
|
||||
$(this).children('ul.sub-menu').slideDown('fast');
|
||||
},
|
||||
function() {
|
||||
$(this).children('ul.sub-menu').hide();
|
||||
}
|
||||
);
|
||||
|
||||
/* Fitvids
|
||||
/* ------------------------------------ */
|
||||
function responsiveVideo() {
|
||||
|
@ -122,39 +110,6 @@ jQuery(document).ready(function($) {
|
|||
itemsMobile : [479,1],
|
||||
});
|
||||
|
||||
/* Mobile menu smooth toggle height
|
||||
/* ------------------------------------ */
|
||||
$('.nav-toggle').on('click', function() {
|
||||
slide($('.nav-wrap .nav', $(this).parent()));
|
||||
});
|
||||
|
||||
function slide(content) {
|
||||
var wrapper = content.parent();
|
||||
var contentHeight = content.outerHeight(true);
|
||||
var wrapperHeight = wrapper.height();
|
||||
|
||||
wrapper.toggleClass('expand');
|
||||
if (wrapper.hasClass('expand')) {
|
||||
setTimeout(function() {
|
||||
wrapper.addClass('transition').css('height', contentHeight);
|
||||
}, 10);
|
||||
}
|
||||
else {
|
||||
setTimeout(function() {
|
||||
wrapper.css('height', wrapperHeight);
|
||||
setTimeout(function() {
|
||||
wrapper.addClass('transition').css('height', 0);
|
||||
}, 10);
|
||||
}, 10);
|
||||
}
|
||||
|
||||
wrapper.one('transitionEnd webkitTransitionEnd transitionend oTransitionEnd msTransitionEnd', function() {
|
||||
if(wrapper.hasClass('open')) {
|
||||
wrapper.removeClass('transition').css('height', 'auto');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* Social count plus override
|
||||
/* ------------------------------------ */
|
||||
$('.social-count-plus ul li span').attr('style', 'color: #fff');
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Split\n"
|
||||
"POT-Creation-Date: 2020-03-23 21:26+0100\n"
|
||||
"POT-Creation-Date: 2020-08-25 15:30+0200\n"
|
||||
"PO-Revision-Date: 2018-09-21 21:27+0100\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
|
@ -86,86 +86,82 @@ msgstr ""
|
|||
msgid "Footer"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:168
|
||||
#: functions.php:181
|
||||
msgid "Primary"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:168
|
||||
#: functions.php:181
|
||||
msgid "Normal full width sidebar"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:170 functions/theme-options.php:274
|
||||
#: functions.php:183 functions/theme-options.php:274
|
||||
msgid "Header Ads"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:171 functions/theme-options.php:301
|
||||
#: functions.php:184 functions/theme-options.php:301
|
||||
msgid "Footer Ads"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:171
|
||||
#: functions.php:184
|
||||
msgid "Footer ads area"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:173
|
||||
#: functions.php:186
|
||||
msgid "Frontpage Top 1"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:173 functions.php:174 functions.php:175 functions.php:176
|
||||
#: functions.php:186 functions.php:187 functions.php:188 functions.php:189
|
||||
msgid "Frontpage area"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:174
|
||||
#: functions.php:187
|
||||
msgid "Frontpage Top 2"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:175
|
||||
#: functions.php:188
|
||||
msgid "Frontpage Bottom 1"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:176
|
||||
#: functions.php:189
|
||||
msgid "Frontpage Bottom 2"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:178
|
||||
#: functions.php:191
|
||||
msgid "Footer 1"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:178 functions.php:179 functions.php:180 functions.php:181
|
||||
#: functions.php:191 functions.php:192 functions.php:193 functions.php:194
|
||||
msgid "Widgetized footer"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:179
|
||||
#: functions.php:192
|
||||
msgid "Footer 2"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:180
|
||||
#: functions.php:193
|
||||
msgid "Footer 3"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:181
|
||||
#: functions.php:194
|
||||
msgid "Footer 4"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:674
|
||||
#: functions.php:687
|
||||
msgid "Alx Extensions"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:678
|
||||
#: functions.php:691
|
||||
msgid "Meta Box"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:682
|
||||
#: functions.php:695
|
||||
msgid "Regenerate Thumbnails"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:686
|
||||
#: functions.php:699
|
||||
msgid "WP-PageNavi"
|
||||
msgstr ""
|
||||
|
||||
#: functions.php:690
|
||||
msgid "Social Count Plus"
|
||||
msgstr ""
|
||||
|
||||
#: functions/meta-boxes.php:21
|
||||
msgid "Page Options"
|
||||
msgstr ""
|
||||
|
@ -191,6 +187,27 @@ msgstr ""
|
|||
msgid "Post Options"
|
||||
msgstr ""
|
||||
|
||||
#: functions/nav.php:167
|
||||
msgid "Expand Menu"
|
||||
msgstr ""
|
||||
|
||||
#: functions/nav.php:209
|
||||
msgid "Toggle Child Menu"
|
||||
msgstr ""
|
||||
|
||||
#: functions/nav.php:283 functions/nav.php:297
|
||||
#, php-format
|
||||
msgid "<span class=\"screen-reader-text\">%1$s </span>%2$s"
|
||||
msgstr ""
|
||||
|
||||
#: functions/nav.php:284
|
||||
msgid "Current Page:"
|
||||
msgstr ""
|
||||
|
||||
#: functions/nav.php:298
|
||||
msgid "Current Page Parent"
|
||||
msgstr ""
|
||||
|
||||
#: functions/theme-options.php:17
|
||||
msgid "Theme Options"
|
||||
msgstr ""
|
||||
|
|
|
@ -68,6 +68,10 @@ Source: http://pixabay.com/
|
|||
|
||||
== Changelog ==
|
||||
|
||||
= 1.4.1 - 2020-08-25 =
|
||||
* Improved a11y
|
||||
* Added new menu
|
||||
|
||||
= 1.4.0 - 2020-08-11 =
|
||||
* Updated to Kirki 3.1.5
|
||||
|
||||
|
|
|
@ -82,9 +82,11 @@
|
|||
|
||||
/* header */
|
||||
#header .pad { padding: 0; }
|
||||
#header { padding-bottom: 0; }
|
||||
.site-title { width: 100%; float: none; }
|
||||
.site-title a { text-align: center; }
|
||||
.toggle-search { margin-right: 0; top: 80px; left: -1px; right: auto; padding-top: 13px; padding-bottom: 13px; }
|
||||
.toggle-search.active { padding-top: 15px; padding-bottom: 15px; }
|
||||
.search-expand { width: 100%; margin-right: -30px; top: 130px; }
|
||||
|
||||
/* footer */
|
||||
|
|
472
style.css
472
style.css
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Theme Name: Split
|
||||
Theme URI: http://alx.media/themes/split/
|
||||
Version: 1.4.0
|
||||
Version: 1.4.1
|
||||
Requires at least: 5.0
|
||||
Requires PHP: 5.6
|
||||
Tested up to: 5.5
|
||||
|
@ -74,7 +74,7 @@ html { box-sizing: border-box; }
|
|||
body { background: #fff; font-size: 16px; line-height: 1.5em; color: #555; font-weight: 300; }
|
||||
::selection { background: #cd483c; color: #fff; }
|
||||
::-moz-selection { background: #cd483c; color: #fff; }
|
||||
a { color: #cd483c; text-decoration: none; outline: 0; }
|
||||
a { color: #cd483c; text-decoration: none; }
|
||||
a:hover { color: #555; }
|
||||
img { max-width: 100%; height: auto;
|
||||
-webkit-box-shadow: 0 2px 3px rgba(0,0,0,0.15);
|
||||
|
@ -468,87 +468,6 @@ box-shadow: 0 0 2px rgba(255,255,255,0.4);
|
|||
.thumb-icon.small i { font-size: 14px; line-height: 16px; padding: 5px 0; }
|
||||
.thumb-icon.small .f-play { margin: -1px 0 0 2px; }
|
||||
|
||||
/* common : nav
|
||||
/* ------------------------------------ */
|
||||
.nav-container { background: #888; z-index: 99; position: relative; }
|
||||
.nav-toggle { display: none; background: #777; cursor: pointer; float: right; height: 50px; width: 60px; color: #fff; text-align: center; }
|
||||
.nav-toggle i { font-size: 29px; padding: 10px 0; }
|
||||
.nav-text { display: none; float: right; font-size: 16px; line-height: 24px; padding: 13px 20px; }
|
||||
.nav li > a:after,
|
||||
.nav > li > a:after { font-family: "Font Awesome 5 Free"; font-weight: 900; display: inline-block; }
|
||||
|
||||
@media only screen and (min-width: 720px) {
|
||||
|
||||
.nav-wrap { height: auto!important; }
|
||||
/* common */
|
||||
.nav { font-size: 0; position: relative; }
|
||||
.nav li a { color: #ccc; display: block; line-height: 20px; }
|
||||
/* dropdown arrows */
|
||||
.nav li > a:after { content: "\f0da"; float: right; opacity: 0.4; }
|
||||
.nav > li > a:after {content: "\f0d7"; float: none; margin-left: 6px; font-size: 14px; line-height: 1.2em; }
|
||||
.nav li > a:only-child:after {content: ""; margin: 0; }
|
||||
#footer .nav li > a:after { content: "\f0da"; }
|
||||
#footer .nav > li > a:after { content: "\f0d8"; }
|
||||
#footer .nav li > a:only-child:after { content: ""; }
|
||||
/* level 1 */
|
||||
.nav > li { font-size: 15px; text-transform: uppercase; border-right: 1px solid #999; display: inline-block; position: relative; }
|
||||
.nav > li > a { padding: 15px 14px; }
|
||||
.nav > li > a:hover,
|
||||
.nav > li:hover > a { background: #777; }
|
||||
.nav li > a:hover,
|
||||
.nav li:hover > a,
|
||||
.nav li.current_page_item > a,
|
||||
.nav li.current-menu-item > a,
|
||||
.nav li.current-menu-ancestor > a,
|
||||
.nav li.current-post-parent > a { color: #fff; }
|
||||
/* level 2 & 3 */
|
||||
.nav li:hover > ul { display: block; }
|
||||
.nav ul { display: none; background: #777; position: absolute; left: 0; top: 50px; width: 180px; padding: 10px 0; z-index: 2; -webkit-transform: translateZ(0);
|
||||
-webkit-box-shadow: 0 2px 2px rgba(0,0,0,0.15);
|
||||
box-shadow: 0 2px 2px rgba(0,0,0,0.15); }
|
||||
.nav ul li { font-size: 14px; position: relative; display: block; padding: 0; }
|
||||
.nav ul li a { padding: 10px 20px; }
|
||||
.nav ul li:last-child { border-bottom: 0!important; }
|
||||
/* level 3 */
|
||||
.nav ul ul { position: absolute; top: -10px; left: 180px; }
|
||||
|
||||
}
|
||||
@media only screen and (max-width: 719px) {
|
||||
|
||||
.nav { font-weight: 600; }
|
||||
.nav-container { text-transform: none; }
|
||||
.nav-toggle,
|
||||
.nav-text { display: block; }
|
||||
.nav-wrap { position: relative; float: left; width: 100%; height: 0; overflow: hidden; }
|
||||
.nav-wrap.transition {
|
||||
-webkit-transition: height 0.35s ease;
|
||||
-moz-transition: height 0.35s ease;
|
||||
-o-transition: height 0.35s ease;
|
||||
transition: height 0.35s ease; }
|
||||
.expand .nav-wrap { height: auto; }
|
||||
/* iphone fix */
|
||||
.safari .nav-wrap.transition { -webkit-transition: none; transition: none; }
|
||||
/* common */
|
||||
.nav { float: left; width: 100%; }
|
||||
.nav li a { line-height: 20px; display: block; padding: 8px 20px; }
|
||||
.nav li li a { padding-left: 15px; padding-right: 15px; }
|
||||
/* dropdown arrows */
|
||||
.nav li > a:after { content: '\f0d7'; opacity: 0.5; margin-left: 6px; }
|
||||
.nav > li > a:after { content: '\f0d7'; font-size: 14px; }
|
||||
.nav li > a:only-child:after { content: ''; }
|
||||
/* level 1 */
|
||||
.nav > li { font-size: 15px; }
|
||||
.nav li > a:hover,
|
||||
.nav li.current_page_item > a,
|
||||
.nav li.current-menu-item > a,
|
||||
.nav li.current-post-parent > a { color: #fff; }
|
||||
/* level 2 & 3 */
|
||||
.nav ul { display: block!important; margin-left: 40px; }
|
||||
.nav ul li { font-weight: 300; }
|
||||
.nav ul li a { padding-top: 6px; padding-bottom: 6px; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- *
|
||||
* Section: Header
|
||||
|
@ -568,140 +487,301 @@ box-shadow: 0 0 2px rgba(255,255,255,0.4);
|
|||
|
||||
/* header : search
|
||||
/* ------------------------------------ */
|
||||
.toggle-search { z-index: 102; border-left: 1px solid #282828; border-right: 1px solid #282828; color: #777; font-size: 18px; line-height: 25px; cursor: pointer; padding: 28px 16px; display: block; position: absolute; right: 30px; top: 0;
|
||||
-moz-transition: all 0.2s ease; -webkit-transition: all 0.2s ease; transition: all 0.2s ease; }
|
||||
.toggle-search { background: transparent; z-index: 102; border: 0; outline: none; border-left: 1px solid #282828; border-right: 1px solid #282828; color: #777; font-size: 18px; line-height: 25px; cursor: pointer; padding: 26px 16px; display: block; position: absolute; right: 30px; top: 0; }
|
||||
.toggle-search:hover,
|
||||
.toggle-search.active { background: #222; color: #fff; }
|
||||
.toggle-search.active i:before { content: "\f00d"; font-size: 22px; }
|
||||
.search-expand { display: none; z-index: 103; background: #222; position: absolute; top: 80px; right: 30px; width: 340px; }
|
||||
.search-expand-inner { padding: 15px; }
|
||||
.search-expand .themeform input { width: 100%; border: 0; border-radius: 0; }
|
||||
|
||||
/* header : nav mobile
|
||||
/* ------------------------------------ */
|
||||
#nav-mobile.nav-container { background: #cd483c; }
|
||||
#nav-mobile .nav-toggle { background: transparent; color: #fff;
|
||||
-webkit-box-shadow: inset 1px 0 0 rgba(255,255,255,0.1);
|
||||
box-shadow: inset 1px 0 0 rgba(255,255,255,0.1); }
|
||||
#nav-mobile .nav-text { color: #fff; color: rgba(255,255,255,0.7); }
|
||||
.toggle-search.active { padding-top: 30px; padding-bottom: 30px; }
|
||||
.toggle-search .svg-icon { fill: #fff; margin: 0 auto; }
|
||||
.toggle-search #svg-close { display: none; }
|
||||
.toggle-search.active #svg-search { display: none; }
|
||||
.toggle-search.active #svg-close { display: block; }
|
||||
|
||||
@media only screen and (max-width: 719px) {
|
||||
|
||||
/* common */
|
||||
#nav-mobile .container { padding-left: 0; }
|
||||
#nav-mobile .nav li a { color: #fff; color: rgba(255,255,255,0.8); border-top: 1px solid rgba(255,255,255,0.1); }
|
||||
/* level 1 */
|
||||
#nav-mobile .nav li > a:hover { background: rgba(0,0,0,0.06); color: #fff; }
|
||||
#nav-mobile .nav li.current_page_item > a,
|
||||
#nav-mobile .nav li.current-menu-item > a,
|
||||
#nav-mobile .nav li.current-post-parent > a { background: rgba(0,0,0,0.06); color: #fff; }
|
||||
|
||||
}
|
||||
|
||||
/* hide and display */
|
||||
/* ------------------------------------------------------------------------- *
|
||||
* Section: Navigation
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
/* menu hamburger */
|
||||
.menu-toggle-icon { float: right; width: 30px; height: 20px; position: relative; transform: rotate(0deg); transition: .5s ease-in-out; cursor: pointer; }
|
||||
.menu-toggle-icon span { display: block; position: absolute; height: 2px; width: 100%; background: #333; border-radius: 2px; opacity: 1; left: 0; transform: rotate(0deg); transition: .25s ease-in-out; }
|
||||
.menu-toggle-icon span:nth-child(1) { top: 0px; transform-origin: left center; }
|
||||
.menu-toggle-icon span:nth-child(2) { top: 8px; transform-origin: left center; }
|
||||
.menu-toggle-icon span:nth-child(3) { top: 16px; transform-origin: left center; }
|
||||
.toggled .menu-toggle-icon span:nth-child(1) { transform: rotate(45deg); top: -2px; left: 5px; }
|
||||
.toggled .menu-toggle-icon span:nth-child(2) { width: 0%; opacity: 0; }
|
||||
.toggled .menu-toggle-icon span:nth-child(3) { transform: rotate(-45deg); top: 19px; left: 5px; }
|
||||
|
||||
/* menu hide and display */
|
||||
@media only screen and (min-width: 720px) {
|
||||
.mobile-menu #nav-mobile { display: none; }
|
||||
.mobile-menu #wrap-nav-mobile { display: none; }
|
||||
}
|
||||
@media only screen and (max-width: 719px) {
|
||||
.mobile-menu #nav-topbar,
|
||||
.mobile-menu #nav-header,
|
||||
.mobile-menu #wrap-nav-topbar,
|
||||
.mobile-menu #wrap-nav-header,
|
||||
.mobile-menu .toggle-search { display: none; }
|
||||
#nav-mobile,
|
||||
#nav-topbar,
|
||||
#nav-header,
|
||||
#nav-footer { display: none; }
|
||||
.mobile #nav-mobile,
|
||||
.mobile #nav-topbar,
|
||||
.mobile #nav-header,
|
||||
.mobile #nav-footer { display: block; }
|
||||
}
|
||||
|
||||
/* header : nav topbar
|
||||
/* ------------------------------------ */
|
||||
#nav-topbar.nav-container { background: #cd483c; z-index: 102; }
|
||||
#nav-topbar .nav-toggle { background: transparent; color: #fff;
|
||||
-webkit-box-shadow: inset 1px 0 0 rgba(255,255,255,0.1);
|
||||
box-shadow: inset 1px 0 0 rgba(255,255,255,0.1); }
|
||||
#nav-topbar .nav-text { color: #fff; color: rgba(255,255,255,0.7); }
|
||||
/* menu base */
|
||||
.nav-menu > .menu-toggle { display: none; }
|
||||
.nav-menu.mobile > .menu-toggle { display: block; }
|
||||
.nav-menu.mobile > .menu-toggle ~ * { max-height: 4000px; overflow: hidden; width: 100%; transition: max-height 0.5s cubic-bezier(1, 0, 1, 0); }
|
||||
.nav-menu.mobile > .menu-toggle[aria-expanded="false"] ~ * { max-height: 0; transition: max-height 0.5s cubic-bezier(0, 1.05, 0, 1); }
|
||||
.nav-menu .menu,
|
||||
.nav-menu .menu ul { display: flex; list-style: none; list-style-type: none; margin: 0; padding: 0; }
|
||||
.nav-menu a { display: block; text-decoration: none; width: 100%; }
|
||||
.nav-menu.mobile ul { flex-direction: column; }
|
||||
.nav-menu .menu ul { flex-direction: column; max-width: 0; max-height: 0; overflow: hidden; }
|
||||
.nav-menu .menu ul.active,
|
||||
.nav-menu:not(.mobile) .menu li.hover > ul { max-width: 100vw; max-height: 300vh; }
|
||||
.nav-menu:not(.mobile) .menu .sub-menu { position: absolute; }
|
||||
.nav-menu .screen-reader-text { display: none; }
|
||||
.nav-menu .menu-item-wrapper { display: flex; }
|
||||
.nav-menu { line-height: 20px; }
|
||||
.nav-menu button { color: inherit; cursor: pointer; font-family: inherit; position: relative; text-align: inherit; user-select: none; background: none; border: none; box-shadow: none; border-radius: 0; font-size: inherit; font-weight: 400; letter-spacing: inherit; padding: 0; text-transform: none; }
|
||||
.nav-menu.mobile .menu ul { transition: max-height 500ms; max-width: 100%; }
|
||||
|
||||
@media only screen and (min-width: 720px) {
|
||||
.nav-menu:not(.mobile) .menu { flex-wrap: wrap; justify-content: flex-start; }
|
||||
.nav-menu:not(.mobile) .menu ul.active,
|
||||
.nav-menu:not(.mobile) .menu li.hover > ul { overflow: visible; width: 180px; opacity: 1; transform: translateY(0); transition: opacity 0.15s linear, transform 0.15s linear; }
|
||||
.nav-menu:not(.mobile) .menu ul .sub-menu { left: 200px; top: 0; }
|
||||
.nav-menu:not(.mobile) .menu { position: relative; }
|
||||
.nav-menu:not(.mobile) .menu ul { font-size: 15px; opacity: 0; padding: 10px 0; position: absolute; top: calc(100% + 20px); transition: opacity 0.15s linear, transform 0.15s linear, right 0s 0.15s; transform: translateY(6px); z-index: 1; }
|
||||
.nav-menu:not(.mobile) .menu ul li { position: relative; }
|
||||
.nav-menu:not(.mobile) .menu ul a { display: block; padding: 10px 20px; transition: background-color 0.15s linear; width: 100%; }
|
||||
.nav-menu:not(.mobile) .menu li.menu-item-has-children.focus > ul { min-width: 180px; max-width: 180px; max-height: 300vh; overflow: visible; opacity: 1; transform: translateY(0); transition: opacity 0.15s linear, transform 0.15s linear; }
|
||||
.nav-menu:not(.mobile) .menu li.menu-item-has-children.focus > ul:focus-within { opacity: 1!important; }
|
||||
.nav-menu:not(.mobile) .menu li ul.sub-menu:not(.active) { opacity: 0; }
|
||||
.nav-menu:not(.mobile) .menu li.hover ul.sub-menu:not(.active) { opacity: 1; }
|
||||
.nav-menu:not(.mobile) .menu li.focus ul ul.sub-menu:not(.active) { opacity: 0; }
|
||||
.nav-menu:not(.mobile) .menu li.focus ul li.hover ul.sub-menu { opacity: 1; }
|
||||
|
||||
/* common */
|
||||
#nav-topbar .nav { }
|
||||
#nav-topbar .nav li a { color: #fff; font-weight: 400; text-transform: none; color: rgba(255,255,255,0.8); }
|
||||
/* level 1 */
|
||||
#nav-topbar .nav > li { border-right: none; }
|
||||
#nav-topbar .nav > li:first-child { margin-left: 15px; }
|
||||
#nav-topbar .nav > li > a:hover,
|
||||
#nav-topbar .nav > li:hover > a { background-color: rgba(0,0,0,0.1); }
|
||||
#nav-topbar .nav li > a:hover,
|
||||
#nav-topbar .nav li:hover > a,
|
||||
#nav-topbar .nav li.current_page_item > a,
|
||||
#nav-topbar .nav li.current-menu-item > a,
|
||||
#nav-topbar .nav li.current-menu-ancestor > a,
|
||||
#nav-topbar .nav li.current-post-parent > a { color: #fff; }
|
||||
/* level 2 & 3 */
|
||||
#nav-topbar .nav ul { background: #cd483c url(img/opacity-10.png) repeat; }
|
||||
#nav-topbar .nav ul li { -webkit-box-shadow: 0 1px 0 rgba(255,255,255,0.15); box-shadow: 0 1px 0 rgba(255,255,255,0.15); }
|
||||
#nav-topbar .nav ul li:last-child { box-shadow: none; -webkit-box-shadow: none; }
|
||||
|
||||
}
|
||||
@media only screen and (max-width: 719px) {
|
||||
|
||||
/* common */
|
||||
#nav-topbar .container { padding-left: 0; }
|
||||
#nav-topbar .nav li a { color: #fff; color: rgba(255,255,255,0.8); border-top: 1px solid rgba(255,255,255,0.1); }
|
||||
/* level 1 */
|
||||
#nav-topbar .nav li > a:hover { background: rgba(0,0,0,0.06); color: #fff; }
|
||||
#nav-topbar .nav li.current_page_item > a,
|
||||
#nav-topbar .nav li.current-menu-item > a,
|
||||
#nav-topbar .nav li.current-post-parent > a { background: rgba(0,0,0,0.06); color: #fff; }
|
||||
|
||||
}
|
||||
.nav-menu:not(.mobile) .menu ul:before,
|
||||
.nav-menu:not(.mobile) .menu ul:after { content: ""; display: block; position: absolute; bottom: 100%; }
|
||||
.nav-menu:not(.mobile) .menu ul:before { left: 0; right: 0; height: 20px; }
|
||||
.nav-menu:not(.mobile) .menu ul:after { border: 8px solid transparent; border-bottom-color: transparent; left: 18px; }
|
||||
.nav-menu:not(.mobile) .menu ul ul { left: calc(100% + 20px); top: -10px !important; }
|
||||
.nav-menu:not(.mobile) .menu ul ul:before { bottom: 0; height: auto; left: auto; left: -20px; top: 0; width: 22px; }
|
||||
.nav-menu:not(.mobile) .menu ul ul:after { border-bottom-color: transparent; bottom: auto; left: -16px; top: 20px; }
|
||||
.nav-menu-dropdown-left .nav-menu:not(.mobile) .menu ul ul:before { left: auto; right: -20px; }
|
||||
.nav-menu-dropdown-left .nav-menu:not(.mobile) .menu ul ul { right: calc(100% + 20px); left: auto; }
|
||||
.nav-menu-dropdown-left .nav-menu:not(.mobile) .menu ul ul:after { border-right-color: transparent; right: -16px; left: auto; }
|
||||
.nav-menu-dropdown-left .nav-menu:not(.mobile) ul ul button .svg-icon { transform: none; }
|
||||
|
||||
/* header : nav header
|
||||
/* ------------------------------------ */
|
||||
#nav-header.nav-container { background: transparent; float: right; margin-right: 70px; z-index: 101; }
|
||||
.header-search-disable #nav-header.nav-container { margin-right: 0; }
|
||||
#nav-header .nav-toggle { background: transparent; color: #fff; }
|
||||
#nav-header .nav-text { color: #999; }
|
||||
.nav-menu:not(.mobile) a,
|
||||
.nav-menu:not(.mobile) span { transition: all 0.3s ease; }
|
||||
|
||||
.nav-menu.mobile { padding: 0; }
|
||||
.nav-menu.mobile button:focus { outline: none; }
|
||||
.nav-menu.mobile > button { padding: 16px 20px; float: right; }
|
||||
.nav-menu.mobile button .svg-icon { transition: all 250ms; }
|
||||
.nav-menu.mobile button.active .svg-icon { transform: rotate(180deg); }
|
||||
.nav-menu.mobile ul { border: 0; }
|
||||
.nav-menu.mobile ul li .menu-item-wrapper { justify-content: space-between; width: 100%; }
|
||||
.nav-menu.mobile > div > ul > li:last-child { margin-bottom: 52px; }
|
||||
.nav-menu.mobile ul li a { font-size: 16px; font-weight: 600; padding: 14px 20px; }
|
||||
.nav-menu.mobile ul ul li a { font-size: 14px; }
|
||||
.nav-menu.mobile ul ul li a { padding: 12px 0 12px 40px; }
|
||||
.nav-menu.mobile ul ul ul li a { padding: 12px 0 12px 60px; }
|
||||
.nav-menu.mobile ul button { margin: 10px 0; padding: 0 20px; }
|
||||
|
||||
/* menu styling */
|
||||
.nav-menu a { color: #fff; }
|
||||
.nav-menu .svg-icon { fill: #333; }
|
||||
.nav-menu:not(.mobile) .menu ul { background: #333; color: #fff; border-radius: 4px; }
|
||||
.nav-menu:not(.mobile) .menu ul:after { border-bottom-color: #333; }
|
||||
.nav-menu:not(.mobile) .menu ul ul:after { border-right-color: #333; }
|
||||
.nav-menu-dropdown-left .nav-menu:not(.mobile) .menu ul ul:after { border-left-color: #333; }
|
||||
|
||||
.nav-menu:not(.mobile) { font-size: 16px; font-weight: 400; float: right; padding: 12px 0 20px 0; }
|
||||
.nav-menu:not(.mobile) a { color: #666; }
|
||||
.nav-menu:not(.mobile) a:hover { color: #333; }
|
||||
.nav-menu:not(.mobile) ul ul a:hover { color: #ccc; }
|
||||
.nav-menu:not(.mobile) ul ul > li:hover > span { background: rgba(255,255,255,0.1); }
|
||||
.nav-menu:not(.mobile) ul ul a { color: #eee; }
|
||||
.nav-menu:not(.mobile) button { background: none; color: #666; padding: 0 4px; margin-left: 2px; border-radius: 4px; }
|
||||
.nav-menu:not(.mobile) button.active { background: #eee; color: #333; }
|
||||
.nav-menu:not(.mobile) button .svg-icon { fill: #bbb; }
|
||||
.nav-menu:not(.mobile) ul ul button { background: none; color: #eee; padding: 0 5px; margin: 0 10px 0 0; }
|
||||
.nav-menu:not(.mobile) ul ul button.active { background: #444; color: #eee; }
|
||||
.nav-menu:not(.mobile) ul ul button .svg-icon { transform: rotate(-90deg); }
|
||||
.nav-menu:not(.mobile) .menu > li { margin: 16px 20px 0 0; position: relative; }
|
||||
.nav-menu:not(.mobile) .menu > li:last-child { margin-right: 0; }
|
||||
.nav-menu:not(.mobile) .menu a { padding: 0; }
|
||||
|
||||
.nav-menu:not(.mobile) li.current_page_item > span > a,
|
||||
.nav-menu:not(.mobile) li.current-menu-item > span > a,
|
||||
.nav-menu:not(.mobile) li.current-menu-ancestor > span > a,
|
||||
.nav-menu:not(.mobile) li.current-post-parent > span > a { color: #333; }
|
||||
.nav-menu:not(.mobile) ul ul li.current_page_item > span > a,
|
||||
.nav-menu:not(.mobile) ul ul li.current-menu-item > span > a,
|
||||
.nav-menu:not(.mobile) ul ul li.current-menu-ancestor > span > a,
|
||||
.nav-menu:not(.mobile) ul ul li.current-post-parent > span > a { color: #aaa; }
|
||||
|
||||
.nav-menu.mobile button.active .svg-icon { fill: #333; }
|
||||
.nav-menu.mobile ul ul { background: rgba(0,0,0,0.03); }
|
||||
.nav-menu.mobile ul li .menu-item-wrapper,
|
||||
.nav-menu.mobile ul ul li .menu-item-wrapper { border-bottom: 1px solid rgba(0,0,0,0.07); }
|
||||
.nav-menu.mobile ul li a { color: #333; }
|
||||
.nav-menu.mobile ul button,
|
||||
.nav-menu.mobile ul ul button { border-left: 1px solid rgba(0,0,0,0.07); }
|
||||
.nav-menu.mobile > div > ul { border-top: 1px solid rgba(0,0,0,0.07); }
|
||||
|
||||
/* menu mobile styling */
|
||||
#wrap-nav-mobile .menu-toggle-icon span { background: #fff; }
|
||||
#wrap-nav-mobile .nav-menu .svg-icon { fill: #fff; }
|
||||
#wrap-nav-mobile .nav-menu.mobile { background: #cd483c; }
|
||||
#wrap-nav-mobile .nav-menu.mobile button.active .svg-icon { fill: #fff; }
|
||||
#wrap-nav-mobile .nav-menu.mobile ul ul { background: rgba(0,0,0,0.04); }
|
||||
#wrap-nav-mobile .nav-menu.mobile ul li .menu-item-wrapper,
|
||||
#wrap-nav-mobile .nav-menu.mobile ul ul li .menu-item-wrapper { border-bottom: 1px solid rgba(255,255,255,0.14); }
|
||||
#wrap-nav-mobile .nav-menu.mobile ul li a { color: #fff; }
|
||||
#wrap-nav-mobile .nav-menu.mobile ul button,
|
||||
#wrap-nav-mobile .nav-menu.mobile ul ul button { border-left: 1px solid rgba(255,255,255,0.14); }
|
||||
#wrap-nav-mobile .nav-menu.mobile > div > ul { border-top: 1px solid rgba(255,255,255,0.14); }
|
||||
|
||||
/* menu topbar styling */
|
||||
#wrap-nav-topbar { background: #cd483c; }
|
||||
#wrap-nav-topbar .nav-menu:not(.mobile) { float: none; padding: 4px 30px 20px 30px; }
|
||||
#wrap-nav-topbar .nav-menu:not(.mobile) a { color: rgba(255,255,255,0.7); }
|
||||
#wrap-nav-topbar .nav-menu:not(.mobile) a:hover { color: rgba(255,255,255,0.9); }
|
||||
#wrap-nav-topbar .nav-menu:not(.mobile) .menu ul { background: #cd483c; border-radius: 0; }
|
||||
#wrap-nav-topbar .nav-menu:not(.mobile) .menu ul:after { border-bottom-color: #cd483c; }
|
||||
#wrap-nav-topbar .nav-menu:not(.mobile) ul ul a { color: rgba(255,255,255,0.9); }
|
||||
#wrap-nav-topbar .nav-menu:not(.mobile) .menu ul ul:after { border-right-color: #cd483c; border-bottom-color: transparent; }
|
||||
#wrap-nav-topbar .nav-menu:not(.mobile) .menu ul span { border-bottom: 1px solid rgba(255,255,255,0.14); }
|
||||
#wrap-nav-topbar .nav-menu:not(.mobile) .menu ul li:last-child span { border-bottom: 0; }
|
||||
#wrap-nav-topbar .nav-menu:not(.mobile) button .svg-icon { fill: rgba(255,255,255,0.4); }
|
||||
#wrap-nav-topbar .nav-menu:not(.mobile) button.active { background: rgba(255,255,255,0.1); }
|
||||
#wrap-nav-topbar .nav-menu:not(.mobile) ul ul button .svg-icon { fill: rgba(255,255,255,0.4); }
|
||||
#wrap-nav-topbar .nav-menu:not(.mobile) ul ul button.active { background: rgba(255,255,255,0.1); }
|
||||
|
||||
#wrap-nav-topbar .nav-menu:not(.mobile) li.current_page_item > span > a,
|
||||
#wrap-nav-topbar .nav-menu:not(.mobile) li.current-menu-item > span > a,
|
||||
#wrap-nav-topbar .nav-menu:not(.mobile) li.current-menu-ancestor > span > a,
|
||||
#wrap-nav-topbar .nav-menu:not(.mobile) li.current-post-parent > span > a { color: #fff; }
|
||||
#wrap-nav-topbar .nav-menu:not(.mobile) ul ul li.current_page_item > span > a,
|
||||
#wrap-nav-topbar .nav-menu:not(.mobile) ul ul li.current-menu-item > span > a,
|
||||
#wrap-nav-topbar .nav-menu:not(.mobile) ul ul li.current-menu-ancestor > span > a,
|
||||
#wrap-nav-topbar .nav-menu:not(.mobile) ul ul li.current-post-parent > span > a { color: #fff; }
|
||||
|
||||
#wrap-nav-topbar .menu-toggle-icon span { background: #fff; }
|
||||
#wrap-nav-topbar .nav-menu .svg-icon { fill: #fff; }
|
||||
#wrap-nav-topbar .nav-menu.mobile { background: #cd483c; }
|
||||
#wrap-nav-topbar .nav-menu.mobile button.active .svg-icon { fill: #fff; }
|
||||
#wrap-nav-topbar .nav-menu.mobile ul ul { background: rgba(0,0,0,0.04); }
|
||||
#wrap-nav-topbar .nav-menu.mobile ul li .menu-item-wrapper,
|
||||
#wrap-nav-topbar .nav-menu.mobile ul ul li .menu-item-wrapper { border-bottom: 1px solid rgba(255,255,255,0.14); }
|
||||
#wrap-nav-topbar .nav-menu.mobile ul li a { color: #fff; }
|
||||
#wrap-nav-topbar .nav-menu.mobile ul button,
|
||||
#wrap-nav-topbar .nav-menu.mobile ul ul button { border-left: 1px solid rgba(255,255,255,0.14); }
|
||||
#wrap-nav-topbar .nav-menu.mobile > div > ul { border-top: 1px solid rgba(255,255,255,0.14); }
|
||||
|
||||
/* menu header styling */
|
||||
#wrap-nav-header { float: right; }
|
||||
#wrap-nav-header .nav-menu:not(.mobile) { float: none; margin-right: 70px; }
|
||||
#wrap-nav-header .nav-menu:not(.mobile) .menu { justify-content: right; }
|
||||
#wrap-nav-header .nav-menu:not(.mobile) a { color: rgba(255,255,255,0.7); }
|
||||
#wrap-nav-header .nav-menu:not(.mobile) a:hover { color: rgba(255,255,255,0.9); }
|
||||
#wrap-nav-header .nav-menu:not(.mobile) .menu .sub-menu { z-index: 102; }
|
||||
#wrap-nav-header .nav-menu:not(.mobile) .menu ul span { border-bottom: 1px solid rgba(255,255,255,0.07); }
|
||||
#wrap-nav-header .nav-menu:not(.mobile) .menu ul li:last-child span { border-bottom: 0; }
|
||||
#wrap-nav-header .nav-menu:not(.mobile) button .svg-icon { fill: rgba(255,255,255,0.4); }
|
||||
#wrap-nav-header .nav-menu:not(.mobile) button.active { background: rgba(255,255,255,0.1); }
|
||||
#wrap-nav-header .nav-menu:not(.mobile) ul ul button .svg-icon { fill: rgba(255,255,255,0.4); }
|
||||
#wrap-nav-header .nav-menu:not(.mobile) ul ul button.active { background: rgba(255,255,255,0.1); }
|
||||
|
||||
#wrap-nav-header .nav-menu:not(.mobile) .menu > li { margin-right: 4px; margin-top: 12px; }
|
||||
#wrap-nav-header .nav-menu:not(.mobile) > div > ul > li > span { border: 1px solid transparent; border-radius: 20px; padding: 8px 10px; }
|
||||
#wrap-nav-header .nav-menu:not(.mobile) > div > ul > li:hover > span { border-color: rgba(255,255,255,0.1); }
|
||||
|
||||
#wrap-nav-header .nav-menu:not(.mobile) > div > ul > li.current_page_item > span,
|
||||
#wrap-nav-header .nav-menu:not(.mobile) > div > ul > li.current-menu-item > span,
|
||||
#wrap-nav-header .nav-menu:not(.mobile) > div > ul > li.current-menu-ancestor > span,
|
||||
#wrap-nav-header .nav-menu:not(.mobile) > div > ul > li.current-post-parent > span { background: rgba(255,255,255,0.1); }
|
||||
#wrap-nav-header .nav-menu:not(.mobile) > div > ul > li.current_page_item > span > a,
|
||||
#wrap-nav-header .nav-menu:not(.mobile) > div > ul > li.current-menu-item > span > a,
|
||||
#wrap-nav-header .nav-menu:not(.mobile) > div > ul > li.current-menu-ancestor > span > a,
|
||||
#wrap-nav-header .nav-menu:not(.mobile) > div > ul > li.current-post-parent > span > a { color: #fff; font-weight: 700; }
|
||||
#wrap-nav-header .nav-menu:not(.mobile) ul ul li.current_page_item > span > a,
|
||||
#wrap-nav-header .nav-menu:not(.mobile) ul ul li.current-menu-item > span > a,
|
||||
#wrap-nav-header .nav-menu:not(.mobile) ul ul li.current-menu-ancestor > span > a,
|
||||
#wrap-nav-header .nav-menu:not(.mobile) ul ul li.current-post-parent > span > a { color: #fff; }
|
||||
|
||||
@media only screen and (max-width: 960px) {
|
||||
#nav-header.nav-container { border-top: 1px solid #222; width: 100%; margin-right: 0; }
|
||||
#header { padding-top: 0; padding-bottom: 0; }
|
||||
#wrap-nav-header { border-top: 1px solid rgba(255,255,255,0.1); width: 100%; margin-right: 0; }
|
||||
#wrap-nav-header .nav-menu:not(.mobile) { margin-right: 0; }
|
||||
#wrap-nav-header .nav-menu:not(.mobile) .menu { justify-content: left; }
|
||||
}
|
||||
@media only screen and (min-width: 720px) {
|
||||
|
||||
/* common */
|
||||
#nav-header .nav { margin: 21px 0 0; }
|
||||
#nav-header .nav li a { color: #bbb; font-weight: 400; }
|
||||
#nav-header .nav li a:hover { color: #fff; }
|
||||
/* level 1 */
|
||||
#nav-header .nav > li { border-right: none; margin-right: 3px; padding-bottom: 20px; font-size: 15px; text-transform: none; }
|
||||
#nav-header .nav > li > a { padding: 8px 14px; border: 1px solid transparent; -webkit-border-radius: 20px; border-radius: 20px; }
|
||||
#nav-header .nav > li > a:hover,
|
||||
#nav-header .nav > li:hover > a { background: transparent; color: #fff; border-color: #282828; }
|
||||
#nav-header .nav > li.current_page_item > a,
|
||||
#nav-header .nav > li.current-menu-item > a,
|
||||
#nav-header .nav > li.current-menu-ancestor > a,
|
||||
#nav-header .nav > li.current-post-parent > a { background: #282828; font-weight: 600; color: #fff!important; }
|
||||
#nav-header .nav li.current_page_item > a,
|
||||
#nav-header .nav li.current-menu-item > a,
|
||||
#nav-header .nav li.current-menu-ancestor > a,
|
||||
#nav-header .nav li.current-post-parent > a { color: #fff; }
|
||||
/* level 2 & 3 */
|
||||
#nav-header .nav ul { top: 50px; background: #282828; border-radius: 3px; }
|
||||
#nav-header .nav ul:before { content:''; display: inline-block; border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 8px solid transparent; border-bottom: 8px solid #282828; position: absolute; top: -16px; left: 20px; }
|
||||
#nav-header .nav ul li { -webkit-box-shadow: 0 1px 0 rgba(255,255,255,0.06); box-shadow: 0 1px 0 rgba(255,255,255,0.06); }
|
||||
#nav-header .nav ul li:last-child { box-shadow: none; -webkit-box-shadow: none; }
|
||||
#nav-header .nav ul ul { top: -10px; }
|
||||
#nav-header .nav ul ul:before { display: none; }
|
||||
|
||||
}
|
||||
@media only screen and (max-width: 719px) {
|
||||
|
||||
/* common */
|
||||
#nav-header .container { padding-left: 0; }
|
||||
#nav-header .nav li a { color: #ccc; border-top: 1px solid #222; }
|
||||
/* level 1 */
|
||||
#nav-header .nav li > a:hover { background: rgba(0,0,0,0.04); color: #fff; }
|
||||
#nav-header .nav li.current_page_item > a,
|
||||
#nav-header .nav li.current-menu-item > a,
|
||||
#nav-header .nav li.current-post-parent > a { background: rgba(0,0,0,0.04); color: #fff; }
|
||||
|
||||
}
|
||||
#wrap-nav-header .menu-toggle-icon span { background: #fff; }
|
||||
#wrap-nav-header .nav-menu .svg-icon { fill: #fff; }
|
||||
#wrap-nav-header .nav-menu.mobile { }
|
||||
#wrap-nav-header .nav-menu.mobile button.active .svg-icon { fill: #fff; }
|
||||
#wrap-nav-header .nav-menu.mobile ul ul { background: rgba(255,255,255,0.04); }
|
||||
#wrap-nav-header .nav-menu.mobile ul li .menu-item-wrapper,
|
||||
#wrap-nav-header .nav-menu.mobile ul ul li .menu-item-wrapper { border-bottom: 1px solid rgba(255,255,255,0.1); }
|
||||
#wrap-nav-header .nav-menu.mobile ul li a { color: #fff; }
|
||||
#wrap-nav-header .nav-menu.mobile ul button,
|
||||
#wrap-nav-header .nav-menu.mobile ul ul button { border-left: 1px solid rgba(255,255,255,0.1); }
|
||||
#wrap-nav-header .nav-menu.mobile > div > ul { border-top: 1px solid rgba(255,255,255,0.1); }
|
||||
|
||||
/* menu footer styling */
|
||||
#wrap-nav-footer { background: #222; }
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) { border-top: 0; float: none; padding-top: 5px; padding-left: 30px; padding-right: 30px; position: relative; z-index: 2; }
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) a { color: rgba(255,255,255,0.5); }
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) a:hover { color: #fff; }
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) button { transform: rotate(-180deg); }
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) .menu ul button { transform: none; }
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) .menu { justify-content: center; }
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) .menu ul { background: #222; top: auto; bottom: calc(100% + 19px); }
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) .menu ul a { font-size: 14px; }
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) .menu ul span { border-bottom: 1px solid rgba(255,255,255,0.06); }
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) .menu ul li:last-child span { border-bottom: 0; }
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) .menu ul ul { bottom: auto; }
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) .menu > li > ul:before,
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) .menu > li > ul:after { bottom: auto; top: 100%; }
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) .menu ul:after { border-bottom-color: transparent; border-top-color: #222; }
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) .menu ul ul:after { border-right-color: #222; border-top-color: transparent; }
|
||||
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) li.current_page_item > span > a,
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) li.current-menu-item > span > a,
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) li.current-menu-ancestor > span > a,
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) li.current-post-parent > span > a { color: #fff; }
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) ul ul li.current_page_item > span > a,
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) ul ul li.current-menu-item > span > a,
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) ul ul li.current-menu-ancestor > span > a,
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) ul ul li.current-post-parent > span > a { color: #fff; }
|
||||
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) button .svg-icon { fill: rgba(255,255,255,0.2); }
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) button.active { background: rgba(255,255,255,0.06); }
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) ul ul button .svg-icon { fill: rgba(255,255,255,0.3); }
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) ul ul button.active { }
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) ul ul a { transition: all 0.3s ease; }
|
||||
#wrap-nav-footer .nav-menu:not(.mobile) ul ul > li:hover > span { background: none; }
|
||||
|
||||
#wrap-nav-footer .menu-toggle-icon span { background: #fff; }
|
||||
#wrap-nav-footer .nav-menu.mobile { background: #222; border-top: none; }
|
||||
#wrap-nav-footer .nav-menu.mobile .svg-icon { fill: #fff; }
|
||||
#wrap-nav-footer .nav-menu.mobile button.active .svg-icon { fill: #fff; }
|
||||
#wrap-nav-footer .nav-menu.mobile ul ul { background: rgba(255,255,255,0.04); }
|
||||
#wrap-nav-footer .nav-menu.mobile ul li .menu-item-wrapper,
|
||||
#wrap-nav-footer .nav-menu.mobile ul ul li .menu-item-wrapper { border-bottom: 1px solid rgba(255,255,255,0.07); }
|
||||
#wrap-nav-footer .nav-menu.mobile ul li a { color: rgba(255,255,255,0.7); }
|
||||
#wrap-nav-footer .nav-menu.mobile ul button,
|
||||
#wrap-nav-footer .nav-menu.mobile ul ul button { border-left: 1px solid rgba(255,255,255,0.07); }
|
||||
#wrap-nav-footer .nav-menu.mobile > div > ul { border-top: 1px solid rgba(255,255,255,0.07); }
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue