-
Notifications
You must be signed in to change notification settings - Fork 0
/
discoveries-monument.html
214 lines (174 loc) · 7.25 KB
/
discoveries-monument.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
205
206
207
208
209
210
211
212
213
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Discoveries Monument | Eat & Travel</title>
<link rel="stylesheet" href="stylesheets/reveal.css">
<link rel="stylesheet" href="stylesheets/example.css" />
<link rel="stylesheet" href="stylesheets/pushy.css" />
<link rel="stylesheet" href="stylesheets/discoveries_monument.css" />
<link rel="stylesheet" href="stylesheets/discoveries_monument_animation.css" />
</head>
<body>
<!-- Pushy Menu -->
<nav class="pushy pushy-left">
<img src="images/eatntravel_white.png" alt="eatntravel" width="100" style="width:100px;margin:auto;" >
<p>
Eat & Travel is a restaurant in your town!
</p>
<a href="#" class="big-link" data-reveal-id="myModal">
Menu
</a>
</nav>
<!-- Site Overlay -->
<div class="site-overlay"></div>
<div class="container">
<!-- Menu Button -->
<div class="menu-btn" style="top:0px;">☰</div>
<div id="top_layer" class="scroll">
<div id="intro_title">
<img id="logo" src="images/eatntravel_white.png" alt="eatntravel_white" width="200">
<h1>Discoveries Monument</h1>
</div>
<div id="instructions">
<p><span id="arrow">»</span></p>
</div>
<div id="first_frame">
<ol id="people_walking_frame_list" class="frame-list">
<li class="active"></li>
</ol>
</div>
<div id="second_frame" class="blackdrop">
<p>
The Discoveries Monument was built in 1960 to commemorate the 500th anniversary of the death of Prince Henry the Navigator.
</p>
</div>
<div id="fourth_frame">
<img src="images/discoveries_monument/web_IMG_6465.jpg" alt="web_IMG_6465" height="768">
</div>
<div id="sixth_frame">
<ol id="river_boat_pan_frame_list" class="frame-list">
<li class="active"></li>
</ol>
</div>
<div id="ninth_frame" class="blackdrop">
<p>
Among the historical figures represented in this sculpture of a ship are King Manuel I, poet Camoes, Vasco da Gama, Magellan, Cabral, and Prince Henry the Navigator at the prow.
</p>
</div>
<div id="conclusion" class="blackdrop">
<p>This is the end.</p>
</div>
</div>
<div id="middle_layer" class="scroll">
<div id="third_frame">
<img src="images/discoveries_monument/web_IMG_6484.jpg" alt="web_IMG_6484" height="768">
</div>
<div id="eighth_frame">
<img src="images/discoveries_monument/web_IMG_6443.jpg" alt="web_IMG_6443" height="768">
</div>
</div>
<div id="back_layer" class="scroll">
<div id="fifth_frame">
<img src="images/discoveries_monument/web_IMG_6477.jpg" alt="web_IMG_6477" height="768">
</div>
<div id="fifth_text_frame" class="blackdrop">
<p>
There is a mosaic on the pavement in front of the monument of a compass and world map showing the routes taken by Portuguese explorers.
</p>
</div>
<div id="seventh_frame">
<img src="images/discoveries_monument/web_IMG_6446.jpg" alt="web_IMG_6446" height="768">
</div>
<div id="tenth_frame">
<img src="images/discoveries_monument/web_IMG_6433.jpg" alt="web_IMG_6433" height="768">
</div>
</div>
</div>
<div id="myModal" class="reveal-modal">
<h1>Reveal Modal Goodness</h1>
<p>This is a default modal in all its glory, but any of the styles here can easily be changed in the CSS.</p>
<a class="close-reveal-modal">×</a>
</div>
<script type="text/javascript" src="javascripts/vendor/jquery.js"></script>
<script type="text/javascript" src="javascripts/vendor/modernizr-2.6.2.min.js"></script>
<script type="text/javascript" src="javascripts/vendor/jquery.jInvertScroll.js"></script>
<script type="text/javascript" src="javascripts/vendor/pushy.js"></script>
<script type="text/javascript" src="javascripts/vendor/jquery.reveal.js"></script>
<script type="text/javascript">
(function($) {
var frame_count = 120;
function create_frames(id)
{
var frameList = $(id);
console.log(frameList);
for(var i = 0; i < frame_count; i++) { // the first <li> is already on the page
var li = $('<li/>')
.appendTo(frameList);
}
}
create_frames('#people_walking_frame_list');
create_frames('#river_boat_pan_frame_list');
var $win = $(window),
$firstFrameAnimations = $('#people_walking_frame_list li'),
$sixthFrameAnimations = $('#river_boat_pan_frame_list li'),
isFirefox = navigator.userAgent.match(/Firefox/) !== null;
var animationHandler = function() {
// quick fix to disable turn animation in Firefox
if ( isFirefox == false) {
frameHandler();
}
};
$(document).scroll(animationHandler);
$win.resize(animationHandler);
function frameHandler(percent) {
var w = percent * 1000;
var firstFrameAnimationStart = 0,
firstFrameAnimationEnd = 147,
sixthFrameAnimationStart = 450,
sixthFrameAnimationStop = 742;
// hide the intro title
$('#intro_title').css('opacity', 100 - (percent * 200));
// #people_walking_frame_list starts at 0
// #river_boat_frame_list starts at
var speed = 1.8;
var v = w / speed;
var choice = Math.ceil(v) - (Math.floor(Math.ceil(v)/frame_count)) * frame_count;
if ((w > firstFrameAnimationStart) && (w < firstFrameAnimationEnd)) {
console.log(w);
if (choice >= 0 && choice < frame_count) {
var nextFrame = choice;
$firstFrameAnimations
.removeClass('active')
.eq(nextFrame).addClass('active');
}
} else if ((w > sixthFrameAnimationStart)&&(w < sixthFrameAnimationStop)) {
if (choice >= 0 && choice < frame_count) {
var nextFrame = choice;
$sixthFrameAnimations
.removeClass('active')
.eq(nextFrame).addClass('active');
}
}
}
function scrollHandler(percentScroll){
var w = percentScroll * 1000; // times 1000 so that we can get it to a fine grained scroll, less is choppy
var v = w / 14.01;
var countOfFrames = 6;
var choice = Math.ceil(v) - (Math.floor(Math.ceil(v)/countOfFrames)) * countOfFrames;
console.log(choice);
if (choice == 0){
make_base();
} else {
}
}
$.jInvertScroll(['.scroll','.menu-btn'], // an array containing the selector(s) for the elements you want to animate
{
height: 6000, // optional: define the height the user can scroll, otherwise the overall length will be taken as scrollable height
onScroll: frameHandler
});
$('.menu-btn').css('position','fixed'); // this needs to be applied after scrolling is applied, otherwise the btn races to the right
}(jQuery));
</script>
</body>
</html>