-
Notifications
You must be signed in to change notification settings - Fork 110
/
index8.html
120 lines (113 loc) · 4.98 KB
/
index8.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
<!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>Page Loading Effects | Demo 8</title>
<meta name="description" content="Page Loading Effects: Modern ways of revealing new content" />
<meta name="keywords" content="page loading, svg animation, loading effect, fullscreen svg" />
<meta name="author" content="Codrops" />
<link rel="shortcut icon" href="../favicon.ico">
<link rel="stylesheet" type="text/css" href="css/normalize.css" />
<link rel="stylesheet" type="text/css" href="css/demo.css" />
<link rel="stylesheet" type="text/css" href="css/component.css" />
<script src="js/snap.svg-min.js"></script>
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<div id="pagewrap" class="pagewrap">
<div class="container show" id="page-1">
<!-- Top Navigation -->
<div class="codrops-top clearfix">
<a class="codrops-icon codrops-icon-prev" href="http://tympanus.net/Tutorials/CircularProgressButton/"><span>Previous Demo</span></a>
<span class="right"><a class="codrops-icon codrops-icon-drop" href="http://tympanus.net/codrops/?p=18880"><span>Back to the Codrops Article</span></a></span>
</div>
<header class="codrops-header">
<h1>Page Loading Effects <span>Modern ways of revealing new content</span></h1>
</header>
<section class="columns clearfix">
<div class="column">
<nav class="codrops-demos">
<a href="index.html">Lazy Stretch</a>
<a href="index2.html">Circle</a>
<a href="index3.html">Spill</a>
<a href="index4.html">Frame it</a>
<a href="index5.html">Tunnel vision</a>
<a href="index6.html">Windscreen wiper</a>
<a href="index7.html">Jammed blind</a>
<a class="current-demo" href="index8.html">Parallelogram</a>
<a href="index9.html">Tilted</a>
<a href="index10.html">Lateral Swipe</a>
<a href="index11.html">Wave</a>
<a href="index12.html">Origami</a>
<a href="index13.html">Curtain</a>
</nav>
</div>
<div class="column">
<p>To start the page loading animation, click the following link:</p>
<p><a class="pageload-link" href="#page-2">Show Page Loader</a></p>
</div>
</section>
<section class="related">
<p>If you enjoyed this demo you might also like:</p>
<a href="http://tympanus.net/Development/FullscreenOverlayStyles/">
<img src="http://tympanus.net/codrops/wp-content/uploads/2014/02/FullscreenOverlayStyles-300x162.jpg" />
<h3>Fullscreen Overlay Effects</h3>
</a>
<a href="http://tympanus.net/Tutorials/ShapeHoverEffectSVG/">
<img src="http://tympanus.net/codrops/wp-content/uploads/2014/01/ShapeHoverEffect-300x162.png" />
<h3>Shape Hover Effect</h3>
</a>
</section>
</div><!-- /container -->
<!-- The new page dummy; this would be dynamically loaded content -->
<div class="container" id="page-2">
<!-- Top Navigation -->
<div class="codrops-top clearfix">
<a class="codrops-icon codrops-icon-prev" href="http://tympanus.net/Tutorials/CircularProgressButton/"><span>Previous Demo</span></a>
<span class="right"><a class="codrops-icon codrops-icon-drop" href="http://tympanus.net/codrops/?p=18880"><span>Back to the Codrops Article</span></a></span>
</div>
<section>
<h2>This is an example for a new page.</h2>
<p><a class="pageload-link" href="#page-1">Go back</a></p>
</section>
</div><!-- /container -->
<div id="loader" class="pageload-overlay" data-opening="M 0,0 0,60 80,60 80,0 z M 80,0 40,30 0,60 40,30 z">
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 80 60" preserveAspectRatio="none">
<path d="M 0,0 0,60 80,60 80,0 Z M 80,0 80,60 0,60 0,0 Z"/>
</svg>
</div><!-- /pageload-overlay -->
</div><!-- /pagewrap -->
<script src="js/classie.js"></script>
<script src="js/svgLoader.js"></script>
<script>
(function() {
var pageWrap = document.getElementById( 'pagewrap' ),
pages = [].slice.call( pageWrap.querySelectorAll( 'div.container' ) ),
currentPage = 0,
triggerLoading = [].slice.call( pageWrap.querySelectorAll( 'a.pageload-link' ) ),
loader = new SVGLoader( document.getElementById( 'loader' ), { speedIn : 300, speedOut : 600, easingIn : mina.easeinout, easingOut : mina.bounce } );
function init() {
triggerLoading.forEach( function( trigger ) {
trigger.addEventListener( 'click', function( ev ) {
ev.preventDefault();
loader.show();
// after some time hide loader
setTimeout( function() {
loader.hide();
classie.removeClass( pages[ currentPage ], 'show' );
// update..
currentPage = currentPage ? 0 : 1;
classie.addClass( pages[ currentPage ], 'show' );
}, 2000 );
} );
} );
}
init();
})();
</script>
</body>
</html>