aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2018-01-20 20:18:47 +0530
committerGitHub <noreply@github.com>2018-01-20 20:18:47 +0530
commit0d8bd65472d2167fe4e346ee2e0f0ca34aeef761 (patch)
tree7cf6f3d61d77a6d6886f09eb2d3f52fcd67f340b
parentf1614a1e597a1ac53987a0466a41a14bf557e3d3 (diff)
Add files via upload
-rw-r--r--Contact.html69
-rw-r--r--css/contact.css117
-rw-r--r--css/menu.css327
-rw-r--r--css/style.css143
-rw-r--r--index.html83
-rw-r--r--js/index.js93
-rw-r--r--js/menu.js154
7 files changed, 986 insertions, 0 deletions
diff --git a/Contact.html b/Contact.html
new file mode 100644
index 0000000..8dc7e52
--- /dev/null
+++ b/Contact.html
@@ -0,0 +1,69 @@
+<!DOCTYPE html>
+<html lang="en" >
+
+<head>
+ <meta charset="UTF-8">
+ <title>Contact Me</title>
+
+
+
+ <link rel="stylesheet" href="css/menu.css">
+ <link rel="stylesheet" href="css/contact.css">
+
+
+</head>
+
+<body>
+ <!-- Menu by Captain Anonymous who forked it from Dmitry Kiselyov-->
+ <div id='cssmenu'>
+ <ul>
+ <li><a href='#'>Home</a></li>
+ <li class='active'><a href='#'>Projects</a>
+ <ul>
+ <li><a href='https://navanchauhan.github.io/Mjolnir'>Mjölnir</a>
+
+ </li>
+ <li><a href='https://navanchauhan.github.io/Grub-Repair-Toolkit'>GYGB</a>
+
+ </li>
+ </ul>
+ </li>
+ </li>
+ <li><a href='./Contact.html'>Contact</a></li>
+ </ul>
+ </div>
+ <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
+
+
+
+ <script src="js/menu.js"></script>
+
+ <div class="container">
+ <form id="contact" action="http://formspree.io/navanchauhan@gmail.com" method="post">
+ <h3>Quick Contact</h3>
+ <h4>Contact me today, and get a reply within 24 hours!</h4>
+ <fieldset>
+ <input placeholder="Your name" type="text" tabindex="1" required autofocus>
+ </fieldset>
+ <fieldset>
+ <input placeholder="Your Email Address" type="email" tabindex="2" name="_replyto" required>
+ </fieldset>
+ <fieldset>
+ <input placeholder="Your Phone Number" type="tel" tabindex="3" required>
+ </fieldset>
+ <fieldset>
+ <textarea placeholder="Type your Message Here...." tabindex="5" required></textarea>
+ </fieldset>
+ <fieldset>
+ <button name="submit" type="submit" value="Send" id="contact-submit" data-submit="...Sending">Submit</button>
+ </fieldset>
+ </form>
+
+
+</div>
+
+
+
+</body>
+
+</html>
diff --git a/css/contact.css b/css/contact.css
new file mode 100644
index 0000000..33eefd3
--- /dev/null
+++ b/css/contact.css
@@ -0,0 +1,117 @@
+@import url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,400,300,600);
+
+* {
+ margin:0;
+ padding:0;
+ box-sizing:border-box;
+ -webkit-box-sizing:border-box;
+ -moz-box-sizing:border-box;
+ -webkit-font-smoothing:antialiased;
+ -moz-font-smoothing:antialiased;
+ -o-font-smoothing:antialiased;
+ font-smoothing:antialiased;
+ text-rendering:optimizeLegibility;
+}
+
+body {
+ font-family:"Open Sans", Helvetica, Arial, sans-serif;
+ font-weight:300;
+ font-size: 12px;
+ line-height:30px;
+ color:#777;
+ background: rgb(52, 152, 219);
+}
+
+.container {
+ max-width:400px;
+ width:100%;
+ margin:0 auto;
+ position:relative;
+}
+
+#contact input[type="text"], #contact input[type="email"], #contact input[type="tel"], #contact textarea, #contact button[type="submit"] { font:400 12px/16px "Open Sans", Helvetica, Arial, sans-serif; }
+
+#contact {
+ background:#F9F9F9;
+ padding:25px;
+ margin:50px 0;
+}
+
+#contact h3 {
+ color: #F96;
+ font-size: 3em;
+ display: block;
+ font-weight: 300;
+}
+
+#contact h4 {
+ margin:5px 0 15px;
+ display:block;
+ font-size:13px;
+}
+
+fieldset {
+ border: medium none !important;
+ margin: 0 0 10px;
+ min-width: 100%;
+ padding: 0;
+ width: 100%;
+}
+
+#contact input[type="text"], #contact input[type="email"], #contact input[type="tel"], #contact textarea {
+ width:100%;
+ border:1px solid #CCC;
+ background:#FFF;
+ margin:0 0 5px;
+ padding:10px;
+}
+
+#contact input[type="text"]:hover, #contact input[type="email"]:hover, #contact input[type="tel"]:hover, #contact textarea:hover {
+ -webkit-transition:border-color 0.3s ease-in-out;
+ -moz-transition:border-color 0.3s ease-in-out;
+ transition:border-color 0.3s ease-in-out;
+ border:1px solid #AAA;
+}
+
+#contact textarea {
+ height:100px;
+ max-width:100%;
+ resize:none;
+}
+
+#contact button[type="submit"] {
+ cursor:pointer;
+ width:100%;
+ border:none;
+ background:rgb(52, 152, 219);
+ color:#FFF;
+ margin:0 0 5px;
+ padding:10px;
+ font-size:15px;
+}
+
+#contact button[type="submit"]:hover {
+ background:#09C;
+ -webkit-transition:background 0.3s ease-in-out;
+ -moz-transition:background 0.3s ease-in-out;
+ transition:background-color 0.3s ease-in-out;
+}
+
+#contact button[type="submit"]:active { box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.5); }
+
+#contact input:focus, #contact textarea:focus {
+ outline:0;
+ border:1px solid #999;
+}
+::-webkit-input-placeholder {
+ color:#888;
+}
+:-moz-placeholder {
+ color:#888;
+}
+::-moz-placeholder {
+ color:#888;
+}
+:-ms-input-placeholder {
+ color:#888;
+}
diff --git a/css/menu.css b/css/menu.css
new file mode 100644
index 0000000..06c17fa
--- /dev/null
+++ b/css/menu.css
@@ -0,0 +1,327 @@
+@import url(https://fonts.googleapis.com/css?family=Montserrat:400,700);
+#cssmenu,
+#cssmenu ul,
+#cssmenu ul li,
+#cssmenu ul li a,
+#cssmenu #menu-button {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ list-style: none;
+ line-height: 1;
+ display: block;
+ position: relative;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+}
+#cssmenu:after,
+#cssmenu > ul:after {
+ content: ".";
+ display: block;
+ clear: both;
+ visibility: hidden;
+ line-height: 0;
+ height: 0;
+}
+#cssmenu #menu-button {
+ display: none;
+}
+#cssmenu {
+ font-family: Montserrat, sans-serif;
+ background: #373B44;
+}
+#cssmenu > ul > li {
+ float: left;
+}
+#cssmenu.align-center > ul {
+ font-size: 0;
+ text-align: center;
+}
+#cssmenu.align-center > ul > li {
+ display: inline-block;
+ float: none;
+}
+#cssmenu.align-center ul ul {
+ text-align: left;
+}
+#cssmenu.align-right > ul > li {
+ float: right;
+}
+#cssmenu > ul > li > a {
+ padding: 17px;
+ font-size: 12px;
+ letter-spacing: 1px;
+ text-decoration: none;
+ color: #dddddd;
+ font-weight: 700;
+ text-transform: uppercase;
+}
+#cssmenu > ul > li:hover > a {
+ color: #ffffff;
+}
+#cssmenu > ul > li.has-sub > a {
+ padding-right: 30px;
+}
+#cssmenu > ul > li.has-sub > a:after {
+ position: absolute;
+ top: 22px;
+ right: 11px;
+ width: 8px;
+ height: 2px;
+ display: block;
+ background: #dddddd;
+ content: '';
+}
+#cssmenu > ul > li.has-sub > a:before {
+ position: absolute;
+ top: 19px;
+ right: 14px;
+ display: block;
+ width: 2px;
+ height: 8px;
+ background: #dddddd;
+ content: '';
+ -webkit-transition: all .25s ease;
+ transition: all .25s ease;
+}
+#cssmenu > ul > li.has-sub:hover > a:before {
+ top: 23px;
+ height: 0;
+}
+#cssmenu ul ul {
+ position: absolute;
+ left: -9999px;
+}
+#cssmenu.align-right ul ul {
+ text-align: right;
+}
+#cssmenu ul ul li {
+ height: 0;
+ -webkit-transition: all .25s ease;
+ transition: all .25s ease;
+}
+#cssmenu li:hover > ul {
+ left: auto;
+}
+#cssmenu.align-right li:hover > ul {
+ left: auto;
+ right: 0;
+}
+#cssmenu li:hover > ul > li {
+ height: 35px;
+}
+#cssmenu ul ul ul {
+ margin-left: 100%;
+ top: 0;
+}
+#cssmenu.align-right ul ul ul {
+ margin-left: 0;
+ margin-right: 100%;
+}
+#cssmenu ul ul li a {
+ border-bottom: 1px solid rgba(150, 150, 150, 0.15);
+ padding: 11px 15px;
+ width: 170px;
+ font-size: 12px;
+ text-decoration: none;
+ color: #dddddd;
+ font-weight: 400;
+ background: #373B44;
+}
+#cssmenu ul ul li:last-child > a,
+#cssmenu ul ul li.last-item > a {
+ border-bottom: 0;
+}
+#cssmenu ul ul li:hover > a,
+#cssmenu ul ul li a:hover {
+ color: #ffffff;
+}
+#cssmenu ul ul li.has-sub > a:after {
+ position: absolute;
+ top: 16px;
+ right: 11px;
+ width: 8px;
+ height: 2px;
+ display: block;
+ background: #dddddd;
+ content: '';
+}
+#cssmenu.align-right ul ul li.has-sub > a:after {
+ right: auto;
+ left: 11px;
+}
+#cssmenu ul ul li.has-sub > a:before {
+ position: absolute;
+ top: 13px;
+ right: 14px;
+ display: block;
+ width: 2px;
+ height: 8px;
+ background: #dddddd;
+ content: '';
+ -webkit-transition: all .25s ease;
+ transition: all .25s ease;
+}
+#cssmenu.align-right ul ul li.has-sub > a:before {
+ right: auto;
+ left: 14px;
+}
+#cssmenu ul ul > li.has-sub:hover > a:before {
+ top: 17px;
+ height: 0;
+}
+@media all and (max-width: 768px), only screen and (-webkit-min-device-pixel-ratio: 2) and (max-width: 1024px), only screen and (min--moz-device-pixel-ratio: 2) and (max-width: 1024px), only screen and (min-device-pixel-ratio: 2) and (max-width: 1024px), only screen and (min-resolution: 192dpi) and (max-width: 1024px), only screen and (min-resolution: 2dppx) and (max-width: 1024px) {
+ #cssmenu {
+ width: 100%;
+ }
+ #cssmenu ul {
+ width: 100%;
+ display: none;
+ }
+ #cssmenu.align-center > ul {
+ text-align: left;
+ }
+ #cssmenu ul li {
+ width: 100%;
+ border-top: 1px solid rgba(120, 120, 120, 0.2);
+ }
+ #cssmenu ul ul li,
+ #cssmenu li:hover > ul > li {
+ height: auto;
+ }
+ #cssmenu ul li a,
+ #cssmenu ul ul li a {
+ width: 100%;
+ border-bottom: 0;
+ }
+ #cssmenu > ul > li {
+ float: none;
+ }
+ #cssmenu ul ul li a {
+ padding-left: 25px;
+ }
+ #cssmenu ul ul ul li a {
+ padding-left: 35px;
+ }
+ #cssmenu ul ul li a {
+ color: #dddddd;
+ background: none;
+ }
+ #cssmenu ul ul li:hover > a,
+ #cssmenu ul ul li.active > a {
+ color: #ffffff;
+ }
+ #cssmenu ul ul,
+ #cssmenu ul ul ul,
+ #cssmenu.align-right ul ul {
+ position: relative;
+ left: 0;
+ width: 100%;
+ margin: 0;
+ text-align: left;
+ }
+ #cssmenu > ul > li.has-sub > a:after,
+ #cssmenu > ul > li.has-sub > a:before,
+ #cssmenu ul ul > li.has-sub > a:after,
+ #cssmenu ul ul > li.has-sub > a:before {
+ display: none;
+ }
+ #cssmenu #menu-button {
+ display: block;
+ padding: 17px;
+ color: #dddddd;
+ cursor: pointer;
+ font-size: 12px;
+ text-transform: uppercase;
+ font-weight: 700;
+ }
+ #cssmenu #menu-button:after {
+ position: absolute;
+ top: 22px;
+ right: 17px;
+ display: block;
+ height: 4px;
+ width: 20px;
+ border-top: 2px solid #dddddd;
+ border-bottom: 2px solid #dddddd;
+ content: '';
+ }
+ #cssmenu #menu-button:before {
+ position: absolute;
+ top: 16px;
+ right: 17px;
+ display: block;
+ height: 2px;
+ width: 20px;
+ background: #dddddd;
+ content: '';
+ }
+ #cssmenu #menu-button.menu-opened:after {
+ top: 23px;
+ border: 0;
+ height: 2px;
+ width: 15px;
+ background: #ffffff;
+ -webkit-transform: rotate(45deg);
+ transform: rotate(45deg);
+ }
+ #cssmenu #menu-button.menu-opened:before {
+ top: 23px;
+ background: #ffffff;
+ width: 15px;
+ -webkit-transform: rotate(-45deg);
+ transform: rotate(-45deg);
+ }
+ #cssmenu .submenu-button {
+ position: absolute;
+ z-index: 99;
+ right: 0;
+ top: 0;
+ display: block;
+ border-left: 1px solid rgba(120, 120, 120, 0.2);
+ height: 46px;
+ width: 46px;
+ cursor: pointer;
+ }
+ #cssmenu .submenu-button.submenu-opened {
+ background: #262626;
+ }
+ #cssmenu ul ul .submenu-button {
+ height: 34px;
+ width: 34px;
+ }
+ #cssmenu .submenu-button:after {
+ position: absolute;
+ top: 22px;
+ right: 19px;
+ width: 8px;
+ height: 2px;
+ display: block;
+ background: #dddddd;
+ content: '';
+ }
+ #cssmenu ul ul .submenu-button:after {
+ top: 15px;
+ right: 13px;
+ }
+ #cssmenu .submenu-button.submenu-opened:after {
+ background: #ffffff;
+ }
+ #cssmenu .submenu-button:before {
+ position: absolute;
+ top: 19px;
+ right: 22px;
+ display: block;
+ width: 2px;
+ height: 8px;
+ background: #dddddd;
+ content: '';
+ }
+ #cssmenu ul ul .submenu-button:before {
+ top: 12px;
+ right: 16px;
+ }
+ #cssmenu .submenu-button.submenu-opened:before {
+ display: none;
+ }
+}
diff --git a/css/style.css b/css/style.css
new file mode 100644
index 0000000..4aac7ae
--- /dev/null
+++ b/css/style.css
@@ -0,0 +1,143 @@
+* {
+ box-sizing: border-box;
+}
+
+body {
+ margin: 0;
+ font-weight: 500;
+ font-family: 'HelveticaNeue';
+}
+
+section {
+ width: 100%;
+ padding: 0 7%;
+ display: table;
+ margin: 0;
+ max-width: none;
+ background-color: #373B44;
+ height: 100vh;
+}
+section:nth-of-type(2n) {
+ background-color: rgb(52, 152, 219);
+}
+
+.intro {
+ height: 90vh;
+}
+
+.content {
+ display: table-cell;
+ vertical-align: middle;
+}
+
+h1 {
+ font-size: 3em;
+ display: block;
+ color: white;
+ font-weight: 300;
+}
+
+p {
+ font-size: 1.5em;
+ font-weight: 500;
+ color: #C3CAD9;
+}
+
+a {
+ font-weight: 700;
+ color: #373B44;
+ position: relative;
+}
+a:hover {
+ opacity: 0.8;
+}
+a:active {
+ top: 1px;
+}
+
+footer {
+ padding: 1% 5%;
+ text-align: center;
+ background-color: #373B44;
+ color: white;
+}
+footer a {
+ color: #FE4B74;
+ font-weight: 500;
+ text-decoration: none;
+}
+
+@-webkit-keyframes letter-in {
+ 0% {
+ top: 1.2em;
+ }
+ 100% {
+ top: 0em;
+ }
+}
+
+@keyframes letter-in {
+ 0% {
+ top: 1.2em;
+ }
+ 100% {
+ top: 0em;
+ }
+}
+@-webkit-keyframes letter-out {
+ 0% {
+ top: 0em;
+ }
+ 100% {
+ top: -1.2em;
+ }
+}
+@keyframes letter-out {
+ 0% {
+ top: 0em;
+ }
+ 100% {
+ top: -1.2em;
+ }
+}
+div.changing-title {
+ font-size: 8vw;
+ height: 1.2em;
+ position: relative;
+ width: 100%;
+ overflow-y: hidden;
+ margin-left: 1em;
+  transform: translate3d(0, 0, 0);
+}
+div.changing-title h1 {
+ font-size: 1em;
+ position: absolute;
+ left: 0;
+ top: 0;
+ margin: 0;
+}
+div.changing-title h1 .letter {
+ position: relative;
+ top: 1.2em;
+}
+div.changing-title h1 .letter.in {
+ -webkit-animation-name: letter-in;
+ animation-name: letter-in;
+ -webkit-animation-duration: 0.3s;
+ animation-duration: 0.3s;
+ -webkit-animation-timing-function: ease-out;
+ animation-timing-function: ease-out;
+ -webkit-animation-fill-mode: forwards;
+ animation-fill-mode: forwards;
+}
+div.changing-title h1 .letter.out {
+ top: 0em;
+ -webkit-animation-name: letter-out;
+ animation-name: letter-out;
+ -webkit-animation-duration: 0.3s;
+ animation-duration: 0.3s;
+ -webkit-animation-timing-function: ease-in;
+ animation-timing-function: ease-in;
+ -webkit-animation-fill-mode: forwards;
+ animation-fill-mode: forwards;
+}
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..47484b0
--- /dev/null
+++ b/index.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<html lang="en" >
+
+<head>
+ <meta charset="UTF-8">
+ <title>Hi!</title>
+
+
+
+ <link rel="stylesheet" href="css/style.css">
+ <link rel="stylesheet" href="css/menu.css">
+
+
+</head>
+
+<body>
+ <!-- Menu by Captain Anonymous who forked it from Dmitry Kiselyov-->
+ <div id='cssmenu'>
+<ul>
+ <li><a href='#'>Home</a></li>
+ <li class='active'><a href='#'>Projects</a>
+ <ul>
+ <li><a href='https://navanchauhan.github.io/Mjolnir'>Mjölnir</a>
+
+ </li>
+ <li><a href='https://navanchauhan.github.io/Grub-Repair-Toolkit'>GYGB</a>
+
+ </li>
+ </ul>
+ </li>
+ </li>
+ <li><a href='./Contact.html'>Contact</a></li>
+</ul>
+</div>
+ <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
+
+
+
+ <script src="js/menu.js"></script>
+
+
+ <section class="intro">
+<!--Sections created by ckor https://twitter.com/ckor -->
+ <div class="content"><!--Changing Header by Austin Dudas-->
+ <div class="changing-title"><h1>Hi! I am Navan</h1></div></h1>
+
+
+
+ <script src="js/index.js"></script>
+ <script src="js/fm.js"></script>
+
+
+ </div>
+</section>
+
+<section>
+ <div class="content">
+ <h1>I started coding when I was 8 and ironically learnt C before HTML</h1>
+ </div>
+</section>
+
+<section>
+
+ <div class="content">
+ <h1>Funnily, I learnt C# before HTML</h1>
+ </div>
+</section>
+
+<section>
+ <div class="content">
+ <h1>See my <a href="https://github.com/navanchauhan">GitHub Repo.</a></h1>
+ </div>
+</section>
+
+<footer>
+ Helped by countless designers, check source code for more info</a>
+</footer>
+
+
+
+</body>
+
+</html>
diff --git a/js/index.js b/js/index.js
new file mode 100644
index 0000000..c5340b8
--- /dev/null
+++ b/js/index.js
@@ -0,0 +1,93 @@
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var ChangingTitle = function () {
+ function ChangingTitle() {
+ var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
+
+ _classCallCheck(this, ChangingTitle);
+
+ this.node = x;
+ this.letterfy(this.node.querySelector('h1'));
+ }
+
+ _createClass(ChangingTitle, [{
+ key: 'letterfy',
+ value: function letterfy(node) {
+ var text = node.innerText;
+ node.innerText = '';
+ node.classList.add('current');
+ for (var c in text) {
+ var span = document.createElement('span');
+ span.innerText = text[c];
+ span.classList.add('letter', 'in');
+ span.style.animationDelay = c * 0.1 + 's';
+ node.appendChild(span);
+ }
+ }
+ }, {
+ key: 'changeText',
+ value: function changeText(newText) {
+ var oldTitle = this.node.querySelector('.current');
+ var i = 0;
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
+
+ try {
+ for (var _iterator = oldTitle.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var letter = _step.value;
+
+ letter.style.animationDelay = i++ * 0.1 + 's';
+ letter.classList.remove('in');
+ letter.classList.add('out');
+ }
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
+ }
+ }
+
+ oldTitle.classList.remove('current');
+ var newTitle = document.createElement('h1');
+ newTitle.classList.add('current');
+ for (var c in newText) {
+ var span = document.createElement('span');
+ span.innerText = newText[c];
+ span.classList.add('letter', 'in');
+ span.style.animationDelay = c * 0.1 + 0.5 + 's';
+ newTitle.appendChild(span);
+ }
+ this.node.appendChild(newTitle);
+ setTimeout(this.removeNode(oldTitle), 2000);
+ }
+ }, {
+ key: 'removeNode',
+ value: function removeNode(x) {
+ return function () {
+ x.remove();
+ };
+ }
+ }]);
+
+ return ChangingTitle;
+}();
+
+;
+
+var ct = new ChangingTitle(document.querySelector('.changing-title'));
+var texts = ['Hi! I am नवन'];
+var count = 0;
+setInterval(function () {
+ ct.changeText(texts[++count % texts.length]);
+}, 2000);
diff --git a/js/menu.js b/js/menu.js
new file mode 100644
index 0000000..6c0ab53
--- /dev/null
+++ b/js/menu.js
@@ -0,0 +1,154 @@
+(function($) {
+
+ /*
+ Responsive Flat Menu
+ http://cssmenumaker.com/menu/responsive-flat-menu
+ */
+
+ $.fn.menumaker = function(options) {
+
+ var cssmenu = $(this),
+ settings = $.extend({
+ title: "Menu",
+ format: "dropdown",
+ sticky: false
+ }, options);
+
+ return this.each(function() {
+ cssmenu.prepend('<div id="menu-button">' + settings.title + '</div>');
+ $(this).find("#menu-button").on('click', function() {
+ $(this).toggleClass('menu-opened');
+ var mainmenu = $(this).next('ul');
+ if (mainmenu.hasClass('open')) {
+ mainmenu.hide().removeClass('open');
+ } else {
+ mainmenu.show().addClass('open');
+ if (settings.format === "dropdown") {
+ mainmenu.find('ul').show();
+ }
+ }
+ });
+
+ cssmenu.find('li ul').parent().addClass('has-sub');
+
+ multiTg = function() {
+ cssmenu.find(".has-sub").prepend('<span class="submenu-button"></span>');
+ cssmenu.find('.submenu-button').on('click', function() {
+ $(this).toggleClass('submenu-opened');
+ if ($(this).siblings('ul').hasClass('open')) {
+ $(this).siblings('ul').removeClass('open').hide();
+ } else {
+ $(this).siblings('ul').addClass('open').show();
+ }
+ });
+ };
+
+ if (settings.format === 'multitoggle') multiTg();
+ else cssmenu.addClass('dropdown');
+
+ if (settings.sticky === true) cssmenu.css('position', 'fixed');
+
+ resizeFix = function() {
+ if ($(window).width() > 768) {
+ cssmenu.find('ul').show();
+ }
+
+ if ($(window).width() <= 768) {
+ cssmenu.find('ul').hide().removeClass('open');
+ }
+ };
+ resizeFix();
+ return $(window).on('resize', resizeFix);
+
+ });
+ };
+})(jQuery);
+
+/*
+ By Osvaldas Valutis, www.osvaldas.info
+ Available for use under the MIT License
+*/
+
+;
+(function($, window, document, undefined) {
+ $.fn.doubleTapToGo = function(params) {
+ if (!('ontouchstart' in window) &&
+ !navigator.msMaxTouchPoints &&
+ !navigator.userAgent.toLowerCase().match(/windows phone os 7/i)) return false;
+
+ this.each(function() {
+ var curItem = false;
+
+ $(this).on('click', function(e) {
+ var item = $(this);
+ if (item[0] != curItem[0]) {
+ e.preventDefault();
+ curItem = item;
+ }
+ });
+
+ $(document).on('click touchstart MSPointerDown', function(e) {
+ var resetItem = true,
+ parents = $(e.target).parents();
+
+ for (var i = 0; i < parents.length; i++)
+ if (parents[i] == curItem[0])
+ resetItem = false;
+
+ if (resetItem)
+ curItem = false;
+ });
+ });
+ return this;
+ };
+})(jQuery, window, document);
+
+/**
+ * doubleTapToGoDecorator
+ * Adds the ability to remove the need for a second tap
+ * when in the mobile view
+ *
+ * @param {function} f - doubleTapToGo
+ */
+function doubleTapToGoDecorator(f) {
+ return function() {
+
+ this.each(function() {
+ $(this).on('click', function(e) {
+
+ // If mobile menu view
+ if ($('#menu-button').css('display') == 'block') {
+
+ // If this is not a submenu button
+ if (!$(e.target).hasClass('submenu-button')) {
+
+ // Remove the need for a second tap
+ window.location.href = $(e.target).attr('href');
+ }
+ }
+
+ });
+ });
+
+ return f.apply(this);
+ }
+}
+
+// Add decorator to the doubleTapToGo plugin
+jQuery.fn.doubleTapToGo = doubleTapToGoDecorator(jQuery.fn.doubleTapToGo);
+
+/**
+ * jQuery
+ */
+(function($) {
+ $(document).ready(function() {
+
+ $("#cssmenu").menumaker({
+ title: "Menu",
+ format: "multitoggle"
+ });
+
+ $('#cssmenu li:has(ul)').doubleTapToGo();
+
+ });
+})(jQuery); \ No newline at end of file