forked from argoproject/Argo
-
-
Notifications
You must be signed in to change notification settings - Fork 83
/
Copy pathnav-global.php
64 lines (62 loc) · 2.03 KB
/
nav-global.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/*
* Global Navigation Menu
*
* Shown at the very top of a Largo site on a (default) thin dark bar.
* Not shown when sticky navigation is displayed, so typically only the home page.
* This menu is appended to the offcanvas nav menu (see partial/nav-sticky.php).
*
* @package Largo
* @link http://largo.readthedocs.io/users/menus.html#available-menu-areas
*/
if (
! is_single() && ! is_singular()
|| ! of_get_option( 'main_nav_hide_article', false )
|| is_front_page()
) {
?>
<div class="global-nav-bg">
<div class="global-nav">
<nav id="top-nav" class="span12">
<span class="visuallyhidden">
<a href="#main" title="<?php esc_attr_e( 'Skip to content', 'largo' ); ?>"><?php _e( 'Skip to content', 'largo' ); ?></a>
</span>
<?php
/* Global Navigation Menu Query */
$top_args = array(
'theme_location' => 'global-nav',
'depth' => 1,
'container' => false,
);
largo_nav_menu($top_args);
?>
<div class="nav-right">
<?php
/* Check to display Social Media Icons */
if ( of_get_option( 'show_header_social') ) { ?>
<ul class="header-social social-icons visible-desktop">
<?php largo_social_links(); ?>
</ul>
<?php }
/* Check to display Donate Button */
if ( of_get_option( 'show_donate_button') ) {
largo_donate_button();
}
if ( ! is_search() ) {
?>
<div id="header-search">
<form class="form-search" role="search" method="get" action="<?php echo esc_url( home_url( '/' ) ); ?>">
<div class="input-append">
<input type="text" placeholder="<?php esc_attr_e('Search', 'largo'); ?>" aria-label="<?php esc_attr_e('Search', 'largo'); ?>" class="input-medium appendedInputButton search-query" value="" name="s" /><button type="submit" class="search-submit btn"><?php _e('GO', 'largo'); ?></button>
</div>
</form>
</div>
<?php
}
?>
<!-- END Header Search -->
</div>
</nav>
</div> <!-- /.global-nav -->
</div> <!-- /.global-nav-bg -->
<?php }