-
Notifications
You must be signed in to change notification settings - Fork 0
/
tower-of-belem.html
183 lines (150 loc) · 6.12 KB
/
tower-of-belem.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Tower of Belem | 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/tower_of_belem.css" />
<link rel="stylesheet" href="stylesheets/tower_of_belem_frames.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>Tower of Belém</h1>
</div>
<div id="instructions">
<span id="arrow">»</span>
</div>
<div id="first_frame">
<ol id="tower_of_belem_frame_list" class="frame-list">
<li class="active"></li>
</ol>
</div>
<div id="second_frame" class="blackdrop">
<p>
The Tower of Belém was built between 1515 and 1520 as a monument to the Age of Discovery. It is built at the same location from which caravels departed during the height of Portugal's power at sea.
<br /><br />
The architecture of this tower blends Gothic and Moorish elements, including ornate patterns of twisted rope carved from stone.
</p>
</div>
<div id="sixth_frame">
<img src="images/tower_of_belem/web_MG_5658.jpg" alt="_MG_5658" height="768">
</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/tower_of_belem/web_MG_5646.jpg" alt="belem_window" height="768">
</div>
<div id="fourth_frame">
<img src="images/tower_of_belem/web_MG_5652.jpg" alt="belem_sketch" height="768">
</div>
<div id="eighth_frame">
<img src="images/tower_of_belem/web_IMG_6504.JPG" alt="IMG_6504" height="768">
</div>
<div id="ninth_frame">
<img src="images/tower_of_belem/web_MG_5717.jpg" alt="_MG_5717" height="768">
</div>
</div>
<div id="back_layer" class="scroll">
<div id="fifth_frame">
<img src="images/tower_of_belem/web_IMG_6526.jpg" alt="belem_full" height="768">
</div>
<div id="sixth_frame_background" class="">
</div>
<div id="seventh_frame">
<img src="images/tower_of_belem/web_IMG_6518.jpg" alt="belem_balcony" 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 = 169;
function create_frames()
{
var frameList = $('#tower_of_belem_frame_list');
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();
var $win = $(window),
$pencilFrames = $('.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 startAnimation = 0;
$('#intro_title').css('opacity', 100 - (percent * 200));
if (w > startAnimation) {
var speed = 1.8;
var v = w / speed;
var choice = Math.ceil(v) - (Math.floor(Math.ceil(v)/frame_count)) * frame_count;
if (choice >= 0 && choice < frame_count) {
var nextFrame = choice;
$pencilFrames
.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>