This repository has been archived by the owner on May 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathheader-minimal.php
132 lines (112 loc) · 3.87 KB
/
header-minimal.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<?php
$stylesheet_dir = get_stylesheet_directory_uri();
$images_dir = "{$stylesheet_dir}/assets/images/";
$is_front_page = is_front_page();
$is_events_page = is_post_type_archive( 'tribe_events' ) || is_singular( 'tribe_events' );
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js">
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php wp_title( '-', true, 'left' ); ?></title>
<?php wp_head(); ?>
</head>
<body <?php body_class( 'header-minimal' ); ?>>
<?php
// Print network banner.
if ( function_exists( 'wpcampus_print_network_banner' ) ) {
wpcampus_print_network_banner( array(
'skip_nav_id' => 'wpcampus-main',
));
}
?>
<nav id="wpcampus-banner" aria-label="<?php esc_attr_e( 'Primary', 'wpcampus' ); ?>">
<button class="wpc-toggle-menu" data-toggle="wpcampus-banner" aria-label="<?php _e( 'Toggle menu', 'wpcampus' ); ?>">
<div class="toggle-icon">
<div class="bar one"></div>
<div class="bar two"></div>
<div class="bar three"></div>
</div>
<div class="open-menu-label"><?php _e( 'Menu', 'wpcampus' ); ?></div>
<div class="close-menu-label"><?php _e( 'Close', 'wpcampus' ); ?></div>
</button>
<div id="wpcampus-main-menu" class="menu">
<ul class="icons">
<li class="icon has-icon-alt home<?php echo $is_front_page ? ' current' : null; ?>"><a href="/"><img src="<?php echo $images_dir; ?>home-white.svg" alt="<?php printf( esc_attr__( 'Visit the %s home page', 'wpcampus' ), 'WPCampus' ); ?>" /><span class="icon-alt"><?php _e( 'Home', 'wpcampus' ); ?></span></a></li>
</ul>
<?php
// Print the header menu.
wp_nav_menu( array(
'theme_location' => 'primary',
'container' => false,
'menu_class' => false,
));
?>
</div>
</nav> <!-- #wpcampus-banner -->
<aside id="wpcampus-hero" aria-label="<?php esc_attr_e( 'Our logo', 'wpcampus' ); ?>">
<div class="row">
<div class="small-12 columns">
<div class="wpcampus-header">
<?php
// If home, add a <h1>.
echo $is_front_page ? '<h1>' : null;
?>
<a class="wpcampus-logo" href="/">
<img src="<?php echo $images_dir; ?>wpcampus-white.svg" alt="" />
<span class="screen-reader-text">WPCampus</span>
<span class="wpcampus-tagline"><?php printf( __( 'Where %s Meets Higher Education', 'wpcampus' ), 'WordPress' ); ?></span>
</a>
<?php
// If home, close the <h1>.
echo $is_front_page ? '</h1>' : null;
?>
</div><!-- .wpcampus-header -->
</div>
</div>
</aside>
<main id="wpcampus-main">
<?php
/*<div id="wpc-online-details">
<div class="row">
<div class="small-12 columns centered">
<p><strong>The WPCampus 2017 <a href="https://2017.wpcampus.org/call-for-speakers/">call for speakers</a> has been extended until March 29, 2017.</strong><br />Share your WordPress and higher ed knowledge with our community. <a class="wpc-details-action" href="https://2017.wpcampus.org/call-for-speakers/"><strong>Apply to speak at WPCampus 2017</strong></a></p>
</div>
</div>
</div>*/
if ( ! $is_front_page ) :
?>
<div id="wpcampus-main-page-title">
<div class="inside">
<?php
do_action( 'wpcampus_before_page_title' );
?>
<h1><?php
// Print page title.
if ( is_404() ) {
echo 'Page Not Found';
} else {
echo apply_filters( 'wpcampus_page_title', get_the_title() );
}
?></h1>
<?php
do_action( 'wpcampus_after_page_title' );
// If article, include article meta.
if ( is_singular( array( 'post', 'podcast', 'video' ) ) ) {
wpcampus_print_article_meta();
}
// Include breadcrumbs.
if ( apply_filters( 'wpcampus_print_breadcrumbs', true ) ) {
wpcampus_print_breadcrumbs();
}
?>
</div>
</div>
<?php
endif;
?>
<div id="wpcampus-content">
<div class="row">
<div class="small-12 columns">