forked from wpcampus/wpcampus-wp-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
146 lines (129 loc) · 5.86 KB
/
header.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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<?php
$blog_url = get_bloginfo( 'url' );
$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(); ?>>
<a href="#wpcampus-main" id="skip-to-content"><?php _e( 'Skip to Content', 'wpcampus' ); ?></a>
<div id="wpcampus-banner">
<div class="toggle-main-menu">
<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>
</div>
<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="<?php echo $blog_url; ?>"><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,
));
?>
<ul class="icons social-media">
<li class="icon twitter"><a href="https://twitter.com/wpcampusorg"><img src="<?php echo $images_dir; ?>twitter-white.svg" alt="<?php printf( esc_attr__( 'Follow %1$s on %2$s', 'wpcampus' ), 'WPCampus', 'Twitter' ); ?>" /></a></li>
<li class="icon facebook"><a href="https://www.facebook.com/wpcampus"><img src="<?php echo $images_dir; ?>facebook-white.svg" alt="<?php printf( esc_attr__( 'Follow %1$s on %2$s', 'wpcampus' ), 'WPCampus', 'Facebook' ); ?>" /></a></li>
<li class="icon youtube"><a href="https://www.youtube.com/wpcampusorg"><img src="<?php echo $images_dir; ?>youtube-white.svg" alt="<?php printf( esc_attr__( 'Follow %1$s on %2$s', 'wpcampus' ), 'WPCampus', 'YouTube' ); ?>" /></a></li>
<li class="icon github"><a href="https://github.com/wpcampus/"><img src="<?php echo $images_dir; ?>github-white.svg" alt="<?php printf( esc_attr__( 'Follow %1$s on %2$s', 'wpcampus' ), 'WPCampus', 'GitHub' ); ?>" /></a></li>
</ul>
</div> <!-- #wpcampus-main-menu -->
</div> <!-- #wpcampus-banner -->
<div id="wpcampus-hero">
<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="<?php echo $blog_url; ?>">
<span class="screen-reader-text">WPCampus</span>
<img src="<?php echo $images_dir; ?>wpcampus-white.svg" alt="" />
<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;
// Create buttons.
$get_involved_button = '<a href="/get-involved/" class="button royal-blue">' . __( 'Get Involved', 'wpcampus' ) . '</a>';
$member_survey_button = '<a href="/member-survey/" class="button royal-blue">' . __( 'Member Survey', 'wpcampus' ) . '</a>';
//$ed_survey_button = '<a href="https://2017.wpcampus.org/announcements/wordpress-in-education-survey/" class="button royal-blue">' . sprintf( __( '%s in Education Survey', 'wpcampus' ), 'WP' ) . '</a>';
//$wpc_online_button = '<a href="https://online.wpcampus.org/watch/" class="button royal-blue">' . sprintf( __( 'Watch %s Online', 'wpcampus' ), 'WPCampus' ) . '</a>';
$wpc_2017_button = '<a href="https://2017.wpcampus.org/" class="button royal-blue">' . sprintf( __( '%s 2017 Conference', 'wpcampus' ), 'WPCampus' ) . '</a>';
// Print buttons.
if ( is_page( 'get-involved' ) ) {
echo "{$member_survey_button} {$wpc_2017_button}";
} else {
echo "{$get_involved_button}{$wpc_2017_button}";
}
?>
</div><!-- .wpcampus-header -->
</div>
</div>
</div>
<?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>*/
?>
<div id="wpc-notifications"></div>
<script id="wpc-notification-template" type="x-tmpl-mustache">
{{#.}}
<div class="wpc-notification">
<div class="wpc-notification-message">
{{{content.rendered}}}
</div>
</div>
{{/.}}
</script>
<?php
if ( ! $is_front_page ) :
?>
<div id="wpcampus-main-page-title">
<div class="inside">
<h1><?php
/*
* Print page title.
*/
if ( is_404() ) {
echo 'Page Not Found';
} else {
echo apply_filters( 'wpcampus_page_title', get_the_title() );
}
?></h1>
<?php
// If article, include article meta.
if ( is_singular( array( 'post', 'podcast', 'video' ) ) ) {
wpcampus_print_article_meta();
}
// Include breadcrumbs.
wpcampus_print_breadcrumbs();
?>
</div>
</div>
<?php
endif;
?>
<div id="wpcampus-main">
<div class="row">
<div id="wpcampus-content" class="small-12 columns">