mirror of
https://github.com/10h30/trestle.git
synced 2026-06-05 15:09:35 +09:00
* Change /lib to /includes
* Move filter/action calls into actual functions file * Rework mobile nav and header toggle behavior
This commit is contained in:
+8
-76
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Trestle theme functionality
|
||||
* Theme functionality
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
@@ -15,30 +15,27 @@ function trestle_theme_setup() {
|
||||
* Required Files
|
||||
===========================================*/
|
||||
|
||||
// Trestle theme functions
|
||||
require_once dirname( __FILE__ ) . '/lib/functions/theme-functions.php';
|
||||
// Theme functions
|
||||
require_once dirname( __FILE__ ) . '/includes/functions/theme-functions.php';
|
||||
|
||||
// Admin functionality
|
||||
require_once dirname( __FILE__ ) . '/lib/admin/admin.php';
|
||||
require_once dirname( __FILE__ ) . '/includes/admin/admin.php';
|
||||
|
||||
// Shortcodes
|
||||
require_once dirname( __FILE__ ) . '/lib/shortcodes/shortcodes.php';
|
||||
require_once dirname( __FILE__ ) . '/includes/shortcodes/shortcodes.php';
|
||||
|
||||
// Additional sidebars
|
||||
require_once dirname( __FILE__ ) . '/lib/sidebars/sidebars.php';
|
||||
|
||||
// Plugin activation class
|
||||
require_once dirname( __FILE__ ) . '/lib/classes/class-tgm-plugin-activation.php';
|
||||
require_once dirname( __FILE__ ) . '/includes/sidebars/sidebars.php';
|
||||
|
||||
|
||||
/*===========================================
|
||||
* Trestle Theme Setup
|
||||
* Theme Setup
|
||||
===========================================*/
|
||||
|
||||
// Child theme definitions (do not remove)
|
||||
define( 'CHILD_THEME_NAME', 'Trestle' );
|
||||
define( 'CHILD_THEME_URL', 'http://demo.mightyminnow.com/theme/trestle/' );
|
||||
define( 'CHILD_THEME_VERSION', '1.1.0' );
|
||||
define( 'CHILD_THEME_VERSION', '1.2.0' );
|
||||
|
||||
// Load theme text domain
|
||||
load_theme_textdomain( 'trestle', get_stylesheet_directory() . '/languages' );
|
||||
@@ -49,69 +46,4 @@ function trestle_theme_setup() {
|
||||
// Add viewport meta tag for mobile browsers
|
||||
add_theme_support( 'genesis-responsive-viewport' );
|
||||
|
||||
// Add support for custom background
|
||||
add_theme_support( 'custom-background' );
|
||||
|
||||
// Add support for footer widgets if specified in Trestle settings
|
||||
$trestle_footer_widgets_number = esc_attr( genesis_get_option( 'trestle_footer_widgets_number' ) );
|
||||
add_theme_support( 'genesis-footer-widgets', $trestle_footer_widgets_number );
|
||||
|
||||
|
||||
/*===========================================
|
||||
* Widget Areas
|
||||
===========================================*/
|
||||
|
||||
add_action( 'widgets_init', 'trestle_register_widget_areas' );
|
||||
|
||||
|
||||
/*===========================================
|
||||
* Head Styles & Scripts
|
||||
===========================================*/
|
||||
|
||||
add_action( 'wp_enqueue_scripts', 'trestle_header_actions' );
|
||||
|
||||
/*===========================================
|
||||
* Body Classes
|
||||
===========================================*/
|
||||
|
||||
add_filter( 'body_class', 'trestle_body_classes' );
|
||||
|
||||
/*===========================================
|
||||
* Header
|
||||
===========================================*/
|
||||
|
||||
// Add logo
|
||||
add_filter( 'genesis_seo_title', 'trestle_do_logos', 10, 3 );
|
||||
|
||||
|
||||
/*===========================================
|
||||
* Auto & Mobile Navigation
|
||||
===========================================*/
|
||||
|
||||
// Implement auto-nav and mobile nav button
|
||||
add_action( 'init', 'trestle_nav_modifications' );
|
||||
|
||||
|
||||
/*===========================================
|
||||
* Posts & Pages
|
||||
===========================================*/
|
||||
|
||||
// Setup revisions number
|
||||
add_filter( 'wp_revisions_to_keep', 'trestle_update_revisions_number', 10, 2 );
|
||||
|
||||
// Manually control where Post Info & Meta display
|
||||
add_action( 'the_post', 'trestle_post_info_meta', 5 );
|
||||
|
||||
// Remove default featured image fallback of 'first-attached'
|
||||
add_filter( 'genesis_get_image_default_args', 'trestle_featured_image_fallback' );
|
||||
|
||||
|
||||
/*===========================================
|
||||
* General Actions & Filters
|
||||
===========================================*/
|
||||
|
||||
// Do custom Read More text
|
||||
add_filter( 'excerpt_more', 'trestle_read_more_link' );
|
||||
add_filter( 'get_the_content_more_link', 'trestle_read_more_link' );
|
||||
add_filter( 'the_content_more_link', 'trestle_read_more_link' );
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
<?php
|
||||
/**
|
||||
* Trestle admin functions
|
||||
* Trestle admin functions.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @package Trestle
|
||||
*/
|
||||
|
||||
add_action( 'admin_enqueue_scripts', 'trestle_admin_actions' );
|
||||
/**
|
||||
* Loads admin scripts and styles.
|
||||
*
|
||||
@@ -14,15 +15,16 @@
|
||||
*/
|
||||
function trestle_admin_actions() {
|
||||
// Add admin jQuery
|
||||
wp_enqueue_script( 'trestle-admin-jquery', get_stylesheet_directory_uri() . '/lib/admin/admin.js', array( 'jquery' ), '1.0.0', true );
|
||||
wp_enqueue_script( 'trestle-admin-jquery', get_stylesheet_directory_uri() . '/includes/admin/admin.js', array( 'jquery' ), '1.0.0', true );
|
||||
|
||||
// Add admin jQuery
|
||||
wp_enqueue_style( 'trestle-admin', get_stylesheet_directory_uri() . '/lib/admin/admin.css' );
|
||||
wp_enqueue_style( 'trestle-admin', get_stylesheet_directory_uri() . '/includes/admin/admin.css' );
|
||||
|
||||
// Add admin CSS
|
||||
add_editor_style( get_stylesheet_directory_uri() . '/lib/admin/editor-style.css' );
|
||||
add_editor_style( get_stylesheet_directory_uri() . '/includes/admin/editor-style.css' );
|
||||
}
|
||||
|
||||
add_filter( 'genesis_theme_settings_defaults', 'trestle_custom_defaults' );
|
||||
/**
|
||||
* Sets up Trestle default settings.
|
||||
*
|
||||
@@ -35,6 +37,7 @@ function trestle_custom_defaults( $defaults ) {
|
||||
// Trestle default key/value pairs
|
||||
$trestle_defaults = array(
|
||||
'trestle_layout' => 'solid',
|
||||
'trestle_nav_primary_location' => 'full',
|
||||
'trestle_auto_nav' => 0,
|
||||
'trestle_auto_nav_depth' => 0,
|
||||
'trestle_include_home_link' => 0,
|
||||
@@ -65,6 +68,7 @@ function trestle_custom_defaults( $defaults ) {
|
||||
return $defaults;
|
||||
}
|
||||
|
||||
add_action( 'genesis_settings_sanitizer_init', 'trestle_register_social_sanitization_filters' );
|
||||
/**
|
||||
* Adds sanitization for various Trestle admin settings.
|
||||
*
|
||||
@@ -106,6 +110,7 @@ function trestle_register_social_sanitization_filters() {
|
||||
GENESIS_SETTINGS_FIELD,
|
||||
array(
|
||||
'trestle_layout',
|
||||
'trestle_nav_primary_location'
|
||||
)
|
||||
);
|
||||
|
||||
@@ -123,7 +128,8 @@ function trestle_register_social_sanitization_filters() {
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
add_action( 'genesis_theme_settings_metaboxes', 'trestle_register_settings_box' );
|
||||
/**
|
||||
* Registers Trestle admin settings box.
|
||||
*
|
||||
@@ -170,10 +176,17 @@ function trestle_settings_box() {
|
||||
</p>
|
||||
|
||||
<h4><?php _e( 'Primary Navigation', 'trestle' ) ?></h4>
|
||||
<p>
|
||||
<label for="<?php echo GENESIS_SETTINGS_FIELD; ?>[trestle_nav_primary_location]"><?php _e( 'Menu style:', 'trestle' ); ?> </label><br/>
|
||||
<select name="<?php echo GENESIS_SETTINGS_FIELD; ?>[trestle_nav_primary_location]" />
|
||||
<option value="full" <?php selected( esc_attr( genesis_get_option( 'trestle_nav_primary_location' ) ), 'full' ); ?> ><?php _e( 'Full width', 'trestle' ); ?></option>
|
||||
<option value="header" <?php selected( esc_attr( genesis_get_option( 'trestle_nav_primary_location' ) ), 'header' ); ?> ><?php _e( 'Header right', 'trestle' ); ?></option>
|
||||
</select>
|
||||
</p>
|
||||
<p>
|
||||
<input type="checkbox" id="<?php echo GENESIS_SETTINGS_FIELD; ?>[trestle_auto_nav]" name="<?php echo GENESIS_SETTINGS_FIELD; ?>[trestle_auto_nav]" value="1" <?php checked( esc_attr( genesis_get_option( 'trestle_auto_nav' ) ), 1); ?> /> <label for="<?php echo GENESIS_SETTINGS_FIELD; ?>[trestle_auto_nav]"><?php _e( 'Auto-generate primary navigation menu with published pages, to a depth of:', 'trestle' ); ?> </label>
|
||||
<select name="<?php echo GENESIS_SETTINGS_FIELD; ?>[trestle_auto_nav_depth]" />
|
||||
<option value="0" <?php selected( esc_attr( genesis_get_option( 'trestle_auto_nav_depth' ) ), '0' ); ?> >Unlimited</option>
|
||||
<option value="0" <?php selected( esc_attr( genesis_get_option( 'trestle_auto_nav_depth' ) ), '0' ); ?> ><?php _e( 'Unlimited', 'trestle' ); ?></option>
|
||||
<?php
|
||||
for( $i=1; $i<=10; $i++ ) {
|
||||
echo '<option value="' . $i . '" ' . selected( esc_attr( genesis_get_option( 'trestle_auto_nav_depth' ) ), $i, false ) . '>' . $i . '</option>' . "\n";
|
||||
@@ -307,6 +320,7 @@ function trestle_settings_box() {
|
||||
<?php
|
||||
}
|
||||
|
||||
add_action( 'tgmpa_register', 'trestle_register_required_plugins' );
|
||||
/**
|
||||
* Loads required & recommended plugins.
|
||||
*
|
||||
@@ -315,7 +329,7 @@ function trestle_settings_box() {
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @see tgmpa() in /lib/classes/class-tgm-plugin-activation.php
|
||||
* @see tgmpa() in /includes/classes/class-tgm-plugin-activation.php
|
||||
*/
|
||||
function trestle_register_required_plugins() {
|
||||
$plugins = array(
|
||||
@@ -9,34 +9,23 @@
|
||||
* @package Trestle
|
||||
*/
|
||||
|
||||
/*===========================================
|
||||
* Widget Areas
|
||||
===========================================*/
|
||||
|
||||
/**
|
||||
* Register custom widget areas
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
function trestle_register_widget_areas() {
|
||||
|
||||
}
|
||||
|
||||
/*===========================================
|
||||
* Head Styles & Scripts
|
||||
===========================================*/
|
||||
|
||||
add_action( 'wp_enqueue_scripts', 'trestle_header_actions' );
|
||||
/**
|
||||
* Loads theme scripts and styles.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
function trestle_header_actions() {
|
||||
|
||||
// Google fonts
|
||||
wp_enqueue_style( 'theme-google-fonts', '//fonts.googleapis.com/css?family=Lato:300,400,700' );
|
||||
|
||||
// Theme jQuery
|
||||
wp_enqueue_script( 'theme-jquery', get_stylesheet_directory_uri() . '/lib/js/theme-jquery.js', array( 'jquery' ), CHILD_THEME_VERSION, true );
|
||||
wp_enqueue_script( 'theme-jquery', get_stylesheet_directory_uri() . '/includes/js/theme-jquery.js', array( 'jquery' ), CHILD_THEME_VERSION, true );
|
||||
|
||||
// Get WP uploads directory
|
||||
$upload_dir = wp_upload_dir();
|
||||
@@ -58,13 +47,42 @@ function trestle_header_actions() {
|
||||
'trestle_equal_cols_breakpoint' => genesis_get_option( 'trestle_equal_cols_breakpoint' ),
|
||||
);
|
||||
wp_localize_script( 'theme-jquery', 'php_vars', $php_vars );
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*===========================================
|
||||
* Widget Areas
|
||||
===========================================*/
|
||||
|
||||
add_action( 'widgets_init', 'trestle_register_widget_areas' );
|
||||
/**
|
||||
* Register custom widget areas
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
function trestle_register_widget_areas() {
|
||||
//* Register after post widget area
|
||||
genesis_register_sidebar( array(
|
||||
'id' => 'after-post',
|
||||
'name' => __( 'After Post', 'themename' ),
|
||||
'description' => __( 'This is a widget area that can be placed after the post', 'themename' ),
|
||||
) );
|
||||
add_action( 'genesis_header', 'sp_after_post_widget', 12 );
|
||||
function sp_after_post_widget() {
|
||||
if ( is_singular( 'post' ) )
|
||||
genesis_widget_area( 'after-post', array(
|
||||
'before' => '<div class="after-post widget-area">',
|
||||
'after' => '</div>',
|
||||
) );
|
||||
}
|
||||
}
|
||||
|
||||
/*===========================================
|
||||
* Body Classes
|
||||
===========================================*/
|
||||
|
||||
add_filter( 'body_class', 'trestle_body_classes' );
|
||||
/**
|
||||
* Adds custom classes to the <body> element for styling purposes.
|
||||
*
|
||||
@@ -74,6 +92,7 @@ function trestle_header_actions() {
|
||||
* @return array Updated body classes.
|
||||
*/
|
||||
function trestle_body_classes( $classes ) {
|
||||
|
||||
// Add 'no-jquery' class to be removed by jQuery if enabled
|
||||
$classes[] = 'no-jquery';
|
||||
|
||||
@@ -91,6 +110,10 @@ function trestle_body_classes( $classes ) {
|
||||
if ( genesis_get_option( 'trestle_doc_link_icons' ) )
|
||||
$classes[] = 'doc-link-icons';
|
||||
|
||||
// Add menu style class
|
||||
if ( genesis_get_option( 'trestle_nav_primary_location' ) )
|
||||
$classes[] = 'nav-primary-location-' . esc_attr( genesis_get_option( 'trestle_nav_primary_location' ) );
|
||||
|
||||
// Add footer widget number class
|
||||
if ( genesis_get_option( 'trestle_footer_widgets_number' ) )
|
||||
$classes[] = 'footer-widgets-number-' . esc_attr( genesis_get_option( 'trestle_footer_widgets_number' ) );
|
||||
@@ -104,12 +127,15 @@ function trestle_body_classes( $classes ) {
|
||||
$classes[] = 'has-logo';
|
||||
|
||||
return $classes;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*===========================================
|
||||
* Header
|
||||
===========================================*/
|
||||
|
||||
add_filter( 'genesis_seo_title', 'trestle_do_logos', 10, 3 );
|
||||
/**
|
||||
* Output logos.
|
||||
*
|
||||
@@ -172,9 +198,10 @@ function trestle_do_logos( $title, $inside, $wrap ) {
|
||||
|
||||
|
||||
/*===========================================
|
||||
* Auto & Mobile Navigation
|
||||
* Navigation
|
||||
===========================================*/
|
||||
|
||||
add_action( 'init', 'trestle_nav_modifications' );
|
||||
/**
|
||||
* Performs modifications to the primary navigation menu
|
||||
*
|
||||
@@ -191,12 +218,10 @@ function trestle_nav_modifications() {
|
||||
// Set title for Trestle placeholder navigation menu
|
||||
$trestle_nav_title = __( 'Trestle Auto Nav Placeholder', 'trestle' );
|
||||
|
||||
// Add mobile nav button
|
||||
add_action( 'genesis_after_header', 'trestle_add_mobile_nav', 0 );
|
||||
|
||||
// Auto-generate nav if Genesis theme setting is checked
|
||||
if ( 1 == genesis_get_option( 'trestle_auto_nav' ) )
|
||||
if ( 1 == genesis_get_option( 'trestle_auto_nav' ) ) {
|
||||
add_filter( 'wp_nav_menu_items', 'trestle_auto_nav_items', 9, 2 );
|
||||
}
|
||||
|
||||
// Do custom nav extras
|
||||
if ( 1 == genesis_get_option( 'trestle_custom_nav_extras' ) ) {
|
||||
@@ -211,15 +236,19 @@ function trestle_nav_modifications() {
|
||||
trestle_nav_placeholder();
|
||||
}
|
||||
|
||||
add_action( 'init', 'trestle_nav_primary_location' );
|
||||
/**
|
||||
* Adds button to open primary mobile navigation menu.
|
||||
* Move primary navigation into the header if need be.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @since 1.2.0
|
||||
*/
|
||||
function trestle_add_mobile_nav() {
|
||||
// Only add the button if there is a primary menu
|
||||
if ( 1 == genesis_get_option( 'trestle_auto_nav' ) || has_nav_menu( 'primary' ) )
|
||||
echo '<a id="menu-button" class="button" href="javascript:void(0)">' . do_shortcode( genesis_get_option( 'trestle_nav_button_text' ) ) . '</a>';
|
||||
function trestle_nav_primary_location() {
|
||||
|
||||
if ( 'header' == genesis_get_option( 'trestle_nav_primary_location' ) ) {
|
||||
remove_action( 'genesis_after_header', 'genesis_do_nav' );
|
||||
add_action( 'genesis_header', 'genesis_do_nav', 12 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -312,6 +341,7 @@ function trestle_nav_placeholder() {
|
||||
* Posts & Pages
|
||||
===========================================*/
|
||||
|
||||
add_filter( 'wp_revisions_to_keep', 'trestle_update_revisions_number', 10, 2 );
|
||||
/**
|
||||
* Sets the number of post revisions.
|
||||
*
|
||||
@@ -337,6 +367,7 @@ function trestle_update_revisions_number( $num ) {
|
||||
* @see trestle_set_page_post_type()
|
||||
* @global object $post The current $post object.
|
||||
*/
|
||||
add_action( 'the_post', 'trestle_post_info_meta', 5 );
|
||||
function trestle_post_info_meta() {
|
||||
if ( ! is_admin() && in_the_loop() && genesis_get_option( 'trestle_manual_post_info_meta' ) ) {
|
||||
|
||||
@@ -379,6 +410,7 @@ function trestle_post_info_meta() {
|
||||
}
|
||||
}
|
||||
|
||||
add_filter( 'genesis_get_image_default_args', 'trestle_featured_image_fallback' );
|
||||
/**
|
||||
* Unset Genesis default featured image fallback of 'first-attached'
|
||||
*
|
||||
@@ -401,6 +433,9 @@ function trestle_featured_image_fallback( $args ) {
|
||||
* General Actions & Filters
|
||||
===========================================*/
|
||||
|
||||
add_filter( 'excerpt_more', 'trestle_read_more_link' );
|
||||
add_filter( 'get_the_content_more_link', 'trestle_read_more_link' );
|
||||
add_filter( 'the_content_more_link', 'trestle_read_more_link' );
|
||||
/**
|
||||
* Displays custom Trestle "read more" text in place of WordPress default.
|
||||
*
|
||||
@@ -417,4 +452,4 @@ function trestle_read_more_link( $default_text ) {
|
||||
return '… <a class="more-link" title="' . $custom_text . '" href="' . get_permalink() . '">' . $custom_text . '</a>';
|
||||
else
|
||||
return $default_text;
|
||||
}
|
||||
}
|
||||
@@ -31,11 +31,36 @@ jQuery(document).ready(function() {
|
||||
jQuery('li:first-child').addClass('first');
|
||||
jQuery('ul, ol').parent('li').addClass('parent');
|
||||
|
||||
// Mobile navigation button
|
||||
jQuery('#menu-button').click(function() {
|
||||
var button = jQuery(this);
|
||||
button.toggleClass('open');
|
||||
jQuery('.nav-primary').slideToggle();
|
||||
// Mobile header toggle buttons
|
||||
jQuery('.site-header .wrap').prepend('<div class="toggle-buttons" />');
|
||||
jQuery('.site-header .widget-area, .nav-primary').each(function(i) {
|
||||
var target = jQuery(this);
|
||||
|
||||
var buttonClass = 'toggle-button';
|
||||
if ( jQuery(this).is( 'nav' ) ) {
|
||||
buttonClass += ' nav-toggle';
|
||||
}
|
||||
|
||||
// Add toggle buttons to header
|
||||
jQuery('.toggle-buttons').prepend('<a id="toggle-button-' + i + '" class="' + buttonClass + '" href="#">Toggle</a>');
|
||||
|
||||
// Add target class to nav and widget areas
|
||||
target.addClass('toggle-target-' + i );
|
||||
});
|
||||
|
||||
jQuery('.site-header .toggle-button').click( function( event ) {
|
||||
event.preventDefault();
|
||||
|
||||
var button = jQuery(this);
|
||||
var targetID = button.attr('id').match(/\d+/);
|
||||
|
||||
// Toggle buttons
|
||||
button.toggleClass('open');
|
||||
jQuery('.site-header .toggle-button').not(button).removeClass('open');
|
||||
|
||||
// Toggle targets
|
||||
jQuery('.toggle-target-' + targetID).toggleClass('open');
|
||||
jQuery('[class*="toggle-target"]').not('.toggle-target-' + targetID).removeClass('open');
|
||||
});
|
||||
|
||||
// Mobile navigation icons
|
||||
@@ -49,11 +74,18 @@ jQuery(document).ready(function() {
|
||||
jQuery('.sub-icon').click(function(event) {
|
||||
event.preventDefault();
|
||||
var icon = jQuery(this);
|
||||
icon.next('ul').slideToggle().toggleClass('open');
|
||||
if ( icon.text().indexOf( closedIcon ) !== -1 )
|
||||
icon.text(openIcon);
|
||||
else if ( icon.text().indexOf( openIcon ) !== -1 )
|
||||
icon.text(closedIcon);
|
||||
icon.next('ul').slideToggle().toggleClass('open');
|
||||
if ( icon.text().indexOf( closedIcon ) !== -1 )
|
||||
icon.text(openIcon);
|
||||
else if ( icon.text().indexOf( openIcon ) !== -1 )
|
||||
icon.text(closedIcon);
|
||||
});
|
||||
|
||||
jQuery('.widget-area-toggle').click(function(event) {
|
||||
event.preventDefault();
|
||||
var button = jQuery(this);
|
||||
button.toggleClass('open');
|
||||
button.next('.widget-area').slideToggle();
|
||||
});
|
||||
|
||||
// Equal height homepage cols
|
||||
@@ -71,6 +103,8 @@ jQuery(window).load(function() {
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Equal Heights Plugin
|
||||
*
|
||||
@@ -92,39 +126,39 @@ jQuery(window).load(function() {
|
||||
* Example 4: jQuery(".cols").equalHeights(null, null,768); Only resize columns above 768px viewport
|
||||
*
|
||||
*/
|
||||
(function(jQuery) {
|
||||
jQuery.fn.equalHeights = function(minHeight, maxHeight, breakPoint) {
|
||||
var items = this;
|
||||
breakPoint = breakPoint || 0;
|
||||
|
||||
(function(jQuery) {
|
||||
jQuery.fn.equalHeights = function(minHeight, maxHeight, breakPoint) {
|
||||
var items = this;
|
||||
breakPoint = breakPoint || 0;
|
||||
|
||||
// Bind functionality to appropriate events
|
||||
jQuery(window).bind('load orientationchange resize', function() {
|
||||
tallest = (minHeight) ? minHeight : 0;
|
||||
items.each(function() {
|
||||
jQuery(this).height('auto');
|
||||
if(jQuery(this).outerHeight() > tallest) {
|
||||
tallest = jQuery(this).outerHeight();
|
||||
}
|
||||
});
|
||||
|
||||
tallest = (minHeight) ? minHeight : 0;
|
||||
items.each(function() {
|
||||
jQuery(this).height('auto');
|
||||
if(jQuery(this).outerHeight() > tallest) {
|
||||
tallest = jQuery(this).outerHeight();
|
||||
}
|
||||
});
|
||||
|
||||
// Get viewport width (taking scrollbars into account)
|
||||
var e = window;
|
||||
a = 'inner';
|
||||
if (!('innerWidth' in window )) {
|
||||
a = 'client';
|
||||
e = document.documentElement || document.body;
|
||||
}
|
||||
width = e[ a+'Width' ];
|
||||
|
||||
a = 'client';
|
||||
e = document.documentElement || document.body;
|
||||
}
|
||||
width = e[ a+'Width' ];
|
||||
|
||||
// Equalize column heights if above the specified breakpoint
|
||||
if ( width >= breakPoint ) {
|
||||
if((maxHeight) && tallest > maxHeight) tallest = maxHeight;
|
||||
console.log(tallest);
|
||||
return items.each(function() {
|
||||
jQuery(this).height(tallest);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
})(jQuery);
|
||||
if((maxHeight) && tallest > maxHeight) tallest = maxHeight;
|
||||
console.log(tallest);
|
||||
return items.each(function() {
|
||||
jQuery(this).height(tallest);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
})(jQuery);
|
||||
+84
-84
@@ -15,334 +15,334 @@ msgstr ""
|
||||
"X-Poedit-KeywordsList: __;_e;_x;_n\n"
|
||||
"X-Poedit-SearchPath-0: ..\n"
|
||||
|
||||
#: ../lib/admin/admin-functions.php:38
|
||||
#: ../includes/admin/admin-functions.php:38
|
||||
msgid "Navigation"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:39
|
||||
#: ../includes/admin/admin-functions.php:39
|
||||
msgid "Read More »"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:121
|
||||
#: ../includes/admin/admin-functions.php:121
|
||||
msgid "Trestle Settings <small>by</small>"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:135
|
||||
#: ../includes/admin/admin-functions.php:135
|
||||
msgid "Layout"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:143
|
||||
#: ../includes/admin/admin-functions.php:143
|
||||
msgid "Primary Navigation"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:145
|
||||
#: ../includes/admin/admin-functions.php:145
|
||||
msgid ""
|
||||
"Automatically generate nav menu (replaces custom/manual menu with auto-"
|
||||
"generated menu)"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:146
|
||||
#: ../includes/admin/admin-functions.php:146
|
||||
msgid "Include home link"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:149
|
||||
#: ../includes/admin/admin-functions.php:149
|
||||
msgid "Text for mobile navigation button (shortcodes can be included):"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:153
|
||||
#: ../includes/admin/admin-functions.php:153
|
||||
msgid "Primary Navigation Extras"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:154
|
||||
#: ../includes/admin/admin-functions.php:154
|
||||
msgid ""
|
||||
"Display custom navigation extras content (overrides standard Genesis "
|
||||
"navigation extras)"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:156
|
||||
#: ../includes/admin/admin-functions.php:156
|
||||
msgid "Custom navigation extras text:"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:160
|
||||
#: ../includes/admin/admin-functions.php:160
|
||||
msgid "Blog/Posts"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:162
|
||||
#: ../includes/admin/admin-functions.php:162
|
||||
msgid "Custom read more link text"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:165
|
||||
#: ../includes/admin/admin-functions.php:165
|
||||
msgid "Number of post revisions"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:176
|
||||
#: ../includes/admin/admin-functions.php:176
|
||||
msgid "Post Info & Meta"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:177
|
||||
#: ../includes/admin/admin-functions.php:177
|
||||
msgid "Manually select where to show Post Info & Meta"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:180
|
||||
#: ../includes/admin/admin-functions.php:180
|
||||
msgid "Show Post Info on:"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:190 ../lib/admin/admin-functions.php:210
|
||||
#: ../includes/admin/admin-functions.php:190 ../includes/admin/admin-functions.php:210
|
||||
#, php-format
|
||||
msgid "%s (single)"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:193 ../lib/admin/admin-functions.php:213
|
||||
#: ../includes/admin/admin-functions.php:193 ../includes/admin/admin-functions.php:213
|
||||
#, php-format
|
||||
msgid "%s (archive)"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:200
|
||||
#: ../includes/admin/admin-functions.php:200
|
||||
msgid "Show Post Meta on:"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:221
|
||||
#: ../includes/admin/admin-functions.php:221
|
||||
msgid "Footer Widgets"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:223
|
||||
#: ../includes/admin/admin-functions.php:223
|
||||
msgid "Number"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:233
|
||||
#: ../includes/admin/admin-functions.php:233
|
||||
msgid "Link Icons"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:235
|
||||
#: ../includes/admin/admin-functions.php:235
|
||||
msgid "Add icons to external links"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:236
|
||||
#: ../includes/admin/admin-functions.php:236
|
||||
msgid "Add icons to email links"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:237
|
||||
#: ../includes/admin/admin-functions.php:237
|
||||
msgid "Add icons to .pdf links"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:238
|
||||
#: ../includes/admin/admin-functions.php:238
|
||||
msgid "Add icons to .doc links"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:398
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:155
|
||||
#: ../includes/admin/admin-functions.php:398
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:155
|
||||
msgid "Install Required Plugins"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:399
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:156
|
||||
#: ../includes/admin/admin-functions.php:399
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:156
|
||||
msgid "Install Plugins"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:400
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:157
|
||||
#: ../includes/admin/admin-functions.php:400
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:157
|
||||
#, php-format
|
||||
msgid "Installing Plugin: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:401
|
||||
#: ../includes/admin/admin-functions.php:401
|
||||
msgid "Something went wrong with the plugin API."
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:412
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:169
|
||||
#: ../includes/admin/admin-functions.php:412
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:169
|
||||
msgid "Return to Required Plugins Installer"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:413
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:171
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1840
|
||||
#: ../includes/admin/admin-functions.php:413
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:171
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1840
|
||||
msgid "Plugin activated successfully."
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/admin/admin-functions.php:414
|
||||
#: ../includes/admin/admin-functions.php:414
|
||||
#, php-format
|
||||
msgid "All plugins installed and activated successfully. %s"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:158
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:158
|
||||
msgid "Something went wrong."
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:170
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:170
|
||||
msgid "Return to the dashboard"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:172
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1538
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:172
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1538
|
||||
msgid "The following plugin was activated successfully:"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:173
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:173
|
||||
#, php-format
|
||||
msgid "All plugins installed and activated successfully. %1$s"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:174
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:174
|
||||
msgid "Dismiss this notice"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1085
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1085
|
||||
msgid "External Link"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1090
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1090
|
||||
msgid "Private Repository"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1093
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1093
|
||||
msgid "Pre-Packaged"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1097
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1097
|
||||
msgid "WordPress Repository"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1100
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1100
|
||||
msgid "Required"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1100
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1100
|
||||
msgid "Recommended"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1103
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1103
|
||||
msgid "Not Installed"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1105
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1105
|
||||
msgid "Installed But Not Activated"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1275
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1275
|
||||
#, php-format
|
||||
msgid ""
|
||||
"No plugins to install or activate. <a href=\"%1$s\" title=\"Return to the "
|
||||
"Dashboard\">Return to the Dashboard</a>"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1291
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1291
|
||||
msgid "Plugin"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1292
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1292
|
||||
msgid "Source"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1293
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1293
|
||||
msgid "Type"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1294
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1294
|
||||
msgid "Status"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1312
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1312
|
||||
msgid "Install"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1313
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1313
|
||||
msgid "Activate"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1823
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1823
|
||||
msgid "Install package not available."
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1824
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1824
|
||||
#, php-format
|
||||
msgid "Downloading install package from <span class=\"code\">%s</span>…"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1825
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1825
|
||||
msgid "Unpacking the package…"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1826
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1826
|
||||
msgid "Installing the plugin…"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1827
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1827
|
||||
msgid "Plugin install failed."
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1828
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1828
|
||||
msgid "Plugin installed successfully."
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1839
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1839
|
||||
msgid "Plugin activation failed."
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1949
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1949
|
||||
msgid ""
|
||||
"The installation and activation process is starting. This process may take a "
|
||||
"while on some hosts, so please be patient."
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1950
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1950
|
||||
#, php-format
|
||||
msgid "%1$s installed and activated successfully."
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1950
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1959
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1950
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1959
|
||||
msgid "Show Details"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1950
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1959
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1950
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1959
|
||||
msgid "Hide Details"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1951
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1951
|
||||
msgid "All installations and activations have been completed."
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1952
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1952
|
||||
#, php-format
|
||||
msgid "Installing and Activating Plugin %1$s (%2$d/%3$d)"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1956
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1956
|
||||
msgid ""
|
||||
"The installation process is starting. This process may take a while on some "
|
||||
"hosts, so please be patient."
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1957
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1957
|
||||
#, php-format
|
||||
msgid "An error occurred while installing %1$s: <strong>%2$s</strong>."
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1958
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1958
|
||||
#, php-format
|
||||
msgid "The installation of %1$s failed."
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1959
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1959
|
||||
#, php-format
|
||||
msgid "%1$s installed successfully."
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1960
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1960
|
||||
msgid "All installations have been completed."
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:1961
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:1961
|
||||
#, php-format
|
||||
msgid "Installing Plugin %1$s (%2$d/%3$d)"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/classes/class-tgm-plugin-activation.php:2052
|
||||
#: ../includes/classes/class-tgm-plugin-activation.php:2052
|
||||
msgid "Return to the Dashboard"
|
||||
msgstr ""
|
||||
|
||||
#: ../lib/functions/theme-functions.php:136
|
||||
#: ../includes/functions/theme-functions.php:136
|
||||
msgid "Trestle Auto Nav Placeholder"
|
||||
msgstr ""
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Trestle admin functionality
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @package Trestle
|
||||
*/
|
||||
|
||||
// Require admin functions
|
||||
require_once dirname( __FILE__ ) . '/admin-functions.php';
|
||||
|
||||
// Trestle admin scripts and styles
|
||||
add_action( 'admin_enqueue_scripts', 'trestle_admin_actions' );
|
||||
|
||||
// Trestle default settings
|
||||
add_filter( 'genesis_theme_settings_defaults', 'trestle_custom_defaults' );
|
||||
|
||||
// Sanitize settings
|
||||
add_action( 'genesis_settings_sanitizer_init', 'trestle_register_social_sanitization_filters' );
|
||||
|
||||
// Register Trestle settings metabox
|
||||
add_action( 'genesis_theme_settings_metaboxes', 'trestle_register_settings_box' );
|
||||
|
||||
// Required & recommended plugins
|
||||
add_action( 'tgmpa_register', 'trestle_register_required_plugins' );
|
||||
@@ -1285,6 +1285,7 @@ Site Header
|
||||
---------------------------------------------------------------------------------------------------- */
|
||||
|
||||
.site-header {
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
@@ -1305,8 +1306,8 @@ Site Header
|
||||
font-weight: 700;
|
||||
margin-bottom: 16px;
|
||||
margin-bottom: 1.6rem;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
width: auto;
|
||||
max-width: 50%;
|
||||
}
|
||||
|
||||
.site-title {
|
||||
@@ -1357,12 +1358,11 @@ Site Header
|
||||
}
|
||||
|
||||
|
||||
/* Widget Area
|
||||
/* Header Widget Areas
|
||||
--------------------------------------------- */
|
||||
|
||||
.site-header .widget-area {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.site-header .search-form {
|
||||
@@ -1372,6 +1372,60 @@ Site Header
|
||||
}
|
||||
|
||||
|
||||
/* Header Toggle Styles
|
||||
--------------------------------------------- */
|
||||
|
||||
.site-header .toggle-buttons {
|
||||
float: right;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.site-header .toggle-button:before {
|
||||
content: "\f002";
|
||||
margin-left: .5em;
|
||||
font-family: FontAwesome;
|
||||
font-size: 24px;
|
||||
font-size: 2.4rem;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.site-header .toggle-button.nav-toggle:before {
|
||||
content: "\f0c9";
|
||||
}
|
||||
|
||||
|
||||
.nav-primary,
|
||||
.site-header .nav-primary,
|
||||
.site-header .widget-area {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
opacity: 0;
|
||||
filter: alpha(opacity=0);
|
||||
-webkit-transition: opacity .5s ease;
|
||||
-moz-transition: opacity .5s ease;
|
||||
-ms-transition: opacity .5s ease;
|
||||
-o-transition: opacity .5s ease;
|
||||
transition: opacity .5s ease;
|
||||
}
|
||||
|
||||
.site-header .widget-area {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.site-container > .nav-primary {
|
||||
top: auto;
|
||||
}
|
||||
|
||||
.nav-primary.open,
|
||||
.widget-area.open {
|
||||
z-index: 50;
|
||||
opacity: 1;
|
||||
filter: alpha(opacity=100);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Site Navigation
|
||||
---------------------------------------------------------------------------------------------------- */
|
||||
@@ -1379,19 +1433,21 @@ Site Navigation
|
||||
/* General Navigation
|
||||
--------------------------------------------- */
|
||||
|
||||
#menu-button {
|
||||
#menu-toggle {
|
||||
display: block;
|
||||
clear: both;
|
||||
margin: 0 20px;
|
||||
margin: 0 2rem;
|
||||
text-align: center;
|
||||
display: block;
|
||||
|
||||
}
|
||||
|
||||
.bubble #menu-button {
|
||||
.bubble #menu-toggle {
|
||||
margin-top: 20px;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
.custom-background #menu-button {
|
||||
.custom-background #menu-toggle {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
@@ -1404,23 +1460,29 @@ Site Navigation
|
||||
|
||||
.genesis-nav-menu li {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
display: block;
|
||||
border-width: 1px 0;
|
||||
}
|
||||
|
||||
.genesis-nav-menu li.first {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.genesis-nav-menu a {
|
||||
border: 0 solid #eee;
|
||||
border-bottom-width: 1px;
|
||||
}
|
||||
|
||||
.genesis-nav-menu a,
|
||||
.genesis-nav-menu > .right {
|
||||
border-width: 0;
|
||||
color: #999;
|
||||
display: block;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.genesis-nav-menu a:hover,
|
||||
.genesis-nav-menu .current_page_item > a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.genesis-nav-menu ul .current_page_item > a {
|
||||
.genesis-nav-menu [class*="current-"] > a,
|
||||
.genesis-nav-menu [class*="current_"] > a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
@@ -1436,7 +1498,6 @@ Site Navigation
|
||||
/* Sub Navigation
|
||||
--------------------------------------------- */
|
||||
|
||||
.genesis-nav-menu .sub-menu,
|
||||
.genesis-nav-menu ul {
|
||||
display: none;
|
||||
margin: 0;
|
||||
@@ -1449,141 +1510,72 @@ Site Navigation
|
||||
transition: opacity .4s ease-in-out;
|
||||
}
|
||||
|
||||
.genesis-nav-menu .current_page_item > ul,
|
||||
.genesis-nav-menu .current_page_parent > ul,
|
||||
.genesis-nav-menu .current_page_ancestor > ul {
|
||||
.genesis-nav-menu [class*="current-"] > ul,
|
||||
.genesis-nav-menu [class*="current_"] > ul {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.genesis-nav-menu li .sub-menu,
|
||||
.genesis-nav-menu li ul {
|
||||
border: 0 solid #eee;
|
||||
border-top-width: 1px;
|
||||
}
|
||||
|
||||
.genesis-nav-menu > li > .sub-menu,
|
||||
.genesis-nav-menu > li > ul {
|
||||
border: 1px solid #eee;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.genesis-nav-menu .sub-menu li,
|
||||
.genesis-nav-menu ul li {
|
||||
padding-left: 15px;
|
||||
padding-left: 1.5rem;
|
||||
}
|
||||
|
||||
.genesis-nav-menu .sub-menu a,
|
||||
.genesis-nav-menu ul a {
|
||||
position: relative;
|
||||
padding: 10px 5px;
|
||||
border: 0 solid #eee;
|
||||
border-bottom-width: 1px;
|
||||
}
|
||||
|
||||
.genesis-nav-menu .sub-menu li:last-child > a,
|
||||
.genesis-nav-menu ul li:last-child > a {
|
||||
border-bottom-width: 0;
|
||||
.genesis-nav-menu ul a:hover,
|
||||
.genesis-nav-menu ul [class*="current-"] > a,
|
||||
.genesis-nav-menu ul [class*="current_"] > a {
|
||||
color: #222;
|
||||
}
|
||||
|
||||
/* Site Header Navigation
|
||||
--------------------------------------------- */
|
||||
|
||||
.site-header .sub-menu {
|
||||
border-top: 1px solid #eee;
|
||||
.genesis-nav-menu .sub-icon,
|
||||
.genesis-nav-menu ul .sub-icon {
|
||||
position: absolute;
|
||||
z-index: 99;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 50px;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.site-header .genesis-nav-menu a {
|
||||
padding: 15px 10px;
|
||||
padding: 1.5rem 1rem;
|
||||
font-size: .8em;
|
||||
}
|
||||
|
||||
.site-header .genesis-nav-menu a:hover,
|
||||
.site-header .genesis-nav-menu .current_page_item > a,
|
||||
.site-header .genesis-nav-menu .current_page_ancestor > a {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.site-header .genesis-nav-menu > li {
|
||||
display: inline-block;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.site-header .genesis-nav-menu .sub-menu {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Primary / Mobile Navigation
|
||||
/* Primary Navigation
|
||||
--------------------------------------------- */
|
||||
|
||||
.nav-primary,
|
||||
.nav-secondary {
|
||||
display: none;
|
||||
margin: 5px 20px 0;
|
||||
margin: 5px 2rem 0;
|
||||
border-radius: 3px;
|
||||
overflow: hidden;
|
||||
background-color: #333;
|
||||
}
|
||||
|
||||
.genesis-nav-menu li {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.genesis-nav-menu > li,
|
||||
.genesis-nav-menu > .right {
|
||||
border-top: 1px solid #444;
|
||||
}
|
||||
|
||||
.genesis-nav-menu > li.first {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.genesis-nav-menu a,
|
||||
.genesis-nav-menu ul a {
|
||||
.nav-primary a {
|
||||
padding-right: 50px;
|
||||
padding-right: 5rem;
|
||||
}
|
||||
|
||||
.genesis-nav-menu a:hover,
|
||||
.genesis-nav-menu .current_page_item > a,
|
||||
.genesis-nav-menu .current_page_ancestor > a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
/* Secondary Navigation
|
||||
--------------------------------------------- */
|
||||
|
||||
.nav-secondary {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.nav-secondary a:hover,
|
||||
.nav-secondary .current_page_item > a,
|
||||
.nav-secondary .current_page_ancestor > a,
|
||||
.nav-secondary ul .current_page_item > a {
|
||||
color: #111;
|
||||
}
|
||||
|
||||
.nav-secondary .current_page_item > a,
|
||||
.nav-secondary .current_page_ancestor > a {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
|
||||
/* Navigation Extras
|
||||
--------------------------------------------- */
|
||||
|
||||
.genesis-nav-menu > .right {
|
||||
border-top-style: double;
|
||||
border-width: 4px;
|
||||
}
|
||||
|
||||
.genesis-nav-menu > .right > a {
|
||||
display: inline;
|
||||
padding: 0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.genesis-nav-menu > .right .button,
|
||||
@@ -1602,7 +1594,6 @@ Site Navigation
|
||||
float: none !important;
|
||||
width: auto;
|
||||
padding: 0.6em 1.2em;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.genesis-nav-menu > .right .search-form {
|
||||
@@ -1614,37 +1605,78 @@ Site Navigation
|
||||
margin: 0 0 0 0.5em;
|
||||
}
|
||||
|
||||
/* Sub Menus
|
||||
|
||||
/* Secondary Navigation
|
||||
--------------------------------------------- */
|
||||
|
||||
.genesis-nav-menu .sub-icon,
|
||||
.genesis-nav-menu ul .sub-icon {
|
||||
position: absolute;
|
||||
z-index: 99;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 50px;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
text-align: center;
|
||||
.nav-secondary {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.genesis-nav-menu ul a:hover,
|
||||
.genesis-nav-menu ul .current_page_item > a,
|
||||
.genesis-nav-menu ul .current_page_ancestor > a {
|
||||
color: #222;
|
||||
.nav-secondary a:hover,
|
||||
.nav-secondary [class*="current-"] > a,
|
||||
.nav-secondary [class*="current_"] > a {
|
||||
color: #111;
|
||||
}
|
||||
|
||||
|
||||
/* Header Navigation
|
||||
--------------------------------------------- */
|
||||
|
||||
.site-header .widget-area .menu a,
|
||||
.site-header .widget-area .menu .right {
|
||||
padding: 15px 10px;
|
||||
padding: 1.5rem 1rem;
|
||||
font-size: .8em;
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
|
||||
.site-header .widget-area .menu a:hover,
|
||||
.site-header .widget-area .menu [class*="current-"] > a,
|
||||
.site-header .widget-area .menu [class*="current_"] > a {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.site-header .widget-area .menu > li {
|
||||
display: inline-block;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.site-header .widget-area .menu li ul {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
/* Header Primary Navigation
|
||||
--------------------------------------------- */
|
||||
.site-header .nav-primary {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.site-header .nav-primary .wrap {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.site-header .nav-primary a:hover,
|
||||
.site-header .nav-primary [class*="current-"] > a,
|
||||
.site-header .nav-primary [class*="current_"] > a {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.site-header .right {
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Non jQuery Styles
|
||||
--------------------------------------------- */
|
||||
|
||||
.no-jquery #menu-button {
|
||||
margin-bottom: 0;
|
||||
.no-jquery #menu-toggle {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.no-jquery #menu-button:hover + .genesis-nav-menu,
|
||||
.no-jquery #menu-toggle:hover + .genesis-nav-menu,
|
||||
.no-jquery a:hover + ul,
|
||||
.no-jquery ul:hover {
|
||||
display: block;
|
||||
@@ -2065,9 +2097,7 @@ Media Queries
|
||||
}
|
||||
|
||||
.title-area {
|
||||
width: auto;
|
||||
margin-bottom: 0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.logo-mobile {
|
||||
@@ -2088,6 +2118,7 @@ Media Queries
|
||||
clear: right;
|
||||
}
|
||||
|
||||
.site-header .menu > .last,
|
||||
.site-header .menu > .last a {
|
||||
padding-right: 0;
|
||||
}
|
||||
@@ -2100,14 +2131,37 @@ Media Queries
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.site-header .genesis-nav-menu {
|
||||
.site-header .widget-area .menu {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.site-header .genesis-nav-menu .sub-menu {
|
||||
.site-header .widget-area .menu ul {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Header Toggle Styles
|
||||
--------------------------------------------- */
|
||||
.nav-primary,
|
||||
.site-header .nav-primary,
|
||||
.site-header .widget-area {
|
||||
position: static;
|
||||
top: auto;
|
||||
right: auto;
|
||||
left: auto;
|
||||
opacity: 1;
|
||||
filter: alpha(opacity=100);
|
||||
}
|
||||
|
||||
.site-header .nav-primary,
|
||||
.site-header .widget-area {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.site-header .toggle-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
/* Content
|
||||
--------------------------------------------- */
|
||||
|
||||
@@ -2286,7 +2340,8 @@ Media Queries
|
||||
|
||||
/* Non-Mobile Navigation
|
||||
--------------------------------------------- */
|
||||
#menu-button {
|
||||
#menu-toggle,
|
||||
.widget-area-toggle {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -2307,7 +2362,6 @@ Media Queries
|
||||
border-top-width: 0;
|
||||
}
|
||||
|
||||
.genesis-nav-menu .sub-menu,
|
||||
.genesis-nav-menu ul {
|
||||
display: block;
|
||||
left: -9999px;
|
||||
@@ -2326,8 +2380,18 @@ Media Queries
|
||||
.genesis-nav-menu > .right {
|
||||
padding: 16px 20px;
|
||||
padding: 1.6rem 2rem;
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
|
||||
|
||||
/* Primary Navigation
|
||||
--------------------------------------------- */
|
||||
.nav-primary a {
|
||||
padding-right: 20px;
|
||||
padding-right: 2rem;
|
||||
}
|
||||
|
||||
|
||||
/* Navigation Extras
|
||||
--------------------------------------------- */
|
||||
|
||||
@@ -2353,17 +2417,14 @@ Media Queries
|
||||
/* Sub Menus
|
||||
--------------------------------------------- */
|
||||
|
||||
.genesis-nav-menu li .sub-menu,
|
||||
.genesis-nav-menu li ul {
|
||||
border-width: 0 0 1px;
|
||||
}
|
||||
|
||||
.genesis-nav-menu .sub-menu li,
|
||||
.genesis-nav-menu ul li {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.genesis-nav-menu .sub-menu a,
|
||||
.genesis-nav-menu ul a {
|
||||
position: relative;
|
||||
width: 200px;
|
||||
@@ -2406,6 +2467,18 @@ Media Queries
|
||||
margin-left: -1px;
|
||||
}
|
||||
|
||||
/* Header Primary Navigation
|
||||
--------------------------------------------- */
|
||||
.site-header .nav-primary {
|
||||
background-color: transparent;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.site-header .nav-primary .menu > li > a {
|
||||
padding: 0.6em 1.2em;
|
||||
}
|
||||
|
||||
|
||||
/* Plugins
|
||||
--------------------------------------------- */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user