forked from elsplatto/hcf-btw
/
index.php
484 lines (418 loc) · 20.2 KB
/
index.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
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
<?php
$pageHeading = "Home";
$pageMetaTitle = "Beyond the Wharf - Sydney Harbour, Sydney Activities, Sydney Ferries";
$pageSection = "home";
$pageMetaDesc = "Looking for great things to do in Sydney? Beyond the Wharf provides local and international insights to Sydney Harbour. ";
$pageMetaKeywords = "Sydney, harbour, experience, activities, events, share, contribute, locals, international, travel";
/*global includes in head.php*/
include 'includes/head.php';
?>
<body>
<?php
include 'includes/nav.php';
?>
<section id="featureImgHolder" class="homepage featureImgHolder standardDarkGrey">
<?php
if ($deviceType != 'phone')
{
?>
<ul id="featureImageCarousel" data-orbit data-options="animation: slide;timer_speed: 15000; swipe: true;
pause_on_hover: false;
animation_speed: 500;
navigation_arrows: true;
bullets: false;
slide_number: false;">
<li>
<img src="img/featureImages/tracey-hero.jpg" data-directive="Read more" data-latlng="33 48 46 S, 151 16 22 E" data-place="Dobroyd Heads" data-route="Manly" data-class="manly" data-credit="Andrew McLean" />
<div class="headerText">
<div class="inner text-left">
<h2 class="sub">Discover</h2><br />
<h2>Ancestral Spirit</h2><br />
<h3>Discover. Share. Experience.</h3><br />
<a href="<?=$baseURL?>/page/aboriginal-harbour-journeys" class="button block med verboten">Read More</a>
</div>
</div>
</li>
</ul>
<?php
}
else
{
?>
<ul id="featureImageCarousel" data-orbit data-options="animation: slide;timer_speed: 15000; swipe: true; timer: false;
pause_on_hover: false;
animation_speed: 500;
navigation_arrows: true;
bullets: false;
slide_number: false;">
<li>
<img src="img/featureImages/phone/tracey-hero.jpg" data-url="#" data-directive="Read more" data-latlng="33 48 46 S, 151 16 22 E" data-place="Dobroyd Heads" data-route="Manly" data-class="manly" data-credit="Andrew McLean" />
<div class="headerText">
<div class="inner text-center">
<h2 class="sub">Secrets</h2><br />
<h2>Beyond the Wharf</h2><br />
<h3>Discover. Share. Experience.</h3><br />
<a href="<?=$baseURL?>/page/aboriginal-harbour-journeys" class="button block med verboten">Read More</a>
</div>
</div>
</li>
</ul>
<?php
}
?>
<!--div class="headerHolder">
<h2 class="sub">Secrets</h2>
<h2>Beyond the Wharf</h2>
<hr />
<h3>Discover. Share. Experience.</h3>
</div-->
<a href="#" id="creditToggle" data-target="featureCreditPanel" class="triggerContainer" title="Click here for photo credits">
<div class="flip-container">
<div class="flipper">
<div class="cameraIcon"></div>
<div class="closeIcon"></div>
</div>
</div>
</a>
<div id="featureCreditPanel" class="creditPanel">
<span class="latLng">33 48 46 S, 151 16 22 E</span>
<span class="location">Doboyd Heads</span>
<span class="routes manly">Manly</span>
<span class="credit">Photo by Adrew McLeanr</span>
<!--span><a href="<?=$baseURL?>/vivid/gallery-pro">View details</a></span-->
</div>
<section class="promoHolder">
<div class="row">
<?php
if ($deviceType == 'phone')
{
?>
<div class="large-3 medium-3 small-12 promoTile columns<?=$deviceClass?>">
<div class="imgHolder">
<a href="<?=$baseURL?>/<?=$competitionURL?>&mode=competition&step=2&call_page=<?=$baseURL?>/?competitionId=1&competitionId=1" class="reveal-init" data-size="small" onClick="trackInternalLink('Homepage promo panel - mobile click', 'Competition 1 - Win Art Print'); return false;"><img src="img/promoImages/<?=$folder?>sm-silk.jpg" alt="Saltmotion image of wave - by Joel Coleman" /></a>
</div>
<div class="textHolder">
<span>Photo Competition</span>
<a href="<?=$baseURL?>/<?=$competitionURL?>&mode=competition&step=2&call_page=<?=$baseURL?>/?competitionId=1&competitionId=1" id="competitionPromo" class="reveal-init button verboten" data-size="small" onClick="trackInternalLink('Homepage promo panel - mobile click', 'ompetition 1 - Win Art Print'); return false;">Win This Art Print</a>
</div>
</div>
<div class="large-3 medium-3 small-12 promoTile columns<?=$deviceClass?>">
<div class="imgHolder">
<a href="<?=$baseURL?>/services/get-itinerary.php" class="panelFlyoutTrigger" data-location="1" data-target="promoFlyoutHolder" onclick="trackInternalLink('Itinerary (On Mobile from homepage) - click', 'Cheap eats on the waterfront'); return false;"><img src="img/promoImages/<?=$folder?>itinerary-cheap-eats.jpg" alt="Affordable meals on the waterfront" /></a>
</div>
<div class="textHolder">
<span>Itinerary</span>
<h5><a href="<?=$baseURL?>/services/get-itinerary.php" class="panelFlyoutTrigger" data-location="1" data-target="promoFlyoutHolder" onclick="trackInternalLink('Itinerary (On Mobile from homepage) - click', 'Cheap eats on the waterfront'); return false;">Cheap eats on the waterfront</a></h5>
</div>
</div>
<!--div class="large-3 medium-3 small-12 promoTile columns">
<div class="imgHolder">
<img src="img/promoImages/sm-silk.jpg" alt="Saltmotion image of wave - by Joel Coleman" />
</div>
<div class="textHolder">
<span>Photo Competition</span>
<a href="<?=$baseURL?>/<?=$competitionURL?>&mode=competition&step=2&call_page=<?=$baseURL?>/?competitionId=1&competitionId=1" id="competitionPromo" class="reveal-init button verboten" data-size="small" onClick="trackInternalLink('Homepage promo panel - click', 'Competition - Win Art Print'); return false;">Win This Art Print</a>
</div>
</div-->
<!--div class="large-3 medium-3 small-12 promoTile columns<?=$deviceClass?>">
<div class="imgHolder">
<a href="<?=$baseURL?>/vivid"><img src="img/promoImages/<?=$folder?>sydney-film-festival-2014.jpg" alt="Sydney Film Festival 2014." /></a>
</div>
<div class="textHolder">
<span>Events</span>
<h5><a href="#" class="panelFlyoutTrigger" data-location="140" data-target="promoFlyoutHolder" title="Sydney Film Festival" onclick="trackInternalLink('Homepage promo panel - mobile click', 'Sydney Film Festival'); return false;">Sydney Film Festival</a></h5>
</div>
</div-->
<!--div class="large-3 medium-3 small-12 tweetSlider">
<ul id="tweetList" data-orbit data-options="animation: slide; timer_speed: 10000;
pause_on_hover: false;
animation_speed: 500;
navigation_arrows: false;
bullets: false;
slide_number: false">
<li class="preloader"></li>
</ul>
</div-->
<?php
}
if ($deviceType != 'phone')
{
?>
<div class="large-3 medium-3 small-12 tweetSlider">
<ul id="tweetList" data-orbit data-options="animation: slide; timer_speed: 10000;
pause_on_hover: false;
animation_speed: 500;
navigation_arrows: false;
bullets: false;
slide_number: false">
<li class="preloader"></li>
</ul>
</div>
<div class="large-3 medium-3 small-12 promoTile columns">
<div class="imgHolder">
<img src="img/promoImages/sm-silk.jpg" alt="Saltmotion image of wave - by Joel Coleman" />
</div>
<div class="textHolder">
<span>Photo Competition</span>
<a href="<?=$baseURL?>/<?=$competitionURL?>&mode=competition&step=2&call_page=<?=$baseURL?>/?competitionId=1&competitionId=1" id="competitionPromo" class="reveal-init button verboten" data-size="small" onClick="trackInternalLink('Homepage promo panel - click', 'Competition - Win Art Print'); return false;">Win This Art Print</a>
</div>
</div>
<!--div class="large-3 medium-3 small-12 columns hide-for-small-only">
<div class="imgHolder">
<img src="img/promoImages/vivid_feature.jpg" alt="Image of Sydney Opera House during Vivid." />
</div>
<div class="textHolder">
<span>Events</span>
<h5><a href="<?=$baseURL?>/events">Vivid Sydney</a></h5>
</div>
</div-->
<div class="large-3 medium-3 small-12 columns hide-for-small-only">
<div class="imgHolder">
<img src="img/promoImages/itinerary-cheap-eats.jpg" alt="Affordable meals on the waterfront" />
</div>
<div class="textHolder">
<span>Itinerary</span>
<h5><a href="<?=$baseURL?>/services/get-itinerary.php" class="panelFlyoutTrigger" data-location="1" data-target="promoFlyoutHolder" onclick="trackInternalLink('Itinerary (from homepage) - click', 'Cheap eats on the waterfront'); return false;">Cheap eats on the waterfront</a></h5>
</div>
</div>
<!--div class="large-3 medium-3 small-12 columns hide-for-small-only">
<div class="imgHolder">
<img src="img/promoImages/promo3.jpg" alt="Image of Sydney Harbour from Watsons Bay" />
</div>
<div class="textHolder">
<span>Itinerary</span>
<h5><a href="<?=$baseURL?>/docs/beyondthewharf-family.pdf" target="_blank">Sunday - Family Day</a></h5>
</div>
</div-->
<div class="large-3 medium-3 small-12 columns hide-for-small-only">
<div class="imgHolder">
<img src="img/promoImages/naidoc-flag.jpg" alt="NAIDOC - Image of flag raising on ferry" />
</div>
<div class="textHolder">
<span>Video</span>
<h5><a href="<?=$baseURL?>/overlays/show-video.php?src=//player.vimeo.com/video/100477850" class="reveal-init" data-size="medium">Flag Raising Ceremony</a></h5>
</div>
</div>
<?php
}
?>
</div>
</section>
</section>
<section>
<div class="row marginBottomStandard">
<div class="large-12" id="promoFlyoutHolder">
</div>
</div>
</section>
<?php
if ($deviceType != 'phone')
{
?>
<section class="themeFeature">
<div class="row marginBottomStandard">
<div class="large-12 columns homeAddThisHolder">
<?php
include 'includes/addthis.php';
?>
</div>
<h3 class="text-center">Unlock Sydney's best kept local secrets with our iconic ferry service</h3>
<div class="large-12 columns">
<div class="large-6 medium-12 small-12 themedPromoText standardDarkGrey left">
<span>The Ancestral Spirit</span>
<h3 class="block">Discover Sydney’s Aboriginal Culture</h3>
<p>
Australia's Aboriginal culture dates back 60,000 years. Sydney Harbour played a large part and continues to do so today.
</p>
<a href="<?=$baseURL?>/page/child-at-heart" class="button wire white hide-for-large">Hear Tracey's Story</a>
<img src="img/themedPromos/profile-2.jpg" class="profile" alt="Picture of Tracey." />
<p>Tracey Keys</p>
<span class="purple">Harbour City Ferries - Crew Member</span>
</div>
<div class="large-6 hide-for-medium hide-for-small themedPromoImage">
<img src="img/themedPromos/crossing.jpg" alt="Picture of North Head - Sydney." />
<div class="large-6 medium-6 small-6 themedPromoOverlay">
<!--a href="#" class="button red play tungsten small">Watch the video</a-->
<a href="<?=$baseURL?>/page/aboriginal-harbour-journeys" class="button wire white">Hear Tracey's Story</a>
</div>
</div>
</div>
</div>
</section>
<section class="mapHolder standardLightGrey paddingTopBottom20">
<div class="row marginBottomStandard">
<h3 class="text-center">Find a Journey</h3>
<div class="large-12 columns" id="mapContainer">
<div class="large-12" id="map-canvas">
<div id="map-canvas-loader"></div>
</div>
<a href="#" id="toggleMapControlPanel" class="toggleControlPanel"></a>
<div id="mapControlPanelHolder" class="controlPanelHolder medium-6 small-6 large-3">
<div id="mapControlPanel" class="controlPanel">
<h6 class="white">FILTER:</h6>
<ul>
<?php
$filters = getFilters(1, $DB_SERVER, $DB_USERNAME, $DB_PASSWORD, $DB_DATABASE);
for ($i = 0; $i < count($filters); $i++)
{
?><li><a href="#" class="mapFilter" data-category="<?=$filters[$i]?>" data-visible="true"><?=$filters[$i]?></a></li><?php
}
?>
</ul>
</div>
</div>
</div>
</div>
</section>
<?php
}
?>
<a id="shotOfTheDay"></a>
<?php
include 'includes/instagram-shot-of-the-day.php';
include 'includes/footer.php';
?>
<?php
$pageId = 1;
include 'includes/global-js.php';
include 'includes/instagram-js.php';
if ($deviceType != 'phone')
{
include 'includes/map-code.php';
}
?>
<script src="js/foundation/foundation.orbit.js"></script>
<script>
$(function() {
<?if ($competitionId == 1)
{
?>
$('#competitionPromo').trigger('click');
<?php
}
?>
loadHomeImages();
fetchTweets();
/*$('#featureImageCarousel li').click(function(e) {
loadHomeImages();
});*/
$("#featureImageCarousel").on("after-slide-change.fndtn.orbit", function(event, orbit) {
var target = $('#featureImageCarousel li.active img');
var latlng = target.attr('data-latlng');
var place = target.attr('data-place');
var route = target.attr('data-route');
var routeClass = target.attr('data-class');
var credit = target.attr('data-credit');
var creditURL = target.attr('data-url');
var dataLocationID = target.attr('data-location');
var dataTarget = target.attr('data-target');
var dataLinkType = target.attr('data-linkType');
var creditDirective = target.attr('data-directive');
var creditHTML = '';
creditHTML += '<span class="latLng">'+latlng+'</span>';
creditHTML += '<span class="location">'+place+'</span>';
creditHTML += '<span class="routes '+routeClass+'">'+route+'</span>';
creditHTML += '<span class="credit">Photo by '+credit+'</span>';
if (dataLinkType == 'internal')
{
creditHTML += '<span><a href="'+creditURL+'" class="panelFlyoutTrigger" data-target="'+dataTarget+'" data-location="'+dataLocationID+'">'+creditDirective+'</a></span>';
}
else
{
creditHTML += '<span><a href="'+creditURL+'">'+creditDirective+'</a></span>';
}
$('#featureCreditPanel').html(creditHTML);
$('#featureImgHolder').removeAttr('style');
});
function loadHomeImages()
{
<?php
if ($deviceType != 'phone')
{
echo 'var folder = \'\'';
}
else
{
echo 'var folder = \'phone/\'';
}
?>
var imgHTML = '';
imgHTML += '<li>';
imgHTML += '<img src="img/featureImages/'+folder+'vivid-sydney-light-play2.jpg" data-url="#" data-linkType="internal" data-location="136" data-target="mapContainer" data-directive="View details" data-latlng="33 48 2.3652 S, 151 17 54.1998 E" data-place="Shelly Beach" data-route="Manly" data-class="manly" data-credit="Andy Richards, Understand Down Under" />';
imgHTML += '<div class="headerText">';
imgHTML += '<div class="inner text-left">';
imgHTML += '<h2 class="sub">Secrets of Sydney Harbour</h2><br />';
imgHTML += '<h2>Beyond the Wharf</h2><br />';
//imgHTML += '<hr />';
imgHTML += '<h3>Discover. Share. Experience.</h3>';
imgHTML += '</div>';
imgHTML += '</div>';
imgHTML += '</li>';
imgHTML += '<li>';
imgHTML += '<img src="img/featureImages/'+folder+'vivid-sydney-boats.jpg" data-url="#" data-linkType="internal" data-location="136" data-directive="View more" data-latlng="33 50 47.67 S, 151 13 47.0856 E" data-place="Cremorne" data-route="Mosman Bay" data-class="mosman" data-credit="Andy Richards, Understand Down Under" />';
imgHTML += '<div class="headerText">';
imgHTML += '<div class="inner text-left">';
imgHTML += '<h2 class="sub">Vivid Sydney</h2><br />';
imgHTML += '<h2>Beyond the Wharf</h2><br />';
//imgHTML += '<hr />';
imgHTML += '<h3>Discover. Share. Experience.</h3><br />';
imgHTML += '<a href="<?=$baseURL?>/vivid/" class="button block med verboten">Read More</a>';
imgHTML += '</div>';
imgHTML += '</div>';
imgHTML += '</li>';
imgHTML += '<li>';
imgHTML += '<div class="headerText">';
imgHTML += '<div class="inner text-left">';
imgHTML += '<h2 class="sub">Unique Experiences</h2><br />';
imgHTML += '<h2>Beyond the Wharf</h2><br />';
//imgHTML += '<hr />';
imgHTML += '<h3>After Dark Tours</h3><br />';
imgHTML += '<a href="#" class="panelFlyoutTrigger button block med verboten" data-location="136" data-target="promoFlyoutHolder" onclick="trackInternalLink(\'Photo credit panel - click\', \'After dark tours\'); return false;">Find out more</a>';
imgHTML += '</div>';
imgHTML += '</div>';
imgHTML += '<img src="img/featureImages/'+folder+'vivid-sydney-light-play.jpg" data-url="#" data-linkType="internal" data-location="136" data-target="promoFlyoutHolder" data-directive="View details" data-latlng="33 48 2.3652 S, 151 17 54.1998 E" data-place="Shelly Beach" data-route="Manly" data-class="manly" data-credit="Andy Richards - Understand Down Under" />';
imgHTML += '</li>';
$(imgHTML).appendTo('#featureImageCarousel');
$('#featureImageCarousel').foundation('orbit');
}
function fetchTweets()
{
$('#tweetList').load('services/twitter-fetch-tweets.php', function() {
$('#tweetList').foundation('orbit');
twttr.widgets.load();
});
}
if ($('#creditToggle').length > 0)
{
$('#creditToggle').animate({
right: 0,
easing: 'easeOut'
}, 200);
}
$('body').on('click', '#creditToggle', function(e)
{
e.preventDefault();
var target = $('#'+$(this).attr('data-target'));
var targetLeft = target.offset().left;
var targetWidth = target.outerWidth();
var windowWidth = $(document).width();
if (targetLeft >= windowWidth)
{
target.animate({
left: windowWidth - targetWidth
});
$(this).addClass('flip');
}else{
target.animate({
left: windowWidth + targetWidth
});
$(this).removeClass('flip');
}
});
});
</script>
<?php
include 'includes/analytics.php';
?>
</body>
</html>