-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
81 lines (80 loc) · 3.01 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>SNACKZ</title>
<meta name="description" content="Snackz is a project dedicated foodz.">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="format-detection" content="telephone=no">
<meta http-equiv="x-rim-auto-match" content="none">
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" href="css/reset.css" type="text/css">
<link rel="stylesheet" href="css/general.css" type="text/css">
<link href='http://fonts.googleapis.com/css?family=Raleway:300,500' rel='stylesheet' type='text/css'>
<script src="js/vendor/modernizr-2.6.2.min.js"></script>
</head>
<body>
<header>
<div class="wrapper header-stay">
<h1 class="title"><a class="title-link">Snackz</a></h1>
</div>
<div class="wrapper header-leave">
<h2 class="intro">is a project dedicated to teh foodz.</h2>
<nav class="nav">
<ul class="nav-list">
<li class="nav-item"><a class="nav-link nav-link--contact">Contact</a></li>
<li class="nav-item"><a class="nav-link nav-link--about">About</a></li>
</ul>
</nav>
</div>
</header>
<div class="D3">
<div class="spline show--front">
<main class="front side">
<div class="side-container">
<img class="foodshot" src="media/rice.jpg" />
<img class="foodshot" src="media/donut.jpg" />
</div>
</main>
<section class="about right side">
<div class="side-container">
<img class="foodshot" src="media/maya_n_tessa_upsidedown.jpg" />
</div>
</section>
</div>
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<script type="text/javascript">
"use strict";
(function( $, window, undefined ) {
// Define the default active pane.
var activePane = 0;
// Define click handlers for navigation.
$( ".nav-link--about" ).click( function(e) {
$( ".spline" ).attr( "class", "spline show--right" );
$( ".side" ).animate({scrollTop:0});
activePane = 1;
});
$( ".title" ).click( function(e) {
$( ".spline" ).attr( "class", "spline show--front" );
$( ".side" ).animate({scrollTop:0});
activePane = 0;
});
// Define scroll handler to hide right part of navigation.
$( ".side" ).on( "scroll", function(e) {
var fs = parseInt( $( ".side" ).eq( activePane ).css( "font-size"), 10 );
var position = $(".side-container").eq( activePane ).position();
var padding = parseInt( $( ".header-leave" ).css( "padding-top" ), 10 );
if ( position.top / fs < 6 && position.top / fs >= 1 ) {
$( ".header-leave" ).height( position.top - padding );
} else if (position.top / fs < 1 && $( ".header-leave" ).height() ) {
$( ".header-leave" ).height( 0 );
} else if (position.top / fs >= 6 && $( ".header-leave" ).height() !== 5 * fs ) {
$( ".header-leave" ).height( 5 * fs );
}
})
} )( jQuery, window );
</script>
</body>
</html>