Skip to content

Commit

Permalink
Merge pull request #81 from INN/39-site-header
Browse files Browse the repository at this point in the history
Site header
  • Loading branch information
Josh Darby authored Oct 31, 2019
2 parents fd4bf86 + 19411cf commit df7ae1a
Show file tree
Hide file tree
Showing 10 changed files with 891 additions and 24 deletions.
2 changes: 1 addition & 1 deletion wp-content/themes/citylimits/css/child-style.css

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion wp-content/themes/citylimits/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,19 @@ function register_citylimits_menu_locations() {
* Enqueue specific styles and scripts for City Limits child theme
*/
function citylimits_enqueue_styles(){
wp_enqueue_style( 'dashicons' );
wp_enqueue_style( 'dashicons' );
wp_enqueue_script( 'citylimits-navigation', get_stylesheet_directory_uri() . '/js/navigation.js', array( 'jquery' ), '1.0', true );
}
add_action( 'wp_enqueue_scripts', 'citylimits_enqueue_styles' );

/**
* Dequeue specific scripts
*/
function citylimits_dequeue_scripts(){
wp_dequeue_script( 'largo-navigation' );
}
add_action( 'wp_print_scripts', 'citylimits_dequeue_scripts', 100 );

/**
* Function to add thumbnail images to the secondary special project nav menu
*
Expand Down
16 changes: 16 additions & 0 deletions wp-content/themes/citylimits/header-rezone.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,22 @@

<?php

/**
* Fires before the Largo header content.
*
* @since 0.4
*/
do_action( 'largo_before_header' );

get_template_part( 'partials/largo-header' );

/**
* Fires after the Largo header content.
*
* @since 0.4
*/
do_action( 'largo_after_header' );

get_template_part( 'partials/nav', 'sticky' );

/**
Expand Down
147 changes: 147 additions & 0 deletions wp-content/themes/citylimits/header.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
<!DOCTYPE html>
<!--[if lt IE 7]> <html <?php language_attributes(); ?> class="no-js ie6"> <![endif]-->
<!--[if IE 7]> <html <?php language_attributes(); ?> class="no-js ie7"> <![endif]-->
<!--[if IE 8]> <html <?php language_attributes(); ?> class="no-js ie8"> <![endif]-->
<!--[if IE 9]> <html <?php language_attributes(); ?> class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html <?php language_attributes(); ?> class="no-js"> <!--<![endif]-->
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<?php
/**
* The template for displaying the header
*
* Contains the HEAD content and opening of the id=page and id=main DIV elements.
*
* @package Largo
* @since 0.1
*/
?>
<?php
// Fallback <title> tag on WP pre 4.1
// @link https://make.wordpress.org/core/2014/10/29/title-tags-in-4-1/
// @since 0.6
if ( ! function_exists( '_wp_render_title_tag' ) ) {
printf(
'<title>%1$s</title>',
wp_title( '|', false, 'right' )
);
}
?>
<link rel="profile" href="https://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php
if ( is_singular() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}

wp_head();
?>
</head>

<body <?php body_class(); ?>>

<?php

/**
* Fires right after the opening body tag.
*
* @since 0.6.4
*/
if ( function_exists( 'wp_body_open' ) ) {
wp_body_open();
} else {
do_action( 'wp_body_open' );
}

?>

<div id="top"></div>

<?php

/**
* Fires at the top of the page, just after the id=top DIV element.
*
* @since 0.4
*/
do_action( 'largo_top' );

?>

<?php
if ( SHOW_GLOBAL_NAV === TRUE ) {

/**
* Fires before the Largo global navigation content.
*
* @since 0.4
*/
do_action( 'largo_before_global_nav' );

get_template_part( 'partials/nav', 'global' );

/**
* Fires after the Largo global navigation content.
*
* @since 0.4
*/
do_action( 'largo_after_global_nav' );

}
?>

<div id="page" class="hfeed clearfix">

<?php

if ( of_get_option( 'leaderboard_enabled' ) == TRUE ) {
get_template_part( 'partials/header-ad-zone' );
}

/**
* Fires before the Largo header content.
*
* @since 0.4
*/
do_action( 'largo_before_header' );

get_template_part( 'partials/largo-header' );

/**
* Fires after the Largo header content.
*
* @since 0.4
*/
do_action( 'largo_after_header' );

get_template_part( 'partials/nav', 'main' );

if ( SHOW_SECONDARY_NAV === TRUE ) {
get_template_part( 'partials/nav', 'secondary' );
}

get_template_part( 'partials/nav', 'sticky' );

get_template_part('partials/homepage-alert');

/**
* Fires after the Largo navigation content.
*
* @since 0.4
*/
do_action( 'largo_after_nav' );

?>

<div id="main" class="row-fluid clearfix">

<?php

/**
* Fires at the top of the Largo id=main DIV element.
*
* @since 0.4
*/
do_action( 'largo_main_top' );
Loading

0 comments on commit df7ae1a

Please sign in to comment.