Difference between revisions of "Team:NEU China B"

 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{NEU_China_B}}
 
{{NEU_China_B}}
 
<html>
 
<html>
<section id="slider">
+
<style>
<div class="single-slider" style="background-image:url('img/slider1.jpg')">
+
.slider-box{position:relative}
<div id="particles-js"></div>
+
.slider_cube,.slider_inner_a,.slider_inner_b
<div class="container">
+
{position:absolute;width:100%;height:100%;overflow:hidden}
<div class="row">
+
.slider_nav_box{position:absolute;right:0;bottom:25%}
<div class="col-md-12">
+
.slider_nav_title{background:url(../../../i1.tietuku.com/87ec913b390798fa.png) repeat center right;min-width:150px;height:100px}
<div class="text">
+
.slider_nav{background:url(http://i1.tietuku.com/87ec913b390798fa.png) no-repeat;height:18px;min-width:100px}
<h1 class="cd-headline clip is-full-width">
+
.slider_bar{position:absolute;width:100%;text-align:center;bottom:10px;height:20px}
awesome creative
+
.slider_bar span{
<span class="cd-words-wrapper">
+
    display:inline-block;margin:0 10px;width:14px;height:14px;
<b class="is-visible">design</b>
+
    background:#B7B7B7;cursor:pointer;
<b>Theme</b>
+
    border-radius:20px;
<b>codes</b>
+
    box-shadow:inset 0 0 3px rgba(0,0,0,0.3);
</span>
+
    -webkit-transition:.3s;
</h1>
+
    -moz-transition:.3s;
<p>Lorem Ipsum is simply dummy text of the printing and printing and typesetting industry.<br> Lorem Ipsum has
+
    -ms-transition:.3s;
been the industry's</p>
+
    -o-transition:.3s;
<div class="button-head">
+
    transition:.3s
<div class="button">
+
}
<span></span>
+
.slider_bar span:hover{background:#333;background:rgba(0,0,0,0.7)}
<a href="#" class="btn">Load More</a>
+
.slider_bar span.active{background:#F40;background:rgba(255,68,0,0.9);cursor:default}
</div>
+
</style>
</div>
+
<script>
</div>
+
jQuery.easing["jswing"]=jQuery.easing["swing"];jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d)},easeOutQuad:function(x,t,b,c,d){return -c*(t/=d)*(t-2)+b},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b}else{if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+0.75)+b}else{if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+0.9375)+b}else{return c*(7.5625*(t-=(2.625/2.75))*t+0.984375)+b}}}}});String.prototype.format=function(){var args=arguments;var reg=/\{(\d+)\}/g;return this.replace(reg,function(g0,g1){return args[+g1]})};(function($){$.fn.will=function(callBack,type){type=type||"fx";return $.each(this,function(index,ele){$(ele).queue(type,function(next){callBack.call(this);next()})})}})(jQuery);(function($){function Slider(option){this.opt=$.extend(true,{},option);this.ele=$("#"+this.opt.id);this.inIt();this.begin()}Slider.prototype={cubeSize:{x:0,y:0},nowIndex:0,canChose:true,nextIndex:function(){var newIndex=this.nowIndex+1;if(newIndex>=this.opt.imgs.length){newIndex=0}return newIndex},inIt:function(){this.preLoad();this.fill();this.resize();var self=this;$(window).resize(function(){self.resize()})},preLoad:function(){var arr=this.opt.imgs;$.each(arr,function(index,url){var img=document.createElement("img");img.src=url})},begin:function(){var self=this;this.timer=setInterval(function(){var newIndex=self.nowIndex+1;if(newIndex>=self.opt.imgs.length){newIndex=0}self.choseImg(newIndex)},self.opt.interval)},stop:function(){clearInterval(this.timer)},fill:function(){var result='<div class="slider-box">';for(var x=0;x<this.opt.x;x++){for(var y=0;y<this.opt.y;y++){result+='<div id="{0}" class="{1}"><div class="slider_inner_a"></div><div class="slider_inner_b"></div></div>'.format(this.opt.id+"_"+x+"_"+y,"slider_cube")}}if(this.opt.showBar){result+='<div class="slider_bar">';result+=new Array(this.opt.imgs.length+1).join("<span></span>");result+="</div>"}result+="</div>";this.ele.html(result);this.ele.find(".slider_bar span").eq(this.nowIndex).addClass("active");this.eleBox=this.ele.children(".slider-box");this.bindEvents()},bindEvents:function(){var self=this;if(this.opt.showBar){this.eleBox.children(".slider_bar").off().on("click","span",function(){var eleSpan=$(this);self.choseImg(eleSpan.index())})}if(this.opt.urls.length<=0){return}self.eleBox.find(".slider_cube").off().click(function(){window.location.href=self.opt.urls[self.nowIndex]||"javascript:void(0);"}).css("cursor","pointer");self.eleBox.off().mouseenter(function(){self.stop()}).mouseleave(function(){self.begin()})},resize:function(){this.eleBox.height(this.eleBox.width()/this.opt.scale);var eleWid=this.eleBox.width(),eleHei=this.eleBox.height();var xSize,ySize;if(this.opt.border){xSize=(eleWid-this.opt.x+1)/this.opt.x;ySize=(eleHei-this.opt.y+1)/this.opt.y}else{xSize=eleWid/this.opt.x;ySize=eleHei/this.opt.y}this.cubeSize={x:xSize,y:ySize};if(this.opt.x==1){xSize=eleWid}if(this.opt.y==1){ySize=elehei}var borLen=this.opt.border?1:0;for(var x=0;x<this.opt.x;x++){for(var y=0;y<this.opt.y;y++){$("#"+this.opt.id+"_"+x+"_"+y).css({"left":x*xSize+x*borLen+"px","top":y*ySize+y*borLen+"px","width":xSize+"px","height":ySize+"px"}).find(".slider_inner_a,.slider_inner_b").css({"background-image":"url({0})".format(this.opt.imgs[this.nowIndex]),"background-position":"{0}px {1}px".format(-x*xSize,-y*ySize),"background-size":"{0}px {1}px".format(eleWid,eleHei)})}}},choseImg:function(index){var self=this;if(index==self.nowIndex){return}if(!self.canChose){return}self.canChose=false;setTimeout(function(){self.canChose=true},self.opt.delay+200);this.nowIndex=index;var url=this.opt.imgs[index];this.effectIndex=this.effectIndex||0;if(this.effectIndex>=this.effects.length){this.effectIndex=0}this.effects[this.effectIndex](this,url);this.effectIndex++;if(self.opt.showBar){self.eleBox.children(".slider_bar").find("span").removeClass("active").eq(self.nowIndex).addClass("active")}},effects:[function(self,url){var delayItem=self.opt.delay/(self.opt.x*self.opt.y);effectTemplate(self.opt,function(eleA,eleB,x,y){eleA.css({"top":-self.cubeSize.y+"px","background-image":"url({0})".format(url)});var delayTime=(x+(self.opt.x*y))*delayItem*4/5;eleA.delay(delayTime).animate({"top":"0"},{duration:delayItem*10,easing:"easeOutBounce"});eleB.delay(delayTime).animate({"top":self.cubeSize.y+"px"},{duration:delayItem*10,easing:"easeOutBounce"}).will(function(){$(this).css({"top":"0","background-image":"url({0})".format(url)})})})},function(self,url){var delayItem=self.opt.delay/self.opt.x;effectTemplate(self.opt,function(eleA,eleB,x,y){eleA.css({"left":-self.cubeSize.x+"px","background-image":"url({0})".format(url)});var delayTime=x*delayItem;eleA.delay(delayTime).animate({"left":"0"},{duration:delayItem*2});eleB.delay(delayTime).animate({"left":self.cubeSize.x+"px"},{duration:delayItem*2}).will(function(){$(this).css({"left":"0","background-image":"url({0})".format(url)})})})},function(self,url){var delayItem=self.opt.delay/(self.opt.x*self.opt.y);
</div>
+
effectTemplate(self.opt,function(eleA,eleB,x,y){eleA.css({"opacity":"0","background-image":"url({0})".format(url)});var delayTime=(x+(self.opt.x*y))*delayItem;eleA.delay(delayTime).animate({"opacity":"1"},{duration:delayItem*4,});eleB.delay(delayTime).animate({"opacity":"0"},{duration:delayItem*4,}).will(function(){$(this).css({"opacity":"1","background-image":"url({0})".format(url)})})})},function(self,url){var delayArr=[0];var delayItem=self.opt.delay/(self.opt.x*self.opt.y);for(var i=1,len=self.opt.x*self.opt.y;i<len;i++){delayArr[i]=delayArr[i-1]+delayItem}delayArr.sort(function(a,b){return Math.random()>0.5?1:-1});effectTemplate(self.opt,function(eleA,eleB,x,y){var directionIndex=Math.floor(Math.random()*4);var cssName=["top","left","top","left"][directionIndex];var cssValue=[-self.cubeSize.y,self.cubeSize.x,self.cubeSize.y,-self.cubeSize.x][directionIndex];var obj={};obj[cssName]=cssValue+"px";obj["background-image"]="url({0})".format(url);eleA.css(obj);var delayTime=delayArr[x+y*self.opt.x];obj={};obj[cssName]="0";eleA.delay(delayTime*3/4).animate(obj,delayItem*4);obj={};obj[cssName]=-cssValue+"px";eleB.delay(delayTime*3/4).animate(obj,delayItem*4).will(function(){obj={};obj[cssName]="0";obj["background-image"]="url({0})".format(url);$(this).css(obj)})})}]};function effectTemplate(opt,callback){for(var y=0;y<opt.y;y++){for(var x=0;x<opt.x;x++){var eleBox=$("#{0}_{1}_{2}".format(opt.id,x,y));var eleA=eleBox.children(".slider_inner_a");var eleB=eleBox.children(".slider_inner_b");callback(eleA,eleB,x,y)}}}function getRandomId(){return Math.random().toString(36).substr(2).replace(/\d/g,"")}$.fn.slider=function(option,obj){if(typeof option=="object"){var defaults={imgs:[],urls:[],x:2,y:2,scale:4/3,delay:800,interval:5000,border:false};return $.each(this,function(index,ele){var opt=$.extend({},defaults,option);if(!ele.id){ele.id=getRandomId()}opt.id=ele.id;var slider=new Slider(opt);$(ele).data("slider",slider)})}else{if(typeof option=="string"){var slider=this.data("slider");slider.opt=$.extend({},slider.opt,obj||{});slider.inIt();slider.stop();slider.begin();if(typeof obj=="object"){slider[option]()}else{slider[option](obj)}return this}else{return this}}}})(jQuery);
</div>
+
</script>
</div>
+
<div style="margin-bottom: 20px;overflow: hidden;background-color:#fff;height:360px;">
</div>
+
        <div id="imgBar" style="margin:0 0;">
</section>
+
        </div>
 +
    </div>
 +
<!-- 启动 -->
 +
<script type="text/javascript">
 +
    $("#imgBar").slider({
 +
        imgs: [
 +
            "https://static.igem.org/mediawiki/2018/0/07/T--NEU_China_B--ast0.jpg",
 +
"https://static.igem.org/mediawiki/2018/4/41/T--NEU_China_B--ast1.jpg",
 +
"https://static.igem.org/mediawiki/2018/9/92/T--NEU_China_B--ast2.jpg"],
 +
        scale: 4,
 +
        border: true,
 +
        delay: 2200,
 +
        x: 10,
 +
        y: 3
 +
    });
 +
</script>
 +
 
<canvas id="base_page" width="800" height="400" style="">
 
<canvas id="base_page" width="800" height="400" style="">
 
您的浏览器不支持 HTML5 canvas 标签。
 
您的浏览器不支持 HTML5 canvas 标签。
 
</canvas>
 
</canvas>
 
<script>
 
<script>
var width = 800;
+
var width = 800;
var height = 400;
+
var height = 400;
  
var c = document.getElementById("base_page");
+
var c = document.getElementById("base_page");
  
$("#base_page").attr("width", c.parentElement.clientWidth);
+
$("#base_page").attr("width", c.parentElement.clientWidth);
  
var ctx = c.getContext("2d");
+
var ctx = c.getContext("2d");
that = ctx;
+
that = ctx;
var i = 0;
+
var i = 0;
var pi = Math.PI;
+
var pi = Math.PI;
var basex = c.width / 2;
+
var basex = c.width / 2;
var basey = c.height / 2;
+
var basey = c.height / 2;
width = c.width;
+
width = c.width;
height = c.height;
+
height = c.height;
var imgx;
+
var imgx;
var imgy;
+
var imgy;
  
var w1 = "https://static.igem.org/mediawiki/2018/a/a8/T--NEU_China_B--w1.png";
+
var w1 = "https://static.igem.org/mediawiki/2018/a/a8/T--NEU_China_B--w1.png";
var w2 = "https://static.igem.org/mediawiki/2018/f/f9/T--NEU_China_B--w2.png";
+
var w2 = "https://static.igem.org/mediawiki/2018/f/f9/T--NEU_China_B--w2.png";
var w3 = "https://static.igem.org/mediawiki/2018/2/27/T--NEU_China_B--w3.png";
+
var w3 = "https://static.igem.org/mediawiki/2018/2/27/T--NEU_China_B--w3.png";
var w4 = "https://static.igem.org/mediawiki/2018/9/96/T--NEU_China_B--w4.png";
+
var w4 = "https://static.igem.org/mediawiki/2018/9/96/T--NEU_China_B--w4.png";
var w5 = "https://static.igem.org/mediawiki/2018/7/7a/T--NEU_China_B--w5.png";
+
var w5 = "https://static.igem.org/mediawiki/2018/7/7a/T--NEU_China_B--w5.png";
var w6 = "https://static.igem.org/mediawiki/2018/6/66/T--NEU_China_B--w6.png";
+
var w6 = "https://static.igem.org/mediawiki/2018/6/66/T--NEU_China_B--w6.png";
  
var img1 = new Image();
+
var img1 = new Image();
var img2 = new Image();
+
var img2 = new Image();
var img3 = new Image();
+
var img3 = new Image();
var img4 = new Image();
+
var img4 = new Image();
var img5 = new Image();
+
var img5 = new Image();
var img6 = new Image();
+
var img6 = new Image();
img1.src = w1;
+
img1.src = w1;
var during = 40;
+
var during = 40;
var t1 = 0;
+
var t1 = 0;
var base_t1 = 0;
+
var base_t1 = 0;
var t2 = 0;
+
var t2 = 0;
var base_t2 = base_t1 + during;
+
var base_t2 = base_t1 + during;
var t3 = 0;
+
var t3 = 0;
var base_t3 = base_t2 + during;
+
var base_t3 = base_t2 + during;
var t4 = 0;
+
var t4 = 0;
var base_t4 = base_t3 + during;
+
var base_t4 = base_t3 + during;
var t5 = 0;
+
var t5 = 0;
var base_t5 = base_t4 + during;
+
var base_t5 = base_t4 + during;
var t6 = 0;
+
var t6 = 0;
var base_t6 = base_t5 + during;
+
var base_t6 = base_t5 + during;
  
var x_e = 300;
+
var x_e = 300;
var y_e = 150;
+
var y_e = 150;
  
var tipsWarpper = {};
+
var tipsWarpper = {};
  
  
function redraw() {
+
function redraw() {
ctx.clearRect(0, 0, width, height);
+
ctx.clearRect(0, 0, width, height);
  
var i = 0;
+
var i = 0;
ctx.beginPath();
+
ctx.beginPath();
var x = x_e * Math.cos(0 * 180 * 2) + basex;
+
var x = x_e * Math.cos(0 * 180 * 2) + basex;
var y = y_e * Math.sin(0 * 180 * 4) + basey;
+
var y = y_e * Math.sin(0 * 180 * 4) + basey;
ctx.moveTo(x, y);
+
ctx.moveTo(x, y);
for (i = 0; i < 0.05; i += 0.00001) {
+
for (i = 0; i < 0.05; i += 0.00001) {
var x = x_e * Math.cos(i * 180 * 2) + basex;
+
var x = x_e * Math.cos(i * 180 * 2) + basex;
var y = y_e * Math.sin(i * 180 * 4) + basey;
+
var y = y_e * Math.sin(i * 180 * 4) + basey;
ctx.lineTo(x, y);
+
ctx.lineTo(x, y);
}
+
}
ctx.strokeStyle = '#FAF0E6';
+
ctx.strokeStyle = '#FAF0E6';
ctx.lineWidth = 3;
+
ctx.lineWidth = 3;
ctx.stroke();
+
ctx.stroke();
ctx.closePath();
+
ctx.closePath();
  
}
+
}
  
function draw(x, y, r) {
+
function draw(x, y, r) {
ctx.beginPath();
+
ctx.beginPath();
ctx.arc(x, y, r, 0, Math.PI * 2, true);
+
ctx.arc(x, y, r, 0, Math.PI * 2, true);
ctx.fillStyle = "red";
+
ctx.fillStyle = "red";
ctx.fill();
+
ctx.fill();
ctx.closePath();
+
ctx.closePath();
}
+
}
function drawTips(x, y, w, h, msg) {
+
function drawTips(x, y, w, h, msg) {
// ctx.beginPath();
+
// ctx.beginPath();
// ctx.rect(x, y, w, h);
+
// ctx.rect(x, y, w, h);
// ctx.fillStyle = 'white';
+
// ctx.fillStyle = 'white';
// ctx.fill();
+
// ctx.fill();
// ctx.closePath();
+
// ctx.closePath();
ctx.beginPath();
+
ctx.beginPath();
ctx.font = 'italic 40pt Calibri';
+
ctx.font = 'italic 40pt Calibri';
ctx.fillStyle = 'yellow';
+
ctx.fillStyle = 'yellow';
ctx.fillText(msg, x, y);
+
ctx.fillText(msg, x, y);
ctx.fill();
+
ctx.fill();
ctx.closePath();
+
ctx.closePath();
}
+
}
  
function drawImg(imgWarpper, x, y) {
+
function drawImg(imgWarpper, x, y) {
var img = imgWarpper.img;
+
var img = imgWarpper.img;
var drawWidth = img.width / 4;
+
var drawWidth = img.width / 4;
var drawHeight = img.height / 4;
+
var drawHeight = img.height / 4;
var imx = x - drawWidth / 2;
+
var imx = x - drawWidth / 2;
var imy = y - drawHeight / 2
+
var imy = y - drawHeight / 2
imgWarpper.x = imx;
+
imgWarpper.x = imx;
imgWarpper.y = imy;
+
imgWarpper.y = imy;
ctx.drawImage(img, imx, imy, drawWidth, drawHeight);
+
ctx.drawImage(img, imx, imy, drawWidth, drawHeight);
}
+
}
  
var imgWarpper1 = {};
+
var imgWarpper1 = {};
var imgWarpper2 = {};
+
var imgWarpper2 = {};
var imgWarpper3 = {};
+
var imgWarpper3 = {};
var imgWarpper4 = {};
+
var imgWarpper4 = {};
var imgWarpper5 = {};
+
var imgWarpper5 = {};
var imgWarpper6 = {};
+
var imgWarpper6 = {};
  
imgWarpper1.img = img1;
+
imgWarpper1.img = img1;
imgWarpper2.img = img2;
+
imgWarpper2.img = img2;
imgWarpper3.img = img3;
+
imgWarpper3.img = img3;
imgWarpper4.img = img4;
+
imgWarpper4.img = img4;
imgWarpper5.img = img5;
+
imgWarpper5.img = img5;
imgWarpper6.img = img6;
+
imgWarpper6.img = img6;
  
img1.onload = function () {
+
img1.onload = function () {
img2.src = w2;
+
img2.src = w2;
img2.onload = function () {
+
img2.onload = function () {
img3.src = w3;
+
img3.src = w3;
img3.onload = function () {
+
img3.onload = function () {
img4.src = w4;
+
img4.src = w4;
img4.onload = function () {
+
img4.onload = function () {
img5.src = w5;
+
img5.src = w5;
img5.onload = function () {
+
img5.onload = function () {
console.log("finish");
+
var timer = setInterval(function () {
img6.src = w6;
+
redraw();
img6.onload = function () {
+
i += 0.00001;
var timer = setInterval(function () {
+
redraw();
+
i += 0.00001;
+
  
t1 = i + base_t1;
+
t1 = i + base_t1;
t2 = i + base_t2;
+
t2 = i + base_t2;
t3 = i + base_t3;
+
t3 = i + base_t3;
t4 = i + base_t4;
+
t4 = i + base_t4;
t5 = i + base_t5;
+
t5 = i + base_t5;
t6 = i + base_t6;
+
  
var img1_x = x_e * Math.cos(t1 * 180 * 2) + basex;
+
var img1_x = x_e * Math.cos(t1 * 180 * 2) + basex;
var img1_y = y_e * Math.sin(t1 * 180 * 4) + basey;
+
var img1_y = y_e * Math.sin(t1 * 180 * 4) + basey;
  
drawImg(imgWarpper1, img1_x, img1_y);
+
drawImg(imgWarpper1, img1_x, img1_y);
  
var img2_x = x_e * Math.cos(t2 * 180 * 2) + basex;
+
var img2_x = x_e * Math.cos(t2 * 180 * 2) + basex;
var img2_y = y_e * Math.sin(t2 * 180 * 4) + basey;
+
var img2_y = y_e * Math.sin(t2 * 180 * 4) + basey;
imgWarpper2.x = img2_x;
+
imgWarpper2.x = img2_x;
imgWarpper2.y = img2_y;
+
imgWarpper2.y = img2_y;
// imgWarpper2.w = i
+
// imgWarpper2.w = i
drawImg(imgWarpper2, img2_x, img2_y);
+
drawImg(imgWarpper2, img2_x, img2_y);
  
  
var img3_x = x_e * Math.cos(t3 * 180 * 2) + basex;
+
var img3_x = x_e * Math.cos(t3 * 180 * 2) + basex;
var img3_y = y_e * Math.sin(t3 * 180 * 4) + basey;
+
var img3_y = y_e * Math.sin(t3 * 180 * 4) + basey;
drawImg(imgWarpper3, img3_x, img3_y);
+
drawImg(imgWarpper3, img3_x, img3_y);
  
var img4_x = x_e * Math.cos(t4 * 180 * 2) + basex;
+
var img4_x = x_e * Math.cos(t4 * 180 * 2) + basex;
var img4_y = y_e * Math.sin(t4 * 180 * 4) + basey;
+
var img4_y = y_e * Math.sin(t4 * 180 * 4) + basey;
drawImg(imgWarpper4, img4_x, img4_y);
+
drawImg(imgWarpper4, img4_x, img4_y);
  
  
var img5_x = x_e * Math.cos(t5 * 180 * 2) + basex;
+
var img5_x = x_e * Math.cos(t5 * 180 * 2) + basex;
var img5_y = y_e * Math.sin(t5 * 180 * 4) + basey;
+
var img5_y = y_e * Math.sin(t5 * 180 * 4) + basey;
drawImg(imgWarpper5, img5_x, img5_y);
+
drawImg(imgWarpper5, img5_x, img5_y);
  
  
var img6_x = x_e * Math.cos(t6 * 180 * 2) + basex;
+
if (tipsWarpper.valid == true)
var img6_y = y_e * Math.sin(t6 * 180 * 4) + basey;
+
drawTips(tipsWarpper.x, tipsWarpper.y, 100, 100, tipsWarpper.msg);
drawImg(imgWarpper6, img6_x, img6_y);
+
// if (y > 400) {
console.log(tipsWarpper.valid)
+
// clearInterval(timer);
if (tipsWarpper.valid == true)
+
// }
drawTips(tipsWarpper.x, tipsWarpper.y, 100, 100, tipsWarpper.msg);
+
}, 50);
// if (y > 400) {
+
}
// clearInterval(timer);
+
// }
+
}, 50);
+
 
+
 
}
 
}
 
}
 
}
 
}
 
}
 
}
 
}
}
 
}
 
  
function contains(imgWarpper, x, y) {
+
function contains(imgWarpper, x, y) {
var img = imgWarpper.img;
+
var img = imgWarpper.img;
var rect = {};
+
var rect = {};
var drawWidth = img.width / 4;
+
var drawWidth = img.width / 4;
var drawHeight = img.height / 4;
+
var drawHeight = img.height / 4;
rect.x = imgWarpper.x;
+
rect.x = imgWarpper.x;
rect.y = imgWarpper.y;;
+
rect.y = imgWarpper.y;;
rect.x2 = drawWidth + rect.x;
+
rect.x2 = drawWidth + rect.x;
rect.y2 = drawHeight + rect.y;
+
rect.y2 = drawHeight + rect.y;
if (rect.x < x)
+
if (rect.x < x)
if (rect.x2 > x)
+
if (rect.x2 > x)
if (rect.y < y)
+
if (rect.y < y)
if (rect.y2 > y)
+
if (rect.y2 > y)
return true;
+
return true;
return false;
+
return false;
}
+
}
  
c.addEventListener('click', function (event) {
+
c.addEventListener('click', function (event) {
var x = event.clientX - c.getBoundingClientRect().left;
+
var x = event.clientX - c.getBoundingClientRect().left;
var y = event.clientY - c.getBoundingClientRect().top;
+
var y = event.clientY - c.getBoundingClientRect().top;
// console.log(x, y);
+
// console.log(x, y);
if (contains(imgWarpper1, x, y)) {
+
if (contains(imgWarpper1, x, y)) {
console.log("img 1");
+
console.log("img 1");
window.location.href = 'https://2018.igem.org/Team:NEU_China_B/background';
+
window.location.href = 'https://2018.igem.org/Team:NEU_China_B/background';
}
+
}
else if (contains(imgWarpper2, x, y)) {
+
else if (contains(imgWarpper2, x, y)) {
console.log("img 2");
+
console.log("img 2");
window.location.href = 'https://2018.igem.org/Team:NEU_China_B/Basic_Part';
+
window.location.href = 'https://2018.igem.org/Team:NEU_China_B/Basic_Part';
}
+
}
else if (contains(imgWarpper3, x, y)) {
+
else if (contains(imgWarpper3, x, y)) {
console.log("img3");
+
console.log("img3");
window.location.href = 'https://2018.igem.org/Team:NEU_China_B/Team';
+
window.location.href = 'https://2018.igem.org/Team:NEU_China_B/Team';
}
+
}
else if (contains(imgWarpper4, x, y)) {
+
else if (contains(imgWarpper4, x, y)) {
console.log("img4");
+
console.log("img4");
window.location.href = 'https://2018.igem.org/Team:NEU_China_B/InterLab';
+
window.location.href = 'https://2018.igem.org/Team:NEU_China_B/InterLab';
}
+
}
else if (contains(imgWarpper5, x, y)) {
+
else if (contains(imgWarpper5, x, y)) {
console.log("img5");
+
console.log("img5");
window.location.href = 'https://2018.igem.org/Team:NEU_China_B/Human_Practices';
+
window.location.href = 'https://2018.igem.org/Team:NEU_China_B/Human_Practices';
}
+
}
else if (contains(imgWarpper6, x, y)) {
+
});
window.location.href = 'https://2018.igem.org/Team:NEU_China_B/Human_Practices';
+
c.onmousemove = function (event) {
}
+
var x = event.clientX - c.getBoundingClientRect().left;
});
+
var y = event.clientY - c.getBoundingClientRect().top;
c.onmousemove = function (event) {
+
if (contains(imgWarpper1, x, y)) {
var x = event.clientX - c.getBoundingClientRect().left;
+
tipsWarpper.x = x;
var y = event.clientY - c.getBoundingClientRect().top;
+
tipsWarpper.y = y;
if (contains(imgWarpper1, x, y)) {
+
tipsWarpper.valid = true;
tipsWarpper.x = x;
+
tipsWarpper.msg = "Background";
tipsWarpper.y = y;
+
}
tipsWarpper.valid = true;
+
else if (contains(imgWarpper2, x, y)) {
tipsWarpper.msg = "Background";
+
console.log("img 2");
}
+
tipsWarpper.x = x;
else if (contains(imgWarpper2, x, y)) {
+
tipsWarpper.y = y;
console.log("img 2");
+
tipsWarpper.valid = true;
tipsWarpper.x = x;
+
tipsWarpper.msg = "Basic Part";
tipsWarpper.y = y;
+
}
tipsWarpper.valid = true;
+
else if (contains(imgWarpper3, x, y)) {
tipsWarpper.msg = "Basic Part";
+
console.log("img3");
}
+
tipsWarpper.valid = true;
else if (contains(imgWarpper3, x, y)) {
+
tipsWarpper.x = x;
console.log("img3");
+
tipsWarpper.y = y;
tipsWarpper.valid = true;
+
tipsWarpper.msg = "Team";
tipsWarpper.x = x;
+
}
tipsWarpper.y = y;
+
else if (contains(imgWarpper4, x, y)) {
tipsWarpper.msg = "Team";
+
console.log("img4");
}
+
tipsWarpper.x = x;
else if (contains(imgWarpper4, x, y)) {
+
tipsWarpper.y = y;
console.log("img4");
+
tipsWarpper.msg = "InterLab";
tipsWarpper.x = x;
+
tipsWarpper.valid = true;
tipsWarpper.y = y;
+
}
tipsWarpper.msg = "InterLab";
+
else if (contains(imgWarpper5, x, y)) {
tipsWarpper.valid = true;
+
console.log("img5");
}
+
tipsWarpper.x = x;
else if (contains(imgWarpper5, x, y)) {
+
tipsWarpper.y = y;
console.log("img5");
+
tipsWarpper.msg = "Human_Practices";
tipsWarpper.x = x;
+
tipsWarpper.valid = true;
tipsWarpper.y = y;
+
}
tipsWarpper.msg = "Human_Practices";
+
else {
tipsWarpper.valid = true;
+
tipsWarpper.valid = false;
}
+
}
else if (contains(imgWarpper6, x, y)) {
+
}
tipsWarpper.x = x;
+
</script>
tipsWarpper.y = y;
+
tipsWarpper.msg = "??????";
+
tipsWarpper.valid = true;
+
}
+
else {
+
console.log("six");
+
tipsWarpper.valid = false;
+
}
+
}
+
</script>
+
 
 
 
 
Line 323: Line 319:
 
</style>
 
</style>
 
<div class="text-center abstract">
 
<div class="text-center abstract">
 +
<div class="container">
 
<h2>
 
<h2>
 
Abstract
 
Abstract
Line 332: Line 329:
  
 
</div>
 
</div>
 +
<footer id="footer" class="footer section">
 +
<!-- Footer Top -->
 +
<div class="footer-top">
 +
<div class="container">
 +
<div class="row">
  
 +
</div>
 +
</div>
 +
</div>
 +
<!--/ End Footer Top -->
  
 +
<!-- Copyright -->
 +
<div class="copyright">
 +
<div class="container">
 +
<div class="row">
 +
<div class="copyright-content">
 +
 +
<div class="row">
 +
 +
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
 +
<img height=20 src="https://static.igem.org/mediawiki/2018/thumb/2/28/T--NEU_China_B--tb1.png/799px-T--NEU_China_B--tb1.png"
 +
alt="" class="src">
 +
<img height=20 src="https://static.igem.org/mediawiki/2018/thumb/6/60/T--NEU_China_B--tb0.png/800px-T--NEU_China_B--tb0.png"
 +
alt="" class="src">
 +
<img height=20 src="https://static.igem.org/mediawiki/2018/5/52/T--NEU_China_B--tb3.png" alt="" class="sr">
 +
<img height=20 src="https://static.igem.org/mediawiki/2018/4/4f/T--NEU_China_B--tb2.png" alt="" class="src">
 +
<img height=20 src="https://static.igem.org/mediawiki/2018/4/48/T--NEU_China_B--tb4.png" alt="" class="src">
 +
<img height=20 src="https://static.igem.org/mediawiki/2018/thumb/b/be/T--NEU_China_B--tb5.png/799px-T--NEU_China_B--tb5.png"
 +
alt="" class="src">
 +
 +
</div>
 +
 +
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
 +
<img height=20 src="https://static.igem.org/mediawiki/2018/thumb/b/b9/T--NEU_China_B--tb6.png/320px-T--NEU_China_B--tb6.png"
 +
alt="" class="src">
 +
<img height=20 src="https://static.igem.org/mediawiki/2018/thumb/d/d9/T--NEU_China_B--tb7.png/320px-T--NEU_China_B--tb7.png"
 +
alt="" class="src">
 +
<img height=20 src="https://static.igem.org/mediawiki/2018/thumb/4/4a/T--NEU_China_B--tb8.png/320px-T--NEU_China_B--tb8.png"
 +
alt="" class="src">
 +
<img height=20 src="https://static.igem.org/mediawiki/2018/thumb/4/47/T--NEU_China_B--tb9.png/799px-T--NEU_China_B--tb9.png"
 +
alt="" class="src">
 +
<img height=20 src="https://static.igem.org/mediawiki/2018/thumb/2/2d/T--NEU_China_B--tb10.png/202px-T--NEU_China_B--tb10.png"
 +
alt="" class="src">
 +
<img height=20 src="https://static.igem.org/mediawiki/2018/thumb/b/be/T--NEU_China_B--tb5.png/320px-T--NEU_China_B--tb5.png"
 +
alt="" class="src">
 +
<img height=20 src="https://static.igem.org/mediawiki/2018/4/4f/T--NEU_China_B--tb2.png" alt="" class="src">
 +
 +
</div>
 +
 +
</div>
 +
 +
</div>
 +
<ul class="social">
 +
</ul>
 +
</div>
 +
</div>
 +
</div>
 +
<!--/ End Copyright -->
 +
</footer>
  
 
</html>
 
</html>

Latest revision as of 03:39, 18 October 2018

Ruby - Responsive Corporate Tempalte

您的浏览器不支持 HTML5 canvas 标签。

Abstract


The role of L-lactate is not always beneficial for the yogurt fermentation due to excessive L-lactate can provide an optimized growth condition for yeast and mold. Therefore, it is important to detect the concentration of L-lactate. Acid-base titration is a common method for it, but this method is complicated and time-consuming. In order to monitor L-lactate quickly and conveniently, we designed a biosensor for detecting L-lactate concentration by using the lldPRD L-lactate operon and QS system in E. coli. One of these parts is able to induce the lldPRD genes expression, LuxS protein, in the presence of L-lactate. LuxS protein catalyzes the SAM cycle and produces a small signaling molecule AI-2 that motivates our second part promoter of LsrA&K to promote GFP expression. The optic fiber is able to detect the GFP signal and convert it into current. Simultaneously, the entire device container will be made by 3D printing.