Difference between revisions of "Team:USTC"

Line 1: Line 1:
 
<html>
 
<html>
 +
<link rel="stylesheet" type="text/css" href="https://2015.igem.org/Team:USTC/css/reset.css?action=raw&ctype=text/css">
 +
<link rel="stylesheet" type="text/css" href="https://2015.igem.org/Template:USTC/css/materialize.min.css?action=raw&ctype=text/css">
 +
<link rel="stylesheet" type="text/css" href="https://2015.igem.org/Team:USTC/css/indexstyle.css?action=raw&ctype=text/css">
 +
<script type="text/javascript" src="https://2015.igem.org/Template:USTC/js/jquery-2.1.1.min.js?action=raw&ctype=text/javascript"></script>
 +
<script type="text/javascript" src="https://2015.igem.org/Team:USTC/js/easing.min.js?action=raw&ctype=text/javascript" ></script>
 +
<script type="text/javascript" src="https://2015.igem.org/Team:USTC/js/fullpage.min.js?action=raw&ctype=text/javascript" ></script>
 +
<script type="text/javascript" src="https://2015.igem.org/Template:USTC/js/materialize.min.js?action=raw&ctype=text/javascript"></script>
 +
<script type="text/javascript" >
 +
function checkInview(index, nextIndex, direction) {
 +
    $('.inview').css("-webkit-transition-delay", '0ms').css("-o-transition-delay", '0ms').css("transition-delay", '0ms');
 +
    $('.inview').removeClass('inview');
 +
    var $section = $('#fullpage .section').eq(nextIndex - 1);
 +
    $section.find('.check-inview').each(function(i) {
 +
        var delay = 800 + 30 * (i + 1);
 +
        $(this).css("-webkit-transition-delay", delay + 'ms').css("-o-transition-delay", delay + 'ms').css("transition-delay", delay + 'ms');
 +
        $(this).addClass('inview');
 +
    });
 +
    // here is the navigationPage's transition.
 +
    $("#navi .col.s3").css("-webkit-transition-delay", '0ms').css("-o-transition-delay", '0ms').css("transition-delay", '0ms');
 +
    $("#navi .col.s3").removeClass('inview');
 +
    if (nextIndex == 3) {
 +
        $("#navi .col.s3").each(function(i) {
 +
            var delay;
 +
            if (i < 4) {
 +
                delay = 800 + 30 * 2 * i;
 +
            } else {
 +
                delay = 800 + 30 * (2 * i - 7);
 +
            }
 +
            $(this).css("-webkit-transition-delay", delay + 'ms').css("-o-transition-delay", delay + 'ms').css("transition-delay", delay + 'ms');
 +
            $(this).addClass('inview');
 +
        });
 +
    }
 +
}
 +
window.onload = function() {
 +
    $('.slider').slider({
 +
        full_width: true
 +
    });
 +
    $('#fullpage').fullpage({
 +
        anchors: ['welcomePage', 'introPage', 'navigationsPage'],
 +
        menu: '#menu',
 +
        responsive: 1000,
 +
        onLeave: checkInview
 +
    });
 +
    $(window).resize();
 +
    checkInview(0, 1, 'down');
 +
    $(".loading").fadeOut();
 +
    $("#fullpage").fadeIn();
 +
    $("#menu").fadeIn();
 +
};
 +
</script>
 +
 
<div class="loading">
 
<div class="loading">
 
     <div class="preloader-wrapper big active">
 
     <div class="preloader-wrapper big active">
Line 213: Line 264:
 
     </div>
 
     </div>
 
</div>
 
</div>
<script type="text/javascript">
 
function checkInview(index, nextIndex, direction) {
 
    $('.inview').css("-webkit-transition-delay", '0ms').css("-o-transition-delay", '0ms').css("transition-delay", '0ms');
 
    $('.inview').removeClass('inview');
 
    var $section = $('#fullpage .section').eq(nextIndex - 1);
 
    $section.find('.check-inview').each(function(i) {
 
        var delay = 800 + 30 * (i + 1);
 
        $(this).css("-webkit-transition-delay", delay + 'ms').css("-o-transition-delay", delay + 'ms').css("transition-delay", delay + 'ms');
 
        $(this).addClass('inview');
 
    });
 
    // here is the navigationPage's transition.
 
    $("#navi .col.s3").css("-webkit-transition-delay", '0ms').css("-o-transition-delay", '0ms').css("transition-delay", '0ms');
 
    $("#navi .col.s3").removeClass('inview');
 
    if (nextIndex == 3) {
 
        $("#navi .col.s3").each(function(i) {
 
            var delay;
 
            if (i < 4) {
 
                delay = 800 + 30 * 2 * i;
 
            } else {
 
                delay = 800 + 30 * (2 * i - 7);
 
            }
 
            $(this).css("-webkit-transition-delay", delay + 'ms').css("-o-transition-delay", delay + 'ms').css("transition-delay", delay + 'ms');
 
            $(this).addClass('inview');
 
        });
 
    }
 
}
 
window.onload = function() {
 
    $('.slider').slider({
 
        full_width: true
 
    });
 
    $('#fullpage').fullpage({
 
        anchors: ['welcomePage', 'introPage', 'navigationsPage'],
 
        menu: '#menu',
 
        responsive: 1000,
 
        onLeave: checkInview
 
    });
 
    $(window).resize();
 
    checkInview(0, 1, 'down');
 
    $(".loading").fadeOut();
 
    $("#fullpage").fadeIn();
 
    $("#menu").fadeIn();
 
};
 
</script>
 
  
 
</html>
 
</html>

Revision as of 08:07, 5 September 2015