Difference between revisions of "Template:Jilin China"

 
(28 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
<html>
 
<html>
 
 
 +
 
<style type="text/css">
 
<style type="text/css">
 
#top_title{display: none;}
 
#top_title{display: none;}
Line 6: Line 7:
 
#top_menu_under{display: none;}
 
#top_menu_under{display: none;}
 
body {
 
body {
background: url(https://static.igem.org/mediawiki/2017/a/a8/T--Jilin_China--_sec_bg_m.jpg) no-repeat 50% 150px !important;background-attachment:fixed !important;
+
background: url(https://static.igem.org/mediawiki/2017/5/53/T--Jilin_China--_sec_bg_m.png) no-repeat 50% 100px !important;background-attachment:fixed !important;
height: 2000px;
+
 
font-family: verdana,tahoma,sans-serif,helvetica;
 
font-family: verdana,tahoma,sans-serif,helvetica;
 
min-width: 1280px;
 
min-width: 1280px;
 
}
 
}
#globalWrapper{padding: 0px;}
+
table{
 +
border: none;
 +
margin: 0;
 +
padding: 0;
 +
border-left: 1px solid #229D73 !important;
 +
border-bottom: 1px solid #229D73 !important;
 +
}
 +
td,th{
 +
border: none !important;
 +
border-right: 1px solid #229D73 !important;
 +
border-top: 1px solid #229D73 !important;
 +
padding: 5px 10px !important;
 +
background: #e2f7ff !important;
 +
color: #229D73 !important;
 +
}
 +
th{ background: #b4e1de !important;}
 +
#globalWrapper{
 +
padding: 0px;
 +
}
 +
.float{position: fixed; right: 2%; bottom: 0%; z-index: 999; display: none;}
 
.mw-content-ltr ul, .mw-content-rtl .mw-content-ltr ul{margin: 0;}
 
.mw-content-ltr ul, .mw-content-rtl .mw-content-ltr ul{margin: 0;}
 
#content{
 
#content{
Line 122: Line 141:
 
}
 
}
 
.mj_menu_pro_bg div{
 
.mj_menu_pro_bg div{
background-color: rgba(34,157,115,0.1);
+
background-color: rgba(34,157,115,0.6);
 
transition:all 0.6s;
 
transition:all 0.6s;
 
-moz-transition:all 0.6s;
 
-moz-transition:all 0.6s;
Line 129: Line 148:
 
}
 
}
 
.nav li .submenu a {
 
.nav li .submenu a {
color: #229d73;
+
color: #FFFFFF;
 
height: 30px;
 
height: 30px;
 
line-height: 30px;
 
line-height: 30px;
Line 137: Line 156:
 
}
 
}
 
.nav li .submenu .mj_menu_pro_bg div:hover{
 
.nav li .submenu .mj_menu_pro_bg div:hover{
background-color: #229d73;
 
 
background-image: url(https://static.igem.org/mediawiki/2017/5/52/T--Jilin_China--_hover2.png);
 
background-image: url(https://static.igem.org/mediawiki/2017/5/52/T--Jilin_China--_hover2.png);
 
background-repeat: no-repeat;
 
background-repeat: no-repeat;
Line 149: Line 167:
 
/*home page*/
 
/*home page*/
 
.home_01,.home_02,.home_03,.home_04{
 
.home_01,.home_02,.home_03,.home_04{
width: 100%;
+
width: 100%; position: relative; box-sizing: border-box;
position: relative;
+
}
box-sizing: border-box;
+
.home_01{background-color: #d1f1fe; padding: 200px 0;}
 +
.home_01 .home_01_box{}
 +
.home_01 .home_01_box .home_01_content{width: 1100px; height: 600px; margin: auto;}
 +
.video,.source{width: 100%;}
 +
@media (max-width:1800px){
 +
.home_01{padding: 180px 0;}
 +
}
 +
@media (max-width:1600px){
 +
.home_01{padding: 160px 0 140px;}
 
}
 
}
.home_01{}
 
.home_01 .home_01_box{position: absolute; left: 0px; top: 160px; width: 100%;}
 
.home_01 .home_01_box .home_01_content{width: 1100px; height: 600px; margin: auto; border: 1px solid red;}
 
 
 
 
.home_02{}
 
.home_02{}
.home_02 .home_02_box{position: absolute; left: 0px; top: 25%; width: 100%;}
+
.home_02 .home_02_box{position: absolute; left: 0px; top: 17%; width: 100%;}
 
.home_02 .home_02_content{width: 78%; margin: auto; text-align: center;}
 
.home_02 .home_02_content{width: 78%; margin: auto; text-align: center;}
 
.home_02 .title{font-size: 24px; font-weight: bold; line-height: 100px;}
 
.home_02 .title{font-size: 24px; font-weight: bold; line-height: 100px;}
 
.home_02 .title span{font-size: 36px; font-weight: bold;}
 
.home_02 .title span{font-size: 36px; font-weight: bold;}
.home_02 .content{font-size: 20px; line-height: 60px;}
+
.home_02 .content{font-size: 20px; line-height: 54px; text-align: left; text-indent: 40px; }
 
@media (max-width:1700px){
 
@media (max-width:1700px){
.home_02 .home_02_box{ top: 20%;}
+
.home_02 .home_02_box{ top: 14%;}
 
.home_02 .title{font-size: 20px; line-height: 80px;}
 
.home_02 .title{font-size: 20px; line-height: 80px;}
 
.home_02 .title span{font-size: 30px;}
 
.home_02 .title span{font-size: 30px;}
.home_02 .content{font-size: 18px; line-height: 54px;}
+
.home_02 .content{font-size: 18px; line-height: 48px;}
 
}
 
}
 
@media (max-width:1500px){
 
@media (max-width:1500px){
.home_02 .home_02_box{ top: 20%;}
+
.home_02 .home_02_box{ top: 14%;}
 
.home_02 .title{font-size: 20px; line-height: 80px;}
 
.home_02 .title{font-size: 20px; line-height: 80px;}
 
.home_02 .title span{font-size: 30px;}
 
.home_02 .title span{font-size: 30px;}
.home_02 .content{font-size: 18px; line-height: 46px;}
+
.home_02 .content{font-size: 18px; line-height: 42px;}
 
}
 
}
 
 
 
 
 
.home_03{}
 
.home_03{}
.home_03 .home_03_box{position: absolute; left: 0px; top: 160px; width: 100%;}
+
.home_03 .home_03_box{position: absolute; left: 0px; top: 100px; width: 100%;}
.home_03 .home_03_box .home_03_content{width: 1100px; height: 600px; margin: auto; border: 1px solid red;}
+
.home_03 .home_03_box .home_03_content{width: 1280px; margin: auto;}
+
@media (max-width:1700px){
.home_04{}
+
.home_03 .home_03_box{position: absolute; left: 0px; top: 50px; width: 100%;}
.home_04 .home_04_box{position: absolute; left: 0px; top: 160px; width: 100%;}
+
}
.home_04 .home_04_box .home_04_content{width: 1100px; height: 600px; margin: auto; border: 1px solid red;}
+
@media (max-width:1550px){
 +
.home_03 .home_03_box{position: absolute; left: 0px; top: 10px; width: 100%;}
 +
}
 
 
 +
.home_04{ background-color:#ededed ; border-bottom: 24px solid #14243f; box-sizing: border-box;}
  
 
/**二级页1**/
 
/**二级页1**/
 
li{ list-style: none; margin: 0; vertical-align: top;}
 
li{ list-style: none; margin: 0; vertical-align: top;}
 +
ul.list{margin: 0.3em 0 0 3.2em;}
 +
ul.list li{list-style: square; line-height: 34px;}
 +
ol.list li{list-style: decimal; line-height: 34px;}
 
         ul{ margin: 0; padding: 0;}
 
         ul{ margin: 0; padding: 0;}
 +
        .banner{position: relative;}
 
         .banner img{width: 100%;}
 
         .banner img{width: 100%;}
 +
        .banner .menu{position: absolute; left: 22%; top: 69%; font-size: 38px; color: #FFFFFF; font-family: verdana,tahoma,sans-serif,helvetica;}
 +
       
 +
        #HQ_page p{font-size: 16px !important;}
 
          
 
          
         .sec_box{width: 55%; min-width: 600px; padding:140px 0 0; margin: 0 0 0 30%; box-sizing: border-box; background: #FFFFFF;}
+
         .sec_box{width: 55%; min-width: 600px; padding:140px 0 0; margin: 0 0 0 30%; box-sizing: border-box; color: #434343 !important;}
         .h1_title{color: #229d73; font-weight: bold; line-height: 50px; height: 50px;background: url(https://static.igem.org/mediawiki/2017/4/41/T--Jilin_China--_h1_title_bg.png) no-repeat 10px 50%; padding-left: 60px;}
+
         .h1_title{color: #229d73; font-size: 20px !important; font-weight: bold; line-height: 50px; height: 50px;background: url(https://static.igem.org/mediawiki/2017/4/41/T--Jilin_China--_h1_title_bg.png) no-repeat 0px 50%; padding-left: 50px;}
.h1_content{margin: 0 4.5%;}
+
.h1_content{margin: 0 4.5%; font-size: 16px !important;}
 
         .h1_content p{line-height: 30px; text-indent: 26px;}
 
         .h1_content p{line-height: 30px; text-indent: 26px;}
         .h1_content .pic_box{text-align: center; border: 1px solid darkgrey; border-radius: 20px; line-height: 30px; padding: 5px; margin-bottom:10px;}
+
         .h1_content .pic_box{text-align: center; border: 1px solid darkgrey; border-radius: 20px; line-height: 30px; padding: 5px; margin-bottom:10px; font-size: 14px; color: #6d6c6c;}
 
         .h1_content img{margin: auto; max-width: 100%;}
 
         .h1_content img{margin: auto; max-width: 100%;}
         .directory-nav{position: fixed; left:9%; top:190px; padding: 12px 0 20px 32px; display: none;z-index: 999;}
+
       
 +
        .thr_box{width: 58%; min-width: 800px; padding:50px 0 0; margin: auto; box-sizing: border-box; font-size: 16px !important; color: #434343 !important;}
 +
        .thr_box p{line-height: 30px; text-indent: 26px;}
 +
        .thr_box .pic_box{font-size: 14px !important; color: #6d6c6c !important;}
 +
        .thr_box img{max-width: 100%;}
 +
       
 +
         .directory-nav{position: fixed; left:9%; top:130px; padding: 12px 0 20px 32px; display: none;z-index: 999;}
 
         .directory-nav ul{margin-top: 105px;}
 
         .directory-nav ul{margin-top: 105px;}
 
         .directory-nav li{font-family: "microsoft yahei"; font-size: 16px; }
 
         .directory-nav li{font-family: "microsoft yahei"; font-size: 16px; }
Line 233: Line 272:
 
         }
 
         }
 
          
 
          
          
+
         @media (max-height:770px){
 +
        .directory-nav .c-top{
 +
        display: none;
 +
        }
 +
        .directory-nav ul{
 +
        margin-top: 0px;
 +
        }
 +
        }
 
          
 
          
 
</style>
 
</style>
Line 239: Line 285:
 
<script>
 
<script>
 
$(function() {
 
$(function() {
 +
 +
if($(".home_01").length>0){
 +
$(".float").hide();
 +
}else{
 +
$(".float").show();
 +
$(window).scroll(function () {
 +
if ($(document).scrollTop() >= $(document).height() - $(window).height()) {
 +
    $(".float").fadeOut();
 +
    }else{
 +
    $(".float").fadeIn();
 +
    }
 +
    });
 +
}
 
lanrenzhijia(".drop-menu-effect");
 
lanrenzhijia(".drop-menu-effect");
 
$(window).scroll(function () {   
 
$(window).scroll(function () {   
Line 300: Line 359:
 
<div><a href="https://2017.igem.org/Team:Jilin_China/Design">Design</a></div>
 
<div><a href="https://2017.igem.org/Team:Jilin_China/Design">Design</a></div>
 
<div><a href="https://2017.igem.org/Team:Jilin_China/Model">Model</a></div>
 
<div><a href="https://2017.igem.org/Team:Jilin_China/Model">Model</a></div>
<div><a href="https://2017.igem.org/Team:Jilin_China/Improve">Improve</a></div>
+
<div><a href="https://2017.igem.org/Team:Jilin_China/Improve">Improvement</a></div>
<div><a href="https://2017.igem.org/Team:Jilin_China/Lab_Safety">Safety</a></div>
+
<div><a href="https://2017.igem.org/Team:Jilin_China/Lab_Safety">Lab Safety</a></div>
 
</div>
 
</div>
 
</div>
 
</div>
Line 310: Line 369:
 
<div class="submenu" style="left: 4px;">
 
<div class="submenu" style="left: 4px;">
 
<div class="mj_menu_pro_bg">
 
<div class="mj_menu_pro_bg">
<div><a href="https://2017.igem.org/Team:Jilin_China/geneguard">geneguard</a></div>
+
<div><a href="https://2017.igem.org/Team:Jilin_China/Geneguard">Geneguard</a></div>
 
<div><a href="https://2017.igem.org/Team:Jilin_China/Application">Application</a></div>
 
<div><a href="https://2017.igem.org/Team:Jilin_China/Application">Application</a></div>
 
</div>
 
</div>
Line 361: Line 420:
 
</div>
 
</div>
 
</div>
 
</div>
 
+
<div class="float">
<script>
+
<img src="https://static.igem.org/mediawiki/2017/6/66/T--Jilin_China--_sec_bg_mr.png" />
$(function() {
+
</div>
+
function DirectoryNav($h,config){
+
        this.opts = $.extend(true,{
+
            scrollThreshold:0.5,    //滚动检测阀值 0.5在浏览器窗口中间部位
+
            scrollSpeed:700,        //滚动到指定位置的动画时间
+
            scrollTopBorder:400,    //滚动条距离顶部多少的时候显示导航,如果为0,则一直显示
+
            easing: 'swing',        //不解释
+
            delayDetection:200,    //延时检测,避免滚动的时候检测过于频繁
+
            scrollChange:function(){}
+
        },config);
+
        this.$win = $(window);
+
        this.$h = $h;
+
        this.$pageNavList = "";
+
        this.$pageNavListLis ="";
+
        this.$curTag = "";
+
        this.$pageNavListLiH = "";
+
        this.offArr = [];
+
        this.curIndex = 0;
+
        this.scrollIng = false;
+
        this.init();
+
    }
+
 
+
    DirectoryNav.prototype = {
+
        init:function(){
+
            this.make();
+
            var Thisss = this;
+
setInterval(function(){
+
Thisss.offArr = [];
+
            Thisss.$h.each(function(){
+
                var $This = $(this),
+
                    offT = Math.round($This.offset().top);
+
                Thisss.offArr.push(offT-200);
+
            });
+
        //    alert(JSON.stringify(Thisss.offArr));
+
},1000);
+
            this.bindEvent();
+
        },
+
        make:function(){
+
            $("body").append('<div class="directory-nav" id="directoryNav"><ul></ul><span class="cur-tag"></span><span class="c-top"></span><span class="c-bottom"></span><span class="line"></span></div>');
+
            var $hs = this.$h,
+
                $directoryNav = $("#directoryNav"),
+
                temp = [],
+
                index1 = 0,
+
                index2 = 0;
+
            $hs.each(function(index){
+
                var $this = $(this),
+
                        text = $this.text();
+
                if(!$this.hasClass("h2_title")){
+
                    index1++;
+
                    if(index1%2==0) index2 = 0;
+
                    temp.push('<li class="l1"><span class="c-dot"></span><a class="l1-text">'+text+'</a></li>');
+
                }else{
+
                    index2++;
+
                    temp.push('<li class="l2"><a class="l2-text">'+text+'</a></li>');
+
 
+
                }
+
            });
+
            $directoryNav.find("ul").html(temp.join(""));
+
 
+
            this.$pageNavList = $directoryNav;
+
            this.$pageNavListLis = this.$pageNavList.find("li");
+
            this.$curTag = this.$pageNavList.find(".cur-tag");
+
            this.$pageNavListLiH = this.$pageNavListLis.eq(0).height();
+
 
+
            if(!this.opts.scrollTopBorder){
+
                this.$pageNavList.show();
+
            }
+
        },
+
        posTag:function(top){
+
            this.$curTag.css({top:top+'px'});
+
        },
+
        ifPos:function(st){
+
            var offArr = this.offArr;
+
            var windowHeight = Math.round(this.$win.height());
+
            for(var i=0;i<offArr.length;i++){
+
                if((offArr[i] - windowHeight + 650) < st) {
+
                    var $curLi = this.$pageNavListLis.eq(i),
+
                        tagTop = $curLi.position().top;
+
                    $curLi.addClass("cur").siblings("li").removeClass("cur");
+
                    if($curLi.hasClass("l2")){
+
                    this.$curTag.addClass("cur2");
+
                    }else{
+
                    this.$curTag.removeClass("cur2");
+
                    }
+
                    this.curIndex = i;
+
                    this.posTag(tagTop-6);
+
                    this.opts.scrollChange.call(this);
+
                }
+
            }
+
        },
+
        bindEvent:function(){
+
            var This = this,
+
                show = false,
+
                timer = 0;
+
            this.$win.on("scroll",function(){
+
                var $this = $(this);
+
                clearTimeout(timer);
+
                timer = setTimeout(function(){
+
                    This.scrollIng = true;
+
                    if($this.scrollTop()>This.opts.scrollTopBorder){
+
                        if(!This.$pageNavListLiH) This.$pageNavListLiH = This.$pageNavListLis.eq(0).height();
+
                        if(!show){
+
                            This.$pageNavList.fadeIn();
+
                            show = true;
+
                        }
+
                        This.ifPos( $(this).scrollTop() );
+
                    }else{
+
                        if(show){
+
                            This.$pageNavList.fadeOut();
+
                            show = false;
+
                        }
+
                    }
+
                },This.opts.delayDetection);
+
            });
+
 
+
            this.$pageNavList.on("click","li",function(){
+
                var $this = $(this),
+
                    index = $this.index();
+
                This.scrollTo(This.offArr[index]);
+
            })
+
        },
+
        scrollTo: function(offset,callback) {
+
            var This = this;
+
            $('html,body').animate({
+
                scrollTop: offset
+
            }, this.opts.scrollSpeed, this.opts.easing, function(){
+
                This.scrollIng = false;
+
            //    callback && this.tagName.toLowerCase()=='body' && callback();
+
                if(callback){
+
                if(this.tagName.toLowerCase()=='body'){
+
                callback();
+
                }
+
                }
+
            });
+
        }
+
    };
+
 
+
var directoryNav = new DirectoryNav($(".h1_title,.h2_title"),{
+
        scrollTopBorder:400  //滚动条距离顶部多少的时候显示导航,如果为0,则一直显示
+
    });
+
});
+
   
+
 
+
</script>
+

Latest revision as of 01:27, 2 November 2017