index.html 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=Edge">
  6. <link rel="icon" href="http://fian.my.id/static/favicon.png" />
  7. <meta name="msapplication-tap-highlight" content="no"/>
  8. <title>Waves</title>
  9. <meta name="description" content="Waves - Click effect inspired by Google's Material Design" />
  10. <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
  11. <link href='http://fonts.googleapis.com/css?family=Roboto:400,300' rel='stylesheet' type='text/css'>
  12. <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css">
  13. <link rel="stylesheet" type="text/css" href="./static/prims.css">
  14. <link rel="stylesheet" type="text/css" href="./static/snarl.min.css">
  15. <link rel="stylesheet" type="text/css" href="./static/waves.min.css?v=0.7.5">
  16. <link rel="stylesheet" type="text/css" href="./static/style.css">
  17. <script>
  18. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  19. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  20. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  21. })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  22. ga('create', 'UA-36521756-2', 'auto');
  23. ga('send', 'pageview');
  24. </script>
  25. <script type="text/javascript" src="./static/prims.js"></script>
  26. <script type="text/javascript" src="./static/snarl.min.js"></script>
  27. <script type="text/javascript" src="./static/waves.min.js?v=0.7.5"></script>
  28. <script type="text/javascript" src="./static/jquery.js"></script>
  29. </head>
  30. <body>
  31. <div id="bg-pattern" class="bg-pattern waves-effect waves-block waves-light"></div>
  32. <div id="navigation" class="shadow">
  33. <a href="#examples">Examples</a>
  34. <a href="#start">Docs</a>
  35. <a href="#api">API</a>
  36. <a href="#faq">FAQ</a>
  37. </div>
  38. @situs-include(./_pages/home.html);
  39. @situs-include(./_pages/examples.html);
  40. @situs-include(./_pages/source.html);
  41. @situs-include(./_pages/getting-started.html);
  42. @situs-include(./_pages/api.html);
  43. @situs-include(./_pages/faq.html);
  44. <script type="text/javascript">
  45. var currentRoute = false;
  46. function enterTransition(name, callback) {
  47. var element = $('#'+name);
  48. element.removeClass('hide');
  49. setTimeout(function() {
  50. element.addClass('show')
  51. .addClass('appear');
  52. setTimeout(function() {
  53. element.addClass('flow');
  54. return callback();
  55. }, 1000);
  56. }, 100);
  57. }
  58. function leaveTransition(name, callback) {
  59. var element = $('#'+name);
  60. element.removeClass('flow')
  61. .removeClass('show');
  62. setTimeout(function() {
  63. element.removeClass('appear');
  64. setTimeout(function() {
  65. element.addClass('hide');
  66. return callback();
  67. }, 500);
  68. }, 300);
  69. }
  70. var routes = {
  71. // Landing Page Animation
  72. index: {
  73. enter: function(callback) {
  74. $('#landing').removeClass('hide');
  75. setTimeout(function() {
  76. $('#landing').addClass('show');
  77. return callback();
  78. }, 100);
  79. },
  80. leave: function(callback) {
  81. $('#landing').removeClass('show');
  82. setTimeout(function() {
  83. $('#landing').addClass('hide');
  84. return callback();
  85. }, 500);
  86. }
  87. },
  88. // Example Page Animation
  89. examples: {
  90. enter: function(callback) {
  91. enterTransition('example', callback);
  92. },
  93. leave: function(callback) {
  94. leaveTransition('example', callback);
  95. }
  96. },
  97. // Getting Started Page Animation
  98. start: {
  99. enter: function(callback) {
  100. enterTransition('getting-started', callback);
  101. },
  102. leave: function(callback) {
  103. leaveTransition('getting-started', callback);
  104. }
  105. },
  106. // API Page Animation
  107. api: {
  108. enter: function(callback) {
  109. enterTransition('api', callback);
  110. },
  111. leave: function(callback) {
  112. leaveTransition('api', callback);
  113. }
  114. },
  115. // FAQ Page Animation
  116. faq: {
  117. enter: function(callback) {
  118. enterTransition('faq', callback);
  119. },
  120. leave: function(callback) {
  121. leaveTransition('faq', callback);
  122. }
  123. }
  124. }
  125. function routing() {
  126. var hash = window.location.hash.replace('#', '');
  127. if (!hash.length) {
  128. hash = 'index';
  129. }
  130. if (['index', 'examples', 'start', 'api', 'faq'].indexOf(hash) === -1) {
  131. return false;
  132. }
  133. if (currentRoute === false) {
  134. return routes[hash].enter(function() {
  135. currentRoute = hash;
  136. });
  137. }
  138. return routes[currentRoute].leave(function() {
  139. routes[hash].enter(function() {
  140. currentRoute = hash;
  141. });
  142. });
  143. }
  144. function init() {
  145. setTimeout(function() {
  146. $('#navigation').addClass('show');
  147. routing();
  148. }, 500);
  149. }
  150. $(document).on('ready', function() {
  151. // Init Waves
  152. Waves.init();
  153. Waves.attach('.drag-ripple', 'waves-block', true);
  154. Waves.attach('#bg-pattern', null, true);
  155. init();
  156. $(window).on('hashchange', routing);
  157. /**
  158. * Example source code click
  159. */
  160. $('#example .top-button').on('click', function() {
  161. var type = $(this).data('code');
  162. $('#source-code .box .code').addClass('hide');
  163. $('#source-code .box #code-'+type).removeClass('hide');
  164. $('#source-code').removeClass('hide');
  165. setTimeout(function() {
  166. $('#source-code').addClass('show');
  167. }, 50);
  168. });
  169. $('#source-code .top-button').on('click', function() {
  170. $('#source-code').removeClass('show');
  171. setTimeout(function() {
  172. $('#source-code .box .code').addClass('hide');
  173. $('#source-code').addClass('hide');
  174. }, 500);
  175. });
  176. });
  177. </script>
  178. </body>
  179. </html>