|
|
(386 intermediate revisions by 3 users not shown) |
Line 1: |
Line 1: |
− | <html lang="en" class="no-js"> | + | <html> |
| | | |
| + | <head> |
| + | <!-- jQuery --> |
| + | <script type="text/javascript" src="https://2017.igem.org/Template:NYU_Abu_Dhabi/jQuery?action=raw&ctype=text/javascript"></script> |
| + | <!-- Popper --> |
| + | <script type="text/javascript" src="https://2017.igem.org/Template:NYU_Abu_Dhabi/Popper?action=raw&ctype=text/javascript"></script> |
| + | <!-- Bootstrap --> |
| + | <link rel="stylesheet" href="https://2017.igem.org/Template:NYU_Abu_Dhabi/BootstrapCSS?action=raw&ctype=text/css" /> |
| + | <script type="text/javascript" src="https://2017.igem.org/Template:NYU_Abu_Dhabi/BootstrapJS?action=raw&ctype=text/javascript"></script> |
| | | |
| | | |
− | <style>
| |
− | .pw {
| |
− | position: absolute;
| |
− | z-index: 1;
| |
− | left: 0;
| |
− | right:0;
| |
− | top: 1;
| |
− | bottom: 15;
| |
− | margin-left: 500px;
| |
− | -webkit-perspective: 1400px;
| |
− | -moz-perspective: 1400px;
| |
− | perspective: 1400px;
| |
− | -webkit-perspective-origin: 10% 10%;
| |
− | -moz-perspective-origin: 10% 10%;
| |
− | perspective-origin: 10% 10%;
| |
− | background: #fff;
| |
− | }
| |
| | | |
− | #top-section {
| + | <!-- Reset CSS --> |
− | border: none; | + | <link rel="stylesheet" href="https://2017.igem.org/Template:NYU_Abu_Dhabi/ResetCSS?action=raw&ctype=text/css" /> |
− | height: 0px;}
| + | |
− | #content {
| + | |
− | border: none;}
| + | |
− | #sideMenu,
| + | |
− | #top_title {
| + | |
− | display: none;
| + | |
− | }
| + | |
| | | |
| | | |
− | #globalWrapper {
| + | <!-- BEGIN CUSTOM CSS --> |
− | font-size: inherit; | + | |
− | padding-bottom: 0;
| + | |
− | }
| + | |
| | | |
| + | <link rel="stylesheet" href="https://2017.igem.org/Template:NYU_Abu_Dhabi/CSS?action=raw&ctype=text/css" /> |
| + | <!-- <link rel="stylesheet" href="./style.css" /> --> |
| | | |
− | #top_menu_under {
| + | <link rel="stylesheet" href="https://2017.igem.org/Template:NYU_Abu_Dhabi/homeCSS?action=raw&ctype=text/css" /> |
− | height: 0px; | + | <!-- <link rel="stylesheet" href="./home.css" /> --> |
− | }
| + | |
| | | |
− | ul {
| + | <!-- END CUSTOM CSS --> |
− | list-style-image: none; //removes the iGEM wiki bullets | + | |
− | }
| + | |
− | </style>
| + | |
| | | |
− | <head> | + | <script> |
− | <meta charset="utf-8"> | + | window.onload = () => { |
− | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
| + | var activated; |
− | <meta name="description" content="">
| + | var svg = document.getElementById("hero-image").getSVGDocument(); |
− | <meta name="keywords" content="">
| + | |
− | <meta name="author" content="">
| + | |
− | <title>NYU Abu Dhabi</title>
| + | |
− | <!-- Styles -->
| + | |
− | <link rel="stylesheet" href="https://2017.igem.org/Team:NYU_Abu_Dhabi/assets/css/bootstrapmin?action=raw&ctype=text/css" type="text/css">
| + | |
− | <link rel="stylesheet" href="https://2017.igem.org/Team:NYU_Abu_Dhabi/assets/css/peicon7stroke?action=raw&ctype=text/css" type="text/css">
| + | |
− | <link rel="stylesheet" href="https://2017.igem.org/Team:NYU_Abu_Dhabi/assets/css/animatemin?action=raw&ctype=text/css" type="text/css">
| + | |
− | <link rel="stylesheet" href="https://2017.igem.org/Team:NYU_Abu_Dhabi/assets/css/animations?action=raw&ctype=text/css" type="text/css">
| + | |
− | <link rel="stylesheet" href="https://2017.igem.org/Team:NYU_Abu_Dhabi/assets/css/owlcarousel?action=raw&ctype=text/css" type="text/css">
| + | |
− | <link rel="stylesheet" type="text/css" href="https://2017.igem.org/Team:NYU_Abu_Dhabi/assets/css/style?action=raw&ctype=text/css">
| + | |
− | <script src="https://2017.igem.org/Team:NYU_Abu_Dhabi/assets/js/modernizrcustom?action=raw&ctype=text/javascript"></script>
| + | |
− | </head>
| + | |
| | | |
− | <!-- PRELOADER -->
| + | var links = [ |
− | <div class="preloader">
| + | ["bio", "https://2017.igem.org/Team:NYU_Abu_Dhabi/Description"], |
− | <div class="spinner">
| + | ["engineering", "https://2017.igem.org/Team:NYU_Abu_Dhabi/Description"], |
− | <div class="dot1"></div>
| + | ["demo", "https://2017.igem.org/Team:NYU_Abu_Dhabi/Demonstrate"], |
− | <div class="dot2"></div>
| + | ["integrated", "https://2017.igem.org/Team:NYU_Abu_Dhabi/HP/Gold_Integrated"], |
− | </div>
| + | ["hpsilver", "https://2017.igem.org/Team:NYU_Abu_Dhabi/HP/Silver"], |
− | </div>
| + | ["englab", "https://2017.igem.org/Team:NYU_Abu_Dhabi/Engineering"], |
− | <!-- end: PRELOADER -->
| + | ["design", "https://2017.igem.org/Team:NYU_Abu_Dhabi/Applied_Design"], |
| + | ["app", "https://2017.igem.org/Team:NYU_Abu_Dhabi/HP/Silver"], |
| + | ["attributions", "https://2017.igem.org/Team:NYU_Abu_Dhabi/Attributions"], |
| + | ["team", "https://2017.igem.org/Team:NYU_Abu_Dhabi/Team"], |
| + | ["parts", "https://2017.igem.org/Team:NYU_Abu_Dhabi/Parts"], |
| + | ["results", "https://2017.igem.org/Team:NYU_Abu_Dhabi/Results"], |
| + | ["protocols", "https://2017.igem.org/Team:NYU_Abu_Dhabi/Protocols"], |
| + | ["biolab", "https://2017.igem.org/Team:NYU_Abu_Dhabi/Biology"] |
| + | ] |
| | | |
− | <!-- NAVIGATION -->
| + | links.forEach(function (link) { |
− | <nav role="navigation">
| + | $(svg.getElementById(link[0])).hover(function () { |
− | <!-- Logo -->
| + | $(this).css('cursor', 'pointer'); |
− | <a href="index.html" class="logo logo-img">
| + | }, function () { |
− | <img src="https://static.igem.org/mediawiki/2017/b/b7/T--NYU_Abu_Dhabi--logo.png" class="img-responsive" alt="euforia">
| + | $(this).css('cursor', 'auto'); |
− | </a>
| + | }).click(function () { |
− | <!-- end: Logo -->
| + | window.location.href = link[1]; |
− | <!-- Menu -->
| + | }); |
− | <div class="navi-scroll">
| + | }); |
− | <div class="navi-col">
| + | |
− | <ul class="menu menu-v2">
| + | |
− | <li><a class="page-link" href="#home"><span data-hover="home">home</span><i class="fa fa-home"></i></a></li>
| + | |
− | <li><a class="page-link" href="#team"><span data-hover="team">team</span><i class="fa fa-briefcase"></i></a></li>
| + | |
− | <li><a class="page-link" href="#services"><span data-hover="services">services</span><i class="fa fa-lightbulb-o"></i></a></li>
| + | |
− | <!--<li><a class="page-link" href="#portfolio"><span data-hover="portfolio">portfolio</span><i class="fa fa-picture-o"></i></a></li>
| + | |
− | <li><a class="page-link" href="#blog"><span data-hover="blog">blog</span><i class="fa fa-pencil"></i></a></li>-->
| + | |
− | <li><a class="page-link" href="#contact"><span data-hover="contact">contact</span> <i class="fa fa-phone"></i></a></li>
| + | |
− | </ul>
| + | |
− | </div><!-- .navi-col -->
| + | |
− | </div><!-- .navi-scroll -->
| + | |
− | <!-- end: Menu -->
| + | |
− | </nav>
| + | |
− | <!-- end: NAVIGATION -->
| + | |
− | <section id="home" class="page-activ">
| + | |
− | <div class="pw">
| + | |
− | <!-- <div class="owl-carousel rotate-text">
| + | |
− | <h3><span class="color-default">स्वागतम्</span></h3>
| + | |
− | <div class="item">
| + | |
− | <h3><font face="Helvetica" color="red">Welcome</font></h3>
| + | |
− | </div>
| + | |
− | <div class="item">
| + | |
− | <h3><font face="Helvetica" color="blue">Hola!</font></h3>
| + | |
− | </div>
| + | |
− | <div class="item">
| + | |
− | <h3> <font face="Helvetica" color="orange">Bonjour</font></h3>
| + | |
− | </div>
| + | |
− | </div> -->
| + | |
− | <br>
| + | |
− | <img src="https://static.igem.org/mediawiki/2017/1/18/T--NYU_Abu_Dhabi--igemlogo.png" width="600" height="600" align="left">
| + | |
− | </div>
| + | |
− | </section>
| + | |
| | | |
− | <section id="team">
| |
− | <div class="content">
| |
− | <div class="container-fluid">
| |
− | <div class="row">
| |
− | <div class="col-lg-10 col-lg-offset-1">
| |
− | <div class="col-md-6 no-padding">
| |
− | <header><h1>Hello</h1></header>
| |
− | </div>
| |
− | </div>
| |
− | </div>
| |
− | </div>
| |
− | </div>
| |
− | </section>
| |
| | | |
− | <!-- PLUGIN SCRIPTS -->
| |
− | <script src="https://2017.igem.org/Team:NYU_Abu_Dhabi/assets/js/jquery213min?action=raw&ctype=text/javascript"></script>
| |
− | <script src="hhttps://2017.igem.org/Team:NYU_Abu_Dhabi/assets/js/bootstrapmin?action=raw&ctype=text/javascript"></script>
| |
− | <script src="https://2017.igem.org/Team:NYU_Abu_Dhabi/assets/js/jqueryeasingmin?action=raw&ctype=text/javascript"></script>
| |
− | <script src="https://2017.igem.org/Team:NYU_Abu_Dhabi/assets/js/jquerybackstretchmin?action=raw&ctype=text/javascript"></script>
| |
− | <script src="https://2017.igem.org/Team:NYU_Abu_Dhabi/assets/js/owlcarouselmin?action=raw&ctype=text/javascript"></script>
| |
− | <script src="https://2017.igem.org/Team:NYU_Abu_Dhabi/assets/js/jqueryhoverdir?action=raw&ctype=text/javascript"></script>
| |
− | <script type="text/javascript">
| |
− | /*
| |
− | * ----------------------------------------------------------
| |
− | * FUBCTIONS - Contact Validate
| |
− | * ----------------------------------------------------------
| |
− | */
| |
− | function contact_form_validate(t) {
| |
− | var e = void 0 !== t && t.length > 0 ? t : $("#contact-valid-form");
| |
− | e.each(function() {
| |
− | var t = $(this);
| |
− | t.find(".field-validation").each(function() {
| |
− | $(this).change(function() {
| |
− | if ($(this).siblings(".alert").remove().fadeOut("slow", function() {
| |
− | $(this).remove();
| |
− | }), "" !== $(this).val().trim()
| |
− | ) {
| |
− | var e = contact_field_validation(t, $(this));
| |
− | if (e.length > 0 && void 0 !== e[0].message && "" !== e[0].message && "success" !== e[0].message) {
| |
− | var i = '<div class="alert"><i class="fa fa-exclamation-triangle"></i> ' + e[0].message + "</div>";
| |
− | $(this).after(i), $(this).siblings(".alert").fadeIn("slow");
| |
− | }
| |
− | }
| |
− | })
| |
− | }), t.submit(function(e) {
| |
− | e.preventDefault(), $(this).find(".form-loader").fadeIn("slow");
| |
− |
| |
− | var i = $(this).attr("action");
| |
− | if (void 0 == i && "" == i)
| |
− | return !1;
| |
− | $(this).find(".alert").remove().fadeOut("fast", function() {
| |
− | $(this).remove();
| |
− | }), $(this).find(".alert-validate-form").fadeOut("fast", function() {
| |
− | $(this).empty();
| |
− | });
| |
− | var a = !1;
| |
− | return $(this).find(".field-validation").each(function() {
| |
− | var e = contact_field_validation(t, $(this));
| |
− | if (e.length > 0 && void 0 !== e[0].message && "" != e[0].message && "success" != e[0].message) {
| |
− | var i = '<div class="alert"><i class="fa fa-exclamation-triangle"></i> ' + e[0].message + "</div>";
| |
− | $(this).after(i), $(this).siblings(".alert").fadeIn(), a =! 0;
| |
− |
| |
− | }
| |
− | }), 1 == a ? ($(this).find(".form-loader").fadeOut("fast"), !1) : ($.ajax({
| |
− | type: "POST",
| |
− | url: i,
| |
− | data: $(this).serialize(),
| |
− | dataType: "json",
| |
− | success: function(e) {
| |
− | t.find(".form-loader").fadeOut("fast");
| |
− | var i = "1" == e.status ? !0 : !1, a = '<div class="alert ';
| |
− | a += 1 == i ? "success" : "error", a += '"><i class="fa fa-check-circle"></i> ' + e.text + '</div>', t.find(".alert-validate-form").html(a).fadeIn("fast", function() {
| |
− | $(this).delay(1e4).fadeOut("fast", function() {
| |
− | // $(this).remove();
| |
− | });
| |
− | }), 1 == i && t.find(".form-control").val("");
| |
− | },
| |
− | error: function() {
| |
− | t.find(".form-loader").fadeOut("fast");
| |
− | var e = '<div class="alert"><i class="fa fa-exclamation-triangle"></i> An error occured. Please try again later.</div>';
| |
− | t.find(".alert-validate-form").html(e).fadeIn("fast");
| |
− | }
| |
− | }), void 0)
| |
− | })
| |
− | })
| |
− | }
| |
− | function contact_field_validation(t, e) {
| |
− | if (void 0 !== t && t.length > 0) {
| |
− | var i = void 0 !== e && e.length > 0 ? e : t.find(".validate"), a = new Array;
| |
− | return i.each(function() {
| |
− | var t = $(this).attr("data-validation-type"), e = $(this).hasClass("required"), i = $(this).val().trim(), n = new Array;
| |
− | n.field_object = $(this), n.message = "success", 1 != e || "" != i && null !== i && void 0 !== i || (n.message = "This field is required"), "string" == t && "" != i && null !== i && void 0 !== i ? null == i.match(/^[a-z0-9 .\-]+$/i) && (n.message = "Invalid characters found.") : "email" == t && "" != i && null !== i && void 0 !== i ? null == i.match(/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/) && (n.message = "Please enter a valid email address.") : "phone" == t && "" != i && null !== i && void 0 !== i && null == i.match(/^\(?\+?[\d\(\-\s\)]+$/) && (n.message = "Invalid characters found."), a.push(n)
| |
− | }), a
| |
| } | | } |
− | } | + | </script> |
| + | </head> |
| | | |
| + | <body> |
| + | <div id="app"> |
| + | <!-- Navbar --> |
| + | <nav class="navbar navbar-expand-lg fixed-top navbar-light bg-light"> |
| + | <a class="navbar-brand" href="https://2017.igem.org/Team:NYU_Abu_Dhabi"> |
| + | <img src="https://static.igem.org/mediawiki/2017/0/0d/T--NYU_Abu_Dhabi--horizontal-logo.png" alt="" /> |
| + | </a> |
| + | <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" |
| + | aria-expanded="false" aria-label="Toggle navigation"> |
| + | <span class="navbar-toggler-icon"></span> |
| + | </button> |
| + | <div class="collapse navbar-collapse" id="navbarNavDropdown"> |
| + | <ul class="navbar-nav"> |
| + | <li class="nav-item"> |
| + | <a class="nav-link" href="https://2017.igem.org/Team:NYU_Abu_Dhabi">Home |
| + | <span class="sr-only">(current)</span> |
| + | </a> |
| + | </li> |
| + | <li class="nav-item dropdown"> |
| + | <a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
| + | Project |
| + | </a> |
| + | <div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink"> |
| + | <a class="dropdown-item" href="https://2017.igem.org/Team:NYU_Abu_Dhabi/Description">Our Project</a> |
| + | <a class="dropdown-item" href="https://2017.igem.org/Team:NYU_Abu_Dhabi/Results">Results</a> |
| + | <a class="dropdown-item" href="https://2017.igem.org/Team:NYU_Abu_Dhabi/Parts">Parts</a> |
| + | <a class="dropdown-item" href="https://2017.igem.org/Team:NYU_Abu_Dhabi/Demonstrate">Demo</a> |
| + | <a class="dropdown-item" href="https://2017.igem.org/Team:NYU_Abu_Dhabi/Applied_Design">Design</a> |
| + | </div> |
| + | </li> |
| | | |
− | /*
| + | <li class="nav-item"> |
− | * ----------------------------------------------------------
| + | <a class="nav-link" href="https://2017.igem.org/Team:NYU_Abu_Dhabi/Collaborations">Collaborations</a> |
− | * FUNCTIONS - Page Transitions
| + | </li> |
− | * ----------------------------------------------------------
| + | |
− | */
| + | |
− | PageTransitions = (function() {
| + | |
| | | |
− | var isAnimating = false,
| + | <li class="nav-item dropdown"> |
− | endCurrPage = true,
| + | <a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
− | endNextPage = false,
| + | Lab Notebook |
− | animEndEventNames = { | + | </a> |
− | 'WebkitAnimation': 'webkitAnimationEnd',
| + | <div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink"> |
− | 'OAnimation': 'oAnimationEnd',
| + | <a class="dropdown-item" href="https://2017.igem.org/Team:NYU_Abu_Dhabi/Biology">Biology</a> |
− | 'msAnimation': 'MSAnimationEnd',
| + | <a class="dropdown-item" href="https://2017.igem.org/Team:NYU_Abu_Dhabi/Engineering">Engineering</a> |
− | 'animation': 'animationend'
| + | <a class="dropdown-item" href="https://2017.igem.org/Team:NYU_Abu_Dhabi/Protocols">Protocols</a> |
− | }, | + | </div> |
− | animEndEventName = animEndEventNames[ Modernizr.prefixed('animation') ],
| + | </li> |
− | support = Modernizr.cssanimations; | + | |
| | | |
| + | <li class="nav-item dropdown"> |
| + | <a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
| + | Human Practices |
| + | </a> |
| + | <div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink"> |
| + | <a class="dropdown-item" href="https://2017.igem.org/Team:NYU_Abu_Dhabi/HP">Overview</a> |
| + | <a class="dropdown-item" href="https://2017.igem.org/Team:NYU_Abu_Dhabi/HP/Silver">Human Practices</a> |
| + | <a class="dropdown-item" href="https://2017.igem.org/Team:NYU_Abu_Dhabi/HP/Gold_Integrated">Integrated Human Practices</a> |
| + | <a class="dropdown-item" href="https://2017.igem.org/Team:NYU_Abu_Dhabi/Engagement">Engagement and Education</a> |
| + | </div> |
| + | </li> |
| | | |
− | function init(options) {
| + | <li class="nav-item"> |
| + | <a class="nav-link" href="https://2017.igem.org/Team:NYU_Abu_Dhabi/InterLab">Interlab</a> |
| + | </li> |
| | | |
− | $main = options.pages,
| + | <li class="nav-item dropdown"> |
− | $pages = $main.children('section'),
| + | <a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
− | menu = options.menu, | + | Team |
− | animcursor = options.animcursor, | + | </a> |
− | nextAnimcursor = options.nextAnimcursor, | + | <div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink"> |
− | pageStart = getPageActiv(),
| + | <a class="dropdown-item" href="https://2017.igem.org/Team:NYU_Abu_Dhabi/Team">Team</a> |
− | pageActiv = '',
| + | <a class="dropdown-item" href="https://2017.igem.org/Team:NYU_Abu_Dhabi/Attributions">Attributions</a> |
| + | </div> |
| + | </li> |
| + | </ul> |
| + | </div> |
| + | </nav> |
| | | |
− | $pages.each(function () {
| + | <!-- BEGIN CONTENT HERE https://static.igem.org/mediawiki/2017/b/b2/FinalImg.svg--> |
− | var $page = $(this);
| + | |
− | if ($page.attr('class')) {
| + | |
− | pageClass = $page.attr('class');
| + | |
− | }
| + | |
− | else {
| + | |
− | pageClass = "";
| + | |
− | }
| + | |
− | $page.data('originalClassList', pageClass);
| + | |
− | });
| + | |
| | | |
− | nextPage(animcursor, pageStart);
| + | <object id="hero-image" data="https://static.igem.org/mediawiki/2017/b/b2/FinalImg.svg" type="image/svg+xml"> </object> |
− | $(menu+' a[href="'+pageStart+'"]').addClass('active');
| + | |
| | | |
− | navigationPage();
| + | <!-- END CONTENT HERE --> |
| | | |
| + | <!-- Footer --> |
| + | <div class="footer"> |
| + | <div class="container-fluid"> |
| + | <div class="row"> |
| + | <div class="col-lg-4 footer-section"> |
| + | <p class="footer-text"> |
| + | NYU Abu Dhabi is a research university with a fully integrated liberal arts and science college. It draws students from around |
| + | the world, and prepares them for the challenges and opportunities of our interconnected world. |
| + | </br> |
| + | <a href="http://nyuad.nyu.edu/en/about.html">Read More</a> |
| + | </p> |
| + | </div> |
| + | <div class="col-lg-4 footer-section"> |
| + | <p class="footer-text"> |
| + | NYUAD Saadiyat Island </br> |
| + | Abu Dhabi, P.O. Box 129188, U.A.E </br> |
| + | <a href="mailto:nyuad.igem@nyu.edu">Email</a> |
| + | </br> |
| + | <a href="https://www.facebook.com/iGEMNYUAD/" target="_blank">Facebook</a> |
| + | </br> |
| + | </p> |
| + | </div> |
| + | <div class="col-lg-4 footer-section"> |
| + | <img class="footer-logo" src="https://static.igem.org/mediawiki/2017/7/71/IDT.png" /> |
| + | <img class="footer-logo2" src="https://static.igem.org/mediawiki/2017/2/2d/T--UrbanTundra_Edmonton--igemlogo.jpg" /> |
| + | <img class="footer-logo" src="https://static.igem.org/mediawiki/2017/c/c8/NYU_Abu_Dhabi.png" /> |
| + | </div> |
| + | </div> |
| + | </div> |
| + | </div> |
| + | </body> |
| | | |
− | }
| |
− |
| |
− |
| |
− | function navigationPage() {
| |
− |
| |
− | /* --- CLICK TO PAGE TRANSACTIONS --- */
| |
− | $(document).on("click", ".page-link", function (e) {
| |
− | e.preventDefault();
| |
− |
| |
− | ahref = $(this).attr('href').split("#");
| |
− | ahrefhash = '#'+ahref[1];
| |
− |
| |
− | // validate page
| |
− | if ( ahrefhash === "#"+pageActiv.attr('id') ) {
| |
− | return false;
| |
− | }
| |
− |
| |
− | animcursor = getAnimcursor(animcursor);
| |
− | //location.hash = ahrefhash;
| |
− | nextPage(animcursor, ahrefhash, $(this));
| |
− |
| |
− | });
| |
− |
| |
− | /* --- CLICJ TO PAGE LINK AJAX LOADER --- */
| |
− | $(document).on("click", ".ajax-loader", function (e) {
| |
− | e.preventDefault();
| |
− | clickToNextPage($(this));
| |
− | });
| |
− |
| |
− |
| |
− | }
| |
− |
| |
− |
| |
− | function clickToNextPage(dane) {
| |
− | var a = dane;
| |
− | activeMenuLink(a);
| |
− | animcursor = getAnimcursor( animcursor );
| |
− |
| |
− | var wzor = /ajax-loader/;
| |
− |
| |
− | if( wzor.test(dane.attr('class')) ) {
| |
− |
| |
− | var $this = dane,
| |
− | $remote = $this.data('remote') || $this.attr('href');
| |
− |
| |
− | $.ajax({
| |
− | url: $remote,
| |
− | cache: false,
| |
− | context: document.body
| |
− | })
| |
− | .done(function (html) {
| |
− |
| |
− | $section = $(html).children('section');
| |
− | $section_content = $section.children('div.content');
| |
− | $section_prev = $section.children('a.btn-prev');
| |
− |
| |
− | $($section_prev).addClass('page-link');
| |
− |
| |
− | $('#page-ajax').html($section_prev).append($section_content);
| |
− | $(".loader").fadeOut(1000);
| |
− | nextPage(animcursor, '#page-ajax');
| |
− | })
| |
− | .fail(function () {
| |
− | $('#page-ajax').html('<h1 class="text-center">Error - page not found!</h1>');
| |
− | $(".loader").fadeOut(1000);
| |
− | nextPage(animcursor, '#page-ajax');
| |
− | });
| |
− |
| |
− | } else {
| |
− | nextPage(animcursor, a.attr('href'));
| |
− | }
| |
− |
| |
− | }
| |
− |
| |
− | function updateAnimcursor(animid) {
| |
− |
| |
− | animcursor = animid;
| |
− | ++animcursor;
| |
− | //return animcursor;
| |
− | }
| |
− |
| |
− | function updateNextAnimcursor(animid) {
| |
− |
| |
− | nextAnimcursor = false;
| |
− | if(animid) {
| |
− | nextAnimcursor = true;
| |
− | }
| |
− | return nextAnimcursor;
| |
− |
| |
− | }
| |
− |
| |
− | function getAnimcursor(animcursor) {
| |
− |
| |
− | if (nextAnimcursor) {
| |
− | ++animcursor;
| |
− | if (animcursor > 67) {
| |
− | animcursor = 1;
| |
− | }
| |
− | }
| |
− | return animcursor;
| |
− | }
| |
− |
| |
− | function activeMenuLink(pageId) {
| |
− |
| |
− | if ( !pageId ) {
| |
− | return false;
| |
− | }
| |
− | var nameClass = /page-sublink/;
| |
− | if ( !nameClass.test(pageId.attr('class')) ) {
| |
− |
| |
− | $(menu+' li a').removeClass('active');
| |
− | $(menu+' a[href="'+pageId.attr('href')+'"]').addClass('active');
| |
− | }
| |
− | }
| |
− |
| |
− | function getPageActiv(page) {
| |
− |
| |
− | if( location.hash !== "") {
| |
− | return location.hash;
| |
− | }
| |
− | else if(page) {
| |
− | return page;
| |
− | }
| |
− | else {
| |
− | return '#'+$("section.page-activ").attr('id');
| |
− | }
| |
− | }
| |
− |
| |
− | function validatePage(pageId) {
| |
− |
| |
− | if(document.querySelector(pageId)) {
| |
− |
| |
− | return true;
| |
− | } else {
| |
− | return false;
| |
− | }
| |
− | }
| |
− |
| |
− | function nextPage(animation,pageId,menuLink) {
| |
− |
| |
− | if( isAnimating ) {
| |
− | return false;
| |
− | }
| |
− |
| |
− | isAnimating = true;
| |
− |
| |
− |
| |
− | if( ! validatePage(pageId) ) {
| |
− |
| |
− | pageId = '#error404';
| |
− |
| |
− | }
| |
− |
| |
− | activeMenuLink( menuLink );
| |
− |
| |
− | var $currPage = $(pageActiv);
| |
− | var $nextPage = $(pageId).addClass( 'section-current' ), outClass = '', inClass = '';
| |
− |
| |
− | animationClass = getClassAnimate(animation);
| |
− |
| |
− | $currPage.addClass( animationClass.out ).on( animEndEventName, function() {
| |
− | $currPage.off( animEndEventName );
| |
− | endCurrPage = true;
| |
− | if( endNextPage ) {
| |
− | onEndAnimation( $currPage, $nextPage );
| |
− | }
| |
− |
| |
− | } );
| |
− |
| |
− |
| |
− | $nextPage.addClass( animationClass.in ).on( animEndEventName, function() {
| |
− | $nextPage.off( animEndEventName );
| |
− | endNextPage = true;
| |
− | if( endCurrPage ) {
| |
− | onEndAnimation( $currPage, $nextPage );
| |
− | }
| |
− |
| |
− | } );
| |
− |
| |
− | if( !support ) {
| |
− | onEndAnimation( $currPage, $nextPage );
| |
− | }
| |
− |
| |
− | }
| |
− |
| |
− | function onEndAnimation( $outpage, $inpage ) {
| |
− | endCurrPage = false;
| |
− | endNextPage = false;
| |
− | resetPage( $outpage, $inpage );
| |
− | isAnimating = false;
| |
− | }
| |
− |
| |
− | function resetPage( $outpage, $inpage ) {
| |
− |
| |
− | $outpage.attr( 'class', $outpage.data( 'originalClassList' ) );
| |
− | $inpage.attr( 'class', $inpage.data( 'originalClassList' ) + ' section-current' );
| |
− | pageActiv = $inpage;
| |
− | }
| |
− |
| |
− |
| |
− | function getClassAnimate(idAnimation) {
| |
− |
| |
− | switch( idAnimation ) {
| |
− |
| |
− | case 1:
| |
− | outClass = 'pt-page-moveToLeft';
| |
− | inClass = 'pt-page-moveFromRight';
| |
− | break;
| |
− | case 2:
| |
− | outClass = 'pt-page-moveToRight';
| |
− | inClass = 'pt-page-moveFromLeft';
| |
− | break;
| |
− | case 3:
| |
− | outClass = 'pt-page-moveToTop';
| |
− | inClass = 'pt-page-moveFromBottom';
| |
− | break;
| |
− | case 4:
| |
− | outClass = 'pt-page-moveToBottom';
| |
− | inClass = 'pt-page-moveFromTop';
| |
− | break;
| |
− | case 5:
| |
− | outClass = 'pt-page-fade';
| |
− | inClass = 'pt-page-moveFromRight pt-page-ontop';
| |
− | break;
| |
− | case 6:
| |
− | outClass = 'pt-page-fade';
| |
− | inClass = 'pt-page-moveFromLeft pt-page-ontop';
| |
− | break;
| |
− | case 7:
| |
− | outClass = 'pt-page-fade';
| |
− | inClass = 'pt-page-moveFromBottom pt-page-ontop';
| |
− | break;
| |
− | case 8:
| |
− | outClass = 'pt-page-fade';
| |
− | inClass = 'pt-page-moveFromTop pt-page-ontop';
| |
− | break;
| |
− | case 9:
| |
− | outClass = 'pt-page-moveToLeftFade';
| |
− | inClass = 'pt-page-moveFromRightFade';
| |
− | break;
| |
− | case 10:
| |
− | outClass = 'pt-page-moveToRightFade';
| |
− | inClass = 'pt-page-moveFromLeftFade';
| |
− | break;
| |
− | case 11:
| |
− | outClass = 'pt-page-moveToTopFade';
| |
− | inClass = 'pt-page-moveFromBottomFade';
| |
− | break;
| |
− | case 12:
| |
− | outClass = 'pt-page-moveToBottomFade';
| |
− | inClass = 'pt-page-moveFromTopFade';
| |
− | break;
| |
− | case 13:
| |
− | outClass = 'pt-page-moveToLeftEasing pt-page-ontop';
| |
− | inClass = 'pt-page-moveFromRight';
| |
− | break;
| |
− | case 14:
| |
− | outClass = 'pt-page-moveToRightEasing pt-page-ontop';
| |
− | inClass = 'pt-page-moveFromLeft';
| |
− | break;
| |
− | case 15:
| |
− | outClass = 'pt-page-moveToTopEasing pt-page-ontop';
| |
− | inClass = 'pt-page-moveFromBottom';
| |
− | break;
| |
− | case 16:
| |
− | outClass = 'pt-page-moveToBottomEasing pt-page-ontop';
| |
− | inClass = 'pt-page-moveFromTop';
| |
− | break;
| |
− | case 17:
| |
− | outClass = 'pt-page-scaleDown';
| |
− | inClass = 'pt-page-moveFromRight pt-page-ontop';
| |
− | break;
| |
− | case 18:
| |
− | outClass = 'pt-page-scaleDown';
| |
− | inClass = 'pt-page-moveFromLeft pt-page-ontop';
| |
− | break;
| |
− | case 19:
| |
− | outClass = 'pt-page-scaleDown';
| |
− | inClass = 'pt-page-moveFromBottom pt-page-ontop';
| |
− | break;
| |
− | case 20:
| |
− | outClass = 'pt-page-scaleDown';
| |
− | inClass = 'pt-page-moveFromTop pt-page-ontop';
| |
− | break;
| |
− | case 21:
| |
− | outClass = 'pt-page-scaleDown';
| |
− | inClass = 'pt-page-scaleUpDown pt-page-delay300';
| |
− | break;
| |
− | case 22:
| |
− | outClass = 'pt-page-scaleDownUp';
| |
− | inClass = 'pt-page-scaleUp pt-page-delay300';
| |
− | break;
| |
− | case 23:
| |
− | outClass = 'pt-page-moveToLeft pt-page-ontop';
| |
− | inClass = 'pt-page-scaleUp';
| |
− | break;
| |
− | case 24:
| |
− | outClass = 'pt-page-moveToRight pt-page-ontop';
| |
− | inClass = 'pt-page-scaleUp';
| |
− | break;
| |
− | case 25:
| |
− | outClass = 'pt-page-moveToTop pt-page-ontop';
| |
− | inClass = 'pt-page-scaleUp';
| |
− | break;
| |
− | case 26:
| |
− | outClass = 'pt-page-moveToBottom pt-page-ontop';
| |
− | inClass = 'pt-page-scaleUp';
| |
− | break;
| |
− | case 27:
| |
− | outClass = 'pt-page-scaleDownCenter';
| |
− | inClass = 'pt-page-scaleUpCenter pt-page-delay400';
| |
− | break;
| |
− | case 28:
| |
− | outClass = 'pt-page-rotateRightSideFirst';
| |
− | inClass = 'pt-page-moveFromRight pt-page-delay200 pt-page-ontop';
| |
− | break;
| |
− | case 29:
| |
− | outClass = 'pt-page-rotateLeftSideFirst';
| |
− | inClass = 'pt-page-moveFromLeft pt-page-delay200 pt-page-ontop';
| |
− | break;
| |
− | case 30:
| |
− | outClass = 'pt-page-rotateTopSideFirst';
| |
− | inClass = 'pt-page-moveFromTop pt-page-delay200 pt-page-ontop';
| |
− | break;
| |
− | case 31:
| |
− | outClass = 'pt-page-rotateBottomSideFirst';
| |
− | inClass = 'pt-page-moveFromBottom pt-page-delay200 pt-page-ontop';
| |
− | break;
| |
− | case 32:
| |
− | outClass = 'pt-page-flipOutRight';
| |
− | inClass = 'pt-page-flipInLeft pt-page-delay500';
| |
− | break;
| |
− | case 33:
| |
− | outClass = 'pt-page-flipOutLeft';
| |
− | inClass = 'pt-page-flipInRight pt-page-delay500';
| |
− | break;
| |
− | case 34:
| |
− | outClass = 'pt-page-flipOutTop';
| |
− | inClass = 'pt-page-flipInBottom pt-page-delay500';
| |
− | break;
| |
− | case 35:
| |
− | outClass = 'pt-page-flipOutBottom';
| |
− | inClass = 'pt-page-flipInTop pt-page-delay500';
| |
− | break;
| |
− | case 36:
| |
− | outClass = 'pt-page-rotateFall pt-page-ontop';
| |
− | inClass = 'pt-page-scaleUp';
| |
− | break;
| |
− | case 37:
| |
− | outClass = 'pt-page-rotateOutNewspaper';
| |
− | inClass = 'pt-page-rotateInNewspaper pt-page-delay500';
| |
− | break;
| |
− | case 38:
| |
− | outClass = 'pt-page-rotatePushLeft';
| |
− | inClass = 'pt-page-moveFromRight';
| |
− | break;
| |
− | case 39:
| |
− | outClass = 'pt-page-rotatePushRight';
| |
− | inClass = 'pt-page-moveFromLeft';
| |
− | break;
| |
− | case 40:
| |
− | outClass = 'pt-page-rotatePushTop';
| |
− | inClass = 'pt-page-moveFromBottom';
| |
− | break;
| |
− | case 41:
| |
− | outClass = 'pt-page-rotatePushBottom';
| |
− | inClass = 'pt-page-moveFromTop';
| |
− | break;
| |
− | case 42:
| |
− | outClass = 'pt-page-rotatePushLeft';
| |
− | inClass = 'pt-page-rotatePullRight pt-page-delay180';
| |
− | break;
| |
− | case 43:
| |
− | outClass = 'pt-page-rotatePushRight';
| |
− | inClass = 'pt-page-rotatePullLeft pt-page-delay180';
| |
− | break;
| |
− | case 44:
| |
− | outClass = 'pt-page-rotatePushTop';
| |
− | inClass = 'pt-page-rotatePullBottom pt-page-delay180';
| |
− | break;
| |
− | case 45:
| |
− | outClass = 'pt-page-rotatePushBottom';
| |
− | inClass = 'pt-page-rotatePullTop pt-page-delay180';
| |
− | break;
| |
− | case 46:
| |
− | outClass = 'pt-page-rotateFoldLeft';
| |
− | inClass = 'pt-page-moveFromRightFade';
| |
− | break;
| |
− | case 47:
| |
− | outClass = 'pt-page-rotateFoldRight';
| |
− | inClass = 'pt-page-moveFromLeftFade';
| |
− | break;
| |
− | case 48:
| |
− | outClass = 'pt-page-rotateFoldTop';
| |
− | inClass = 'pt-page-moveFromBottomFade';
| |
− | break;
| |
− | case 49:
| |
− | outClass = 'pt-page-rotateFoldBottom';
| |
− | inClass = 'pt-page-moveFromTopFade';
| |
− | break;
| |
− | case 50:
| |
− | outClass = 'pt-page-moveToRightFade';
| |
− | inClass = 'pt-page-rotateUnfoldLeft';
| |
− | break;
| |
− | case 51:
| |
− | outClass = 'pt-page-moveToLeftFade';
| |
− | inClass = 'pt-page-rotateUnfoldRight';
| |
− | break;
| |
− | case 52:
| |
− | outClass = 'pt-page-moveToBottomFade';
| |
− | inClass = 'pt-page-rotateUnfoldTop';
| |
− | break;
| |
− | case 53:
| |
− | outClass = 'pt-page-moveToTopFade';
| |
− | inClass = 'pt-page-rotateUnfoldBottom';
| |
− | break;
| |
− | case 54:
| |
− | outClass = 'pt-page-rotateRoomLeftOut pt-page-ontop';
| |
− | inClass = 'pt-page-rotateRoomLeftIn';
| |
− | break;
| |
− | case 55:
| |
− | outClass = 'pt-page-rotateRoomRightOut pt-page-ontop';
| |
− | inClass = 'pt-page-rotateRoomRightIn';
| |
− | break;
| |
− | case 56:
| |
− | outClass = 'pt-page-rotateRoomTopOut pt-page-ontop';
| |
− | inClass = 'pt-page-rotateRoomTopIn';
| |
− | break;
| |
− | case 57:
| |
− | outClass = 'pt-page-rotateRoomBottomOut pt-page-ontop';
| |
− | inClass = 'pt-page-rotateRoomBottomIn';
| |
− | break;
| |
− | case 58:
| |
− | outClass = 'pt-page-rotateCubeLeftOut pt-page-ontop';
| |
− | inClass = 'pt-page-rotateCubeLeftIn';
| |
− | break;
| |
− | case 59:
| |
− | outClass = 'pt-page-rotateCubeRightOut pt-page-ontop';
| |
− | inClass = 'pt-page-rotateCubeRightIn';
| |
− | break;
| |
− | case 60:
| |
− | outClass = 'pt-page-rotateCubeTopOut pt-page-ontop';
| |
− | inClass = 'pt-page-rotateCubeTopIn';
| |
− | break;
| |
− | case 61:
| |
− | outClass = 'pt-page-rotateCubeBottomOut pt-page-ontop';
| |
− | inClass = 'pt-page-rotateCubeBottomIn';
| |
− | break;
| |
− | case 62:
| |
− | outClass = 'pt-page-rotateCarouselLeftOut pt-page-ontop';
| |
− | inClass = 'pt-page-rotateCarouselLeftIn';
| |
− | break;
| |
− | case 63:
| |
− | outClass = 'pt-page-rotateCarouselRightOut pt-page-ontop';
| |
− | inClass = 'pt-page-rotateCarouselRightIn';
| |
− | break;
| |
− | case 64:
| |
− | outClass = 'pt-page-rotateCarouselTopOut pt-page-ontop';
| |
− | inClass = 'pt-page-rotateCarouselTopIn';
| |
− | break;
| |
− | case 65:
| |
− | outClass = 'pt-page-rotateCarouselBottomOut pt-page-ontop';
| |
− | inClass = 'pt-page-rotateCarouselBottomIn';
| |
− | break;
| |
− | case 66:
| |
− | outClass = 'pt-page-rotateSidesOut';
| |
− | inClass = 'pt-page-rotateSidesIn pt-page-delay200';
| |
− | break;
| |
− | case 67:
| |
− | outClass = 'pt-page-rotateSlideOut';
| |
− | inClass = 'pt-page-rotateSlideIn';
| |
− | break;
| |
− |
| |
− | }
| |
− |
| |
− | return anim = {
| |
− | 'out': outClass,
| |
− | 'in': inClass
| |
− | };
| |
− |
| |
− | }
| |
− |
| |
− |
| |
− |
| |
− | return { init : init, updateAnimcursor: updateAnimcursor };
| |
− |
| |
− | })();
| |
− | </script>
| |
− | <script src="https://2017.igem.org/Team:NYU_Abu_Dhabi/assets/js/custom?action=raw&ctype=text/javascript"></script>
| |
| </html> | | </html> |