-
Notifications
You must be signed in to change notification settings - Fork 0
/
header-mobile.php
391 lines (310 loc) · 13.7 KB
/
header-mobile.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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
<!DOCTYPE html>
<html <?php language_attributes(); ?> xmlns:fb="http://ogp.me/ns/fb#" id="mobile-forced">
<head>
<?php $desc = esc_html(wp_trim_words( $post->post_content , 40, '...' )); ?>
<meta charset="utf-8">
<title><?php wp_title(''); ?></title>
<meta name="description" content="<?php echo $desc; ?>">
<meta name="author" content="">
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0">
<meta name="twitter:widgets:csp" content="on">
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script>window.twttr = (function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0],
t = window.twttr || {};
if (d.getElementById(id)) return;
js = d.createElement(s);
js.id = id;
js.src = "https://platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js, fjs);
t._e = [];
t.ready = function(f) {
t._e.push(f);
};
return t;
}(document, "script", "twitter-wjs"));</script>
<?php
global $post;
#}code used for throttling of submitted content...
$current_user = wp_get_current_user();
if ( 0 == $current_user->ID ) {
// Not logged in.
} else {
$ehacklast = get_user_meta($current_user->ID, 'ehacklast', true);
$ehacksince = time() - $ehacklast;
echo '<script>var ehacklast = ' . $ehacksince . '</script>';
} ?>
<meta property="og:title" content="<?php wp_title(); ?>"/>
<meta property="og:site_name" content="<?php echo get_bloginfo( 'name' ); ?>"/>
<meta property="og:description" content="<?php echo $desc; ?>"/>
<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'large' ); ?>
<meta property="og:image" content="<?php echo $image[0]; ?>"/>
<?php
if ( ! isset( $content_width ) ) $content_width = 900;
wp_head();
?>
<style>
.ph-nav-center a .active, .ph-nav-center a:hover, {
color: <?php echo of_get_option('ph_main_color'); ?>;
}
.newsletter-box input[type=submit],.ph-layout-2-body .mailchimp-sub .newsletter-box .subscribeButton {
background: <?php echo of_get_option('ph_main_color'); ?>;
}
.hunt-row .none .score{
color: <?php echo of_get_option('ph_novote'); ?> !important;
}
.ph-layout-2-body .mailchimp-sub .newsletter-box .subscribeButton{
border: 1px solid <?php echo of_get_option('ph_main_color'); ?>
}
.post-submission--form-media-section .media-item, .ph-layout-2-body{
background-color: <?php echo of_get_option('ph_secondary_color'); ?>;
border: 1px solid <?php echo of_get_option('ph_secondary_color'); ?>;
}
.modal-post-submission--header.ph-newsubmit, .ph-newsubmit .modal-post-submission--header {
background: <?php echo of_get_option('ph_newpost_header'); ?>;
}
#post-submission input[type=submit] {
background: <?php echo of_get_option('ph_newpost_header'); ?>;
}
.none .fa{
color: <?php echo of_get_option('ph_novote'); ?>;
}
.post-header .get-it {
background: <?php echo of_get_option('ph_main_color'); ?>;
}
.media-placeholder a:hover, .single-post .upmod {
color: <?php echo of_get_option('ph_main_color'); ?>;
text-decoration: underline;
}
.site--header{
background: <?php echo of_get_option('ph_menu_color'); ?>;
}
.none .score{
color: <?php echo of_get_option('ph_novote'); ?>;
}
.m-active{color:<?php echo of_get_option('ph_newpost_header'); ?> !important;}
.m-active-g{color:<?php echo of_get_option('ph_discuss_header'); ?> !important;}
.nogrid .ph-layout-2 .blue {
background: <?php echo of_get_option('ph_main_color'); ?>;
color: white;
border: 1px solid <?php echo of_get_option('ph_main_color'); ?>;
}
.nogrid .ph-layout-2 .blue .fa {
color: <?php echo of_get_option('ph_vote'); ?>;;
}
.nogrid .ph-layout-2 .blue .score {
color: <?php echo of_get_option('ph_vote'); ?>;
}
</style>
<?php
if(!wp_is_mobile()){
echo '<style>' . of_get_option('ph_custom_css') .'</style>';
}else{
echo '<style>' . of_get_option('ph_mobile_custom_css') .'</style>';
}
?>
<script>
<?php
$ph_ga = of_get_option('ph_ga');
echo $ph_ga;
?>
</script>
</head>
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '427029257462972',
xfbml : true,
version : 'v2.0'
});
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<body <?php
if (!isset($class)) $class = '';
body_class( $class ); ?>>
<div id='wrapper'>
<ul class='mobile-top-menu'>
<?php wp_list_categories( array(
'orderby' => 'name',
'show_count' => false,
'use_desc_for_title' => false,
'title_li' => ''
) ); ?>
</ul>
<div class='mob-three-dots'>
<i class="fa fa-ellipsis-h" aria-hidden="true"></i>
<?php wp_nav_menu( array( 'container' => '','container_class' => '','theme_location' => 'mobiled','menu_class' => 'nav navbar-nav navbar-right','walker' => new Bootstrap_Walker()) ); ?>
</div>
<div style='clear:both'></div>
<!-- new post modal -->
<?php // } ?>
</div>
<div class='modal-overlay-lightbox'>
<a class="modal--close-lb <?php echo $mc; ?>" href="#" title="Close">
<span>
<svg width="12" height="12" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">
<path d="M6 4.586l4.24-4.24c.395-.395 1.026-.392 1.416-.002.393.393.39 1.024 0 1.415L7.413 6l4.24 4.24c.395.395.392 1.026.002 1.416-.393.393-1.024.39-1.415 0L6 7.413l-4.24 4.24c-.395.395-1.026.392-1.416.002-.393-.393-.39-1.024 0-1.415L4.587 6 .347 1.76C-.05 1.364-.048.733.342.343c.393-.393 1.024-.39 1.415 0L6 4.587z" fill-rule="evenodd"></path>
</svg>
</span>
</a>
<div class='ph-lb-post-image'></div>
<div class="ph-lb-nav"><div class="v-left-lb"><span><svg width="26" height="46" viewBox="0 0 26 46" xmlns="http://www.w3.org/2000/svg"><path d="M24 2L3 23l21 21" stroke-width="4" fill="none"></path></svg></span></div><div class="lb-mid"><span id='lb-num'>1</span><span> <?php _e('of','pluginhunt');?> </span><span id='lb-tot'></span></div><div class="v-right-lb"><span><svg width="26" height="46" viewBox="0 0 26 46" xmlns="http://www.w3.org/2000/svg"><path d="M2 2l21 21L2 44" stroke-width="4" fill="none"></path></svg></span></div></div>
</div>
<!-- new post modal -->
<div class="modal-overlay-new">
<?php if(wp_is_mobile()){ $mc = 'v-mobile'; }else{ $mc = 'v-desktop'; } ?>
<a class="modal--close-new <?php echo $mc; ?>" href="#" title="Close">
<span>
<svg width="12" height="12" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">
<path d="M6 4.586l4.24-4.24c.395-.395 1.026-.392 1.416-.002.393.393.39 1.024 0 1.415L7.413 6l4.24 4.24c.395.395.392 1.026.002 1.416-.393.393-1.024.39-1.415 0L6 7.413l-4.24 4.24c-.395.395-1.026.392-1.416.002-.393-.393-.39-1.024 0-1.415L4.587 6 .347 1.76C-.05 1.364-.048.733.342.343c.393-.393 1.024-.39 1.415 0L6 4.587z" fill-rule="evenodd"></path>
</svg>
</span>
</a>
<div class="new-post-modal">
<div class='modal-loading'>
<i class="fa fa-spinner fa-spin"></i>
</div>
<div class="new-modal-container">
<!-- new post form -->
<?php if(current_user_can( 'edit_posts' )){
if(of_get_option('ph_full_content') == 0) {
$full = 'post-submission-full';
}else{
$full = '';
}
?>
<form class="post-submission <?php echo $full; ?>" id="post-submission">
<header class="modal-post-submission--header ph-newsubmit">
<div class='new-post-info'>
<h1><span><?php echo of_get_option('ph_newpost_title','Found something?'); ?></h1>
<h2><?php echo of_get_option('ph_newpost_subtitle','Hunt it'); ?></h2>
</div>
<div class='new-discuss-info hide'>
<h1><span><?php echo of_get_option('ph_newdis_title','Want to talk?'); ?></h1>
<h2><?php echo of_get_option('ph_newdis_subtitle','Discuss it'); ?></h2>
</div>
<div class='new-woo-info hide'>
<h1><span><?php echo of_get_option('ph_newwoo_title','Got something to sell?'); ?></h1>
<h2><?php echo of_get_option('ph_newwoo_subtitle','Sell it'); ?></h2>
</div>
</header>
<input name='ph-post-or-dis' id='ph-post-or-dis' type='hidden' value=1/>
<div class="post-type-choice">
<?php
if(of_get_option('ph_enable_discussions') == 1){
do_action('ph_post_type_choice');
}
?>
</div>
<div class="post-submission--body">
<?php do_action('ph_form_extras'); ?>
<div class="alert alert-warning alert-dismissible hide" role="alert" id='form-alert'>
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
<strong><?php _e('Warning','pluginhunt'); ?></strong> <?php _e('You have not filled in the form correctly','pluginhunt'); ?>
</div>
<?php
if(of_get_option('ph_type_drop') == 1){
ph_type();
}
?>
<?php ph_category(); ?>
<?php ph_product_title(); ?>
<?php ph_discuss_title(); ?>
<?php ph_woo_form(); ?>
<?php ph_product_link(); ?>
<?php
if( of_get_option('ph_full_content') == 1) {
ph_product_excerpt();
}else{
ph_product_content();
}
ph_dis_content();
?>
<div class="post-submission--form-media-section post-submission--form-row">
<label class="form--label" for="media_url">
<span class="form--label-icon">
<svg width="16" height="14" viewBox="0 0 16 14" xmlns="http://www.w3.org/2000/svg"><path d="M14 1.167c0 .397.373.833 1 .833H1c.627 0 1-.436 1-.833v11.666C2 12.436 1.627 12 1 12h14c-.627 0-1 .436-1 .833V1.167zm2 0v11.666c0 .645-.448 1.167-1 1.167H1c-.552 0-1-.522-1-1.167V1.167C0 .522.448 0 1 0h14c.552 0 1 .522 1 1.167zM4 10l2.246-3.935 5.915 3.84L4 10zm6-5c0 .552.448 1 1 1s1-.448 1-1-.448-1-1-1-1 .448-1 1z" fill="#BBB" fill-rule="evenodd"></path>
</svg>
</span>
<span><?php _e('Media','pluginhunt');?></span>
</label>
<div class="post-submission--form-field-group">
<div class="form--field">
<input class="form--input" name="media_url" placeholder="<?php _e("Paste a direct link to an image or a YouTube video","pluginhunt");?>" type="text" id="media_url">
<div>
<a class="trigger-upload" href="#" id="_unique_name_button" data-pid='1'>+ <?php _e('Upload an image','pluginhunt');?></a><input accept="image/gif, image/jpeg, image/png" class="uploader" type="file">
<span class='invalid'><span>
</div>
</div>
<div class="media-items"></div>
</div>
</div>
<?php
if(of_get_option('ph_type_avail') == 1){
ph_availability();
}
?>
</div>
<div class="post-submission--footer"><input class="button ph-newsubmit-button" type="submit" value="<?php echo of_get_option('ph_newpost_cta'); ?>" data-reactid=".4.3.0"></div>
</form>
<?php }else{ ?>
<header class="modal--header">
<h1 class="modal--header--title"><?php _e('Posting on ','pluginhunt');?><?php echo get_bloginfo( 'name' ); ?></h1>
<p class="modal--header--description"><?php _e('An invite is needed to submit content','pluginhunt');?></p>
</header>
<div class="p-new-post">
<p class="s-p">
<?php echo of_get_option('ph_lockout'); ?>
</p>
<p class="s-p"><a href="<?php echo of_get_option('ph_faq');?>"><?php _e('Learn more about invites','pluginhunt');?></a></p>
</div>
<?php } ?>
<!-- end new post form -->
</div>
</div>
</div>
<!-- post modal -->
<div class="modal-overlay">
<a class="modal--close <?php echo $mc; ?>" href="javascript:;" title="Close">
<span>
<svg width="12" height="12" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">
<path d="M6 4.586l4.24-4.24c.395-.395 1.026-.392 1.416-.002.393.393.39 1.024 0 1.415L7.413 6l4.24 4.24c.395.395.392 1.026.002 1.416-.393.393-1.024.39-1.415 0L6 7.413l-4.24 4.24c-.395.395-1.026.392-1.416.002-.393-.393-.39-1.024 0-1.415L4.587 6 .347 1.76C-.05 1.364-.048.733.342.343c.393-.393 1.024-.39 1.415 0L6 4.587z" fill-rule="evenodd"></path>
</svg>
</span>
</a>
<div class="post-detail--navigation hide">
<button class="post-detail--navigation--button" data-action="open-modal" data-href="/tech/ultimate-startup-decision-maker" >
<span>
<svg width="7" height="11" viewBox="0 0 7 11" xmlns="http://www.w3.org/2000/svg">
<path d="M.256 5.498c0-.255.098-.51.292-.703L4.795.548C5.18.163 5.817.16 6.207.55c.393.393.392 1.023.002 1.412L2.67 5.5l3.54 3.538c.384.384.388 1.02-.003 1.412-.393.393-1.023.39-1.412.002L.548 6.205c-.192-.192-.29-.447-.29-.702z" fill="#948B88" fill-rule="evenodd"></path>
</svg>
</span>
</button>
<button class="post-detail--navigation--button" data-action="open-modal" data-modal-replace="true" title="Ultimate Startup Decision Maker">
<span data-reactid=".6.1.1.0">
<svg width="7" height="11" viewBox="0 0 7 11" xmlns="http://www.w3.org/2000/svg">
<path d="M6.744 5.502c0 .255-.098.51-.292.703l-4.247 4.247c-.385.385-1.022.388-1.412-.002C.4 10.057.4 9.427.79 9.038L4.33 5.5.79 1.962C.407 1.578.403.942.794.55 1.186.157 1.816.16 2.204.548l4.248 4.247c.192.192.29.447.29.702z" fill="#948B88" fill-rule="evenodd"></path>
</svg>
</span>
</button>
</div>
<div class="show-post-modal">
<div class='modal-loading'>
<i class="fa fa-spinner fa-spin"></i>
</div>
<div class="modal-container"></div>
</div>
</div>
</div>
<a id="ph-log-social-new" href="#animatedModal" style="display:none">.</a>