/
header.php
137 lines (132 loc) · 6.12 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
<meta name="msapplication-tap-highlight" content="no">
<?php wp_head(); ?>
<?php if(get_theme_mod('sc_analytics')) : ?>
<?php echo get_theme_mod('sc_analytics'); ?>
<?php endif; ?>
<style>
header.global, header.global nav ul.sf-header li ul, footer.global, div.global-notice, article.sticky div.inner:before,
div.navigation-tabs div.item-list-tabs ul li a span, div.loader, input#send, input#profile-group-edit-submit, input#signup_submit,
form.standard-form input.submit, input.submit, form.standard-form div#previous-next input#group-creation-create, form.standard-form div#previous-next input#group-creation-next,
form.standard-form div#previous-next input#group-creation-finish, a.avatar-crop-submit, form.standard-form div.prev-next input#group-creation-finish, form.standard-form input#save, form.standard-form input#delete-group-button {
background: <?php echo get_theme_mod('sf_primary_colour'); ?>
}
input:focus, select:focus, textarea:focus {
border: 1px solid <?php echo get_theme_mod('sf_primary_colour'); ?> !important;
}
a, li.title {
color: <?php echo get_theme_mod('sf_primary_colour'); ?>;
}
main button, p.form-submit input {
background: <?php echo get_theme_mod('sf_primary_colour'); ?>;
border: none !important;
}
div.responsive-container, div.search-container {
background: <?php echo get_theme_mod('sf_primary_colour'); ?>;
}
::-webkit-selection {
background: <?php echo get_theme_mod('sf_primary_colour'); ?>;
color: #FFF;
}
::-moz-selection {
background: <?php echo get_theme_mod('sf_primary_colour'); ?>;
color: #FFF;
}
::selection {
background: <?php echo get_theme_mod('sf_primary_colour'); ?>;
color: #FFF;
}
form.activity-post-form div.bpfb_actions_container div.bpfb_action_container input#bpfb_submit,
form.activity-post-form div.bpfb_actions_container div.bpfb_controls_container input#bpfb_remote_image_preview,
form.activity-post-form div.bpfb_actions_container div.bpfb_controls_container input#bpfb_video_url_preview,
form.activity-post-form div.bpfb_actions_container div.bpfb_controls_container input#bpfb_link_url_preview {
background: <?php echo get_theme_mod('sf_primary_colour'); ?>;
}
<?php if(get_theme_mod('sf_sticky_header')) : ?>
html body {
padding-top: 90px;
}
header.global {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 10;
}
@media screen and (max-width: 900px) {
html body {
padding-top: 0;
}
header.global {
position: relative;
top: auto;
left: auto;
right: auto;
}
}
<?php endif; ?>
</style>
</head>
<body <?php body_class(); ?>>
<div class="canvas">
<header class="global">
<nav>
<h1><a href="<?php echo home_url('/'); ?>"><img src="<?php echo get_theme_mod('sf_logo'); ?>" alt="<?php echo get_bloginfo('name'); ?>"></a></h1>
<ul class="sf-header">
<?php
if(has_nav_menu('sf-header')) :
$defaults = array(
'theme_location' => 'sf-header',
'container' => false,
'items_wrap' => '%3$s',
'walker' => new Nfr_Menu_Walker()
);
wp_nav_menu($defaults);
endif;
?>
<li class="search">
<button class="toggle"><span></span></button>
<?php get_search_form(); ?>
</li>
<?php if(is_user_logged_in()) : ?>
<?php if(bp_is_active('messages')) : ?>
<li class="nv-msg-notify">
<a href="<?php echo bp_loggedin_user_domain(); ?>messages"><?php if(bp_get_total_unread_messages_count()) : ?><span><?php bp_total_unread_messages_count(); ?></span><?php endif; ?></a>
</li>
<?php endif; ?>
<li class="nv-account">
<?php if(bp_is_active('notifications')) : ?>
<a class="notifications" href="<?php echo bp_loggedin_user_domain(); ?>notifications" title="Unread Notifications"><?php if(bp_notifications_get_unread_notification_count(bp_loggedin_user_id())) : ?><span><?php echo bp_notifications_get_unread_notification_count(bp_loggedin_user_id()); ?></span><?php endif; ?></a>
<?php endif; ?>
<a href="<?php echo bp_loggedin_user_domain(); ?>">
<?php bp_loggedin_user_avatar('width=60&height=60'); ?>
<span class="tx"><?php echo bp_core_get_user_displayname(bp_loggedin_user_id()); ?></span>
<span class="toggle"></span>
</a>
<?php get_sidebar('account-dropdown'); ?>
</li>
<?php else : ?>
<li class="nv-register"><a href="<?php echo home_url('/register'); ?>">Register</a></li>
<li class="nv-login"><a href="<?php echo wp_login_url('/'); ?>">Login</a></li>
<?php endif; ?>
<li class="nv-pages">
<button><span>Toggle Pages Menu</span></button>
</li>
</ul>
<?php get_sidebar('pages'); ?>
<?php if(is_user_logged_in()) : ?>
<?php get_sidebar('account'); ?>
<?php endif; ?>
</nav>
</header>
<main>
<?php if(get_theme_mod('sf_notice')) : ?>
<div class="global-notice">
<p><?php echo get_theme_mod('sf_notice'); ?></p>
</div>
<?php endif; ?>
<div class="content">