-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlistings.php
160 lines (140 loc) · 5.94 KB
/
listings.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>GoldGo</title>
<!-- Bootstrap -->
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/cover.css" rel="stylesheet">
<link href="css/slick.css" rel="stylesheet">
<link href="css/listings.css" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<script type="text/javascript" src="scripts/jquery.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAFs7b-BTdRvR3jlBEbvSuxvu3gOtZLsU8"></script>
</head>
<body>
<!--
We position the images fixed and therefore need to place them outside of #skrollr-body.
We will then use data-anchor-target to display the correct image matching the current section (.gap element).
-->
<div
class="parallax-image-wrapper parallax-image-wrapper-100"
data-anchor-target="#dragons + .gap"
data-bottom-top="transform:translate3d(0px, 200%, 0px)"
data-top-bottom="transform:translate3d(0px, 0%, 0px)">
<div
class="parallax-image parallax-image-100"
style="background-image:url(assets/testbg.jpg)"
data-anchor-target="#dragons + .gap"
data-bottom-top="transform: translate3d(0px, -100%, 0px);"
data-top-bottom="transform: translate3d(0px, 100%, 0px);"
id="main"
></div>
<!--the +/-80% translation can be adjusted to control the speed difference of the image-->
</div>
<div
class="parallax-image-wrapper parallax-image-wrapper-100"
data-anchor-target="#bacons + .gap"
data-bottom-top="transform:translate3d(0px, 200%, 0px)"
data-top-bottom="transform:translate3d(0px, 0%, 0px)">
<div
class="parallax-image parallax-image-100"
style="background-image:url(assets/testweather.jpg)"
data-anchor-target="#bacons + .gap"
data-bottom-top="transform: translate3d(0px, -80%, 0px);"
data-top-bottom="transform: translate3d(0px, 80%, 0px);"
id="weather"
></div>
</div>
<!-- <div
class="parallax-image-wrapper parallax-image-wrapper-100"
data-anchor-target="#kittens + .gap"
data-bottom-top="transform:translate3d(0px, 300%, 0px)"
data-top-bottom="transform:translate3d(0px, 0%, 0px)">
<div
class="parallax-image parallax-image-100"
style="background-image:url(assets/testbg.jpg)"
data-anchor-target="#kittens + .gap"
data-bottom-top="transform: translate3d(0px, -60%, 0px);"
data-top-bottom="transform: translate3d(0px, 60%, 0px);"
></div>
</div> -->
<div id="skrollr-body">
<div class="header" id="dragons">
<div class="events" id="carousel"><!-- CAROUSEL CONTAINER START -->
</div><!-- CAROUSEL CONTAINER END -->
</div>
<div class="gap gap-50"></div>
<div class="content" id="bacons">
<p class="lead event-text" id="description">
Loading...
</p>
<div id="map-canvas"></div>
</div>
<div class="gap gap-50"></div>
<div class="content" id="kittens">
<h1 class="event-text" id="weather-advice">Always check the weather before heading outside!</h1>
<div class="content footer" id="done">
<p id="loc"><a href="index.html">GoldGo.</a> Hand crafted with love in sunny Brisbane, Queensland.</p>
<p>Built by Tech Stars, <a href="mailto:poxon.d@gmail.com" class="footer">David</a> & <a class="footer" href="mailto:kurt.m0@gmail.com">Kurt</a>.</p>
</div>
</div>
<!-- <div class="gap"></div> -->
</div>
<script type="text/javascript" src="scripts/skrollr.js"></script>
<script type="text/javascript" src="scripts/slick.js"></script>
<script type="text/javascript" src="scripts/bootstrap.js"></script>
<script type="text/javascript" src="scripts/maps.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var events;
$.get('maps/gold.php', function() {
// pass
}).done(function(data) {
events = $.parseJSON(data);
buildCarousel();
getEvent(0);
setTimeout(function(){$(window).trigger('resize');console.log('hi')}, 6000);
})
var buildCarousel = function() {
var html = ""
$.each(events, function() {
$('#carousel').slickAdd('<div class="event-text"><h1>' + this['title'] + '</h1><h2>' + this['date']+' · ' + this['location'] + '</h2><p>' + this['cost'] + ' - Booking: ' + this['booking'] + '</p></div>')
})
}
var getEvent = function(index) {
$('#main').css("background-image", "url('" + events[index]['imgEvent'] + "')");
$('#weather').css("background-image", "url('" + events[index]['imgWeather'] + "')");
$('#weather-advice').text(events[index]['advice']);
$('#description').text(events[index]['description']);
setMarkersByName(events[index]['location'], "goldgo");
centreMap(events[index]['location']);
}
var s = skrollr.init({
smoothScrolling: false,
mobileDeceleration: 0.004
});
$('.eventbg').each(function() {
$(this).closest('body').css("background-image", "url('" + $(this).data('bg') + "')")
})
$('.weather').each(function() {
$(this).css("background-image", "url('" + $(this).data('bg') + "')")
})
$('.events').slick({
dots: true,
arrows: false,
onAfterChange : function(slider, index) {
getEvent(index);
}
});
});
</script>
</body>
</html>