/
header.php
executable file
·129 lines (82 loc) · 3.72 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
<!DOCTYPE html>
<html class="no-js" <?php language_attributes(); ?>>
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" >
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div class="mobile-navigation">
<ul class="mobile-menu">
<?php
if ( has_nav_menu( 'primary' ) ) {
$nav_args = array(
'container' => '',
'items_wrap' => '%3$s',
'theme_location' => 'primary'
);
wp_nav_menu( $nav_args );
} else {
echo splot_default_menu();
}
?>
</ul>
</div><!-- .mobile-navigation -->
<div class="sidebar">
<?php if ( get_theme_mod( 'fukasawa_logo' ) ) : ?>
<a class="blog-logo" href='<?php echo esc_url( home_url( '/' ) ); ?>' title='<?php echo esc_attr( get_bloginfo( 'title' ) ); ?> — <?php echo esc_attr( get_bloginfo( 'description' ) ); ?>' rel='home'>
<img src='<?php echo esc_url( get_theme_mod( 'fukasawa_logo' ) ); ?>' alt='<?php echo esc_attr( get_bloginfo( 'title' ) ); ?>'>
</a>
<?php elseif ( get_bloginfo( 'description' ) || get_bloginfo( 'title' ) ) :
// h1 on singular, h2 elsewhere
$title_type = is_singular() ? 'h2' : 'h1'; ?>
<<?php echo $title_type; ?> class="blog-title">
<a href="<?php echo esc_url( home_url() ); ?>" title="<?php echo esc_attr( get_bloginfo( 'title' ) ); ?> — <?php echo esc_attr( get_bloginfo( 'description' ) ); ?>" rel="home"><?php echo esc_attr( get_bloginfo( 'title' ) ); ?></a>
</<?php echo $title_type; ?>>
<div class="siteblurb"><?php echo esc_attr( get_bloginfo( 'description' ) ); ?></div>
<?php endif; ?>
<div class="siteblurb"><strong><?php $item_count = wp_count_posts()->publish; echo $item_count ?></strong> total <?php
if ( $item_count == 1 ) {
trucollector_collection_single_item();
} else {
trucollector_collection_plural_item();
}?> collected</div>
<button type="button" class="nav-toggle hidden" title="<?php _e( 'Click to view the navigation', 'fukasawa' ); ?>">
<div class="bars">
<div class="bar"></div>
<div class="bar"></div>
<div class="bar"></div>
</div>
<p>
<span class="menu"><?php _e( 'Menu', 'fukasawa' ); ?></span>
<span class="close"><?php _e( 'Close', 'fukasawa' ); ?></span>
</p>
</button>
<ul class="main-menu">
<?php
if ( has_nav_menu( 'primary' ) ) {
wp_nav_menu( $nav_args );
// test uf primary menu location is not set
} elseif ( !splot_is_menu_location_used() ) {
echo splot_default_menu();
// normal make menus from pages
} else {
wp_list_pages( $list_pages_args );
}
?>
</ul>
<?php if ( is_active_sidebar( 'sidebar' ) ) : ?>
<div class="widgets">
<?php dynamic_sidebar( 'sidebar' ); ?>
</div>
<?php endif; ?>
<div class="credits">
<p>A <a href="http://splot.ca/">SPLOT</a> on the Web: <a href="<?php echo esc_url( site_url( '/' ) ); ?>"><?php bloginfo('name'); ?></a>.</p>
<p><?php _e('Blame','fukasawa'); ?> <a href="http://cogdog.info">cogdog</a> for the <a href="https://github.com/cogdog/tru-collector">TRU Collector Theme</a>, <?php _e('based on Fukasawa by ','fukasawa'); ?> <a href="http://www.andersnoren.se">Anders Norén</a>.</p>
<p>
<?php splot_the_author();?>
</p>
</div>
<div class="clear"></div>
</div><!-- .sidebar -->
<div class="wrapper" id="wrapper">