-
Notifications
You must be signed in to change notification settings - Fork 0
/
tester.html
204 lines (169 loc) · 6.02 KB
/
tester.html
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
<html>
<!-- mapping violence -->
<head>
<!-- css -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="https://npmcdn.com/[email protected]/dist/leaflet.css" />
<!-- fonts -->
<link href="https://fonts.googleapis.com/css?family=Crimson+Text|Fjalla+One" rel="stylesheet">
<!-- jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script src="js/jquery.animate-colors.js"></script>
<!-- js -->
<script src="https://npmcdn.com/[email protected]/dist/leaflet.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- scroll magic -->
<script src="js/ScrollMagic.min.js"></script>
</head>
<body>
<section class="panel blue">
<b>ONE</b>
<p> "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?" </p>
</section>
<section class="panel turqoise">
<b>TWO</b>
</section>
<section class="panel green">
<b>THREE</b>
</section>
<section class="panel bordeaux">
<b>FOUR</b>
</section>
<!--
</body>
<!-- TODO: put in separate doc -->
<style>
body {
font-family: 'Crimson Text', serif;
-webkit-font-smoothing: antialiased;
}
h1 {
font-family: 'Fjalla One', sans-serif;
}
#mapid {
height: 100%;
/* position: absolute; */
z-index: 0;
}
#coverPage {
width:100%;
padding-left: 0px;
padding-right: 0px;
position: relative;
z-index: 5;
}
#blackOverlay {
position: absolute;
height: 100%;
z-index: 5;
background-color: #252120;
opacity: 0.3;
}
#infoPanel {
height: 100%;
position: absolute;
z-index: 6;
background-color: #eeeeea;
color: #252120;
opacity: 0.9;
}
.infoScroll {
width:600px;
margin: auto;
height:60%;
overflow:auto;
font-family: 'Crimson Text', serif;
font-size: 16pt;
margin-top:20px;
}
.panel {
height: 100%;
width: 100%;
}
#slideLeft {
position: absolute;
right: 0px;
vertical-align: middle;
top: 50%;
}
.title {
font-family: 'Fjalla One', sans-serif;
margin: auto;
text-align: center;
padding-top: 20px;
/* padding-left: 50px; */
font-size: 85pt;
}
.buttons {
padding-left: 100px;
font-family: 'Fjalla One', sans-serif;
}
.smallPanel {
color: #252120;
}
</style>
<!-- TODO: put in separate doc -->
<script>
var mymap = L.map('mapid').setView([27.4779, -99.5496], 8);
L.tileLayer('https://api.mapbox.com/styles/v1/ejiao/cirpbdjyr0024g8nflf48lzs6/tiles/256/{z}/{x}/{y}@2x?access_token=pk.eyJ1IjoiZWppYW8iLCJhIjoiY2lycGJjdWc1MGV6ZGZhbThkOXNwNWNqbSJ9.JmvgWwuCzvSBa5ieYUXWtw', {
attribution: "Map data © © <a href='https://www.mapbox.com/about/maps/'>Mapbox</a> © <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a>'",
maxZoom: 18,
id: 'ejiao.139c2pig',
accessToken: 'pk.eyJ1IjoiZWppYW8iLCJhIjoiY2lycGJjdWc1MGV6ZGZhbThkOXNwNWNqbSJ9.JmvgWwuCzvSBa5ieYUXWtw'
}).addTo(mymap);
/* defining our red dot map marker */
var redDot = L.icon({
iconUrl: 'red_circle.png',
shadowUrl: '',
iconSize: [10, 10], // size of the icon
shadowSize: [0, 0], // size of the shadow
iconAnchor: [5, 5], // point of the icon which will correspond to marker's location
shadowAnchor: [0, 0], // the same for the shadow
popupAnchor: [5, 5] // point from which the popup should open relative to the iconAnchor
});
function loadMarkers() {
var marker1 = L.marker([27.4779, -99.496], {icon: redDot}).addTo(mymap);
var marker2 = L.marker([27.2, -98.5496], {icon: redDot}).addTo(mymap);
var marker3 = L.marker([27.429, -98.246], {icon: redDot}).addTo(mymap);
var marker4 = L.marker([27.23, -99.496], {icon: redDot}).addTo(mymap);
L.marker([27.23, -99.56], {icon: redDot}).addTo(mymap);
L.marker([27.123, -99.26], {icon: redDot}).addTo(mymap);
L.marker([27.123, -99.26], {icon: redDot}).addTo(mymap);
L.marker([26.9, -99.1], {icon: redDot}).addTo(mymap);
L.marker([25.9017, -97.4975], {icon: redDot}).addTo(mymap);
L.marker([25.9217, -97.675], {icon: redDot}).addTo(mymap);
}
$(function () { // wait for document ready
// init
var controller = new ScrollMagic.Controller({
globalSceneOptions: {
triggerHook: 'onLeave'
}
});
// get all slides
var slides = document.querySelectorAll("section.panel");
// create scene for every slide
for (var i=0; i<slides.length; i++) {
new ScrollMagic.Scene({
triggerElement: slides[i]
})
.setPin(slides[i])
.addIndicators() // add indicators (requires plugin)
.addTo(controller);
}
});
$("#slideLeft").on("click", function() {
$("#infoPanel").animate({
width: '350px',
opacity: '0.75',
backgroundColor: '#eeeeea'
}, "slow");
$(".title").hide();
$(".buttons").hide();
$(".infoScroll").hide();
$("#blackOverlay").fadeOut("slow");
$("#howToUseSmall").toggle(".hidden");
loadMarkers();
});
</script>
</html>