Team:KAIST-Korea/Test Count

From 2011.igem.org

(Difference between revisions)
 
(91 intermediate revisions not shown)
Line 1: Line 1:
 +
{{:Team:KAIST-Korea/header}}
 +
 +
 +
<HTML>
 +
<HEAD>
 +
 +
<SCRIPT LANGUAGE="JavaScript">
 +
function getTime()
 +
{
 +
      now = new Date();
 +
      dday = new Date("Jul 15 2011 00:00:00");
 +
      days = (dday - now) / 1000 / 60 / 60 / 24;
 +
      daysRound = Math.floor(days);
 +
      hours = (dday - now) / 1000 / 60 / 60 - (24 * daysRound);
 +
      hoursRound = Math.floor(hours);
 +
      minutes = (dday - now) / 1000 /60 - (24 * 60 * daysRound) - (60 * hoursRound);
 +
      minutesRound = Math.floor(minutes);
 +
      seconds = (dday - now) / 1000 - (24 * 60 * 60 * daysRound) - (60 * 60 * hoursRound) - (60 * minutesRound);
 +
      secondsRound = Math.round(seconds);
 +
 +
      document.timeForm.input1.value = "D - "+daysRound + "      " + hoursRound + ":" + minutesRound + ":" + secondsRound;
 +
      newtime = window.setTimeout("getTime();", 1000);
 +
-
<html>
 
-
<style type="text/javascript">
 
-
<head>
 
-
 
-
<title>Countdown</title>
 
-
 
-
<script type='text/javascript' src='/res/js/jquery-1.3.2.min.js'></script>
 
-
 
-
<script type='text/javascript' src='/res/js/jquery.timers-1.1.2.js'></script>
 
-
 
-
<script type='text/javascript'>
 
-
 
-
var isFirst = true;
 
-
 
-
var endTime = new Date(2010, 11, 7, 15, 19, 30);
 
-
 
-
var nowTime = new Date(2010, 11, 6, 15, 19, 30);
 
-
 
-
var timeLeft = (endTime - nowTime) / 1000;
 
-
 
-
var timeSinceLast = 0;
 
-
 
-
$(document).ready(function(){
 
-
 
-
$(this).everyTime(1000, "countTimer", function(){
 
-
 
-
if (isFirst === true || timeLeft == -1 || (timeLeft < 300 && timeSinceLast >= 60)) {
 
-
 
-
var nt = new Date().getTime();
 
-
 
-
$.get("timesync.php?nowtime=" + nt, function(data) {
 
-
 
-
nowTime = eval('new Date(' + data + ')');
 
-
 
-
timeLeft = (endTime - nowTime) / 1000;
 
-
 
-
});
 
-
 
-
isFirst = false;
 
-
 
-
timeSinceLast = 0;
 
-
 
}
}
-
+
 
-
var outputString = '';
+
</script>
-
+
 
-
if (timeLeft <= 0) {
+
<style type="text/css">
-
+
 
-
outputString = '종료';
+
 
-
+
div {
 +
font-family:"Arial",Sans-serif; color:white;
}
}
-
+
.widget {
-
else {
+
width:250px;
-
+
margin:10px;
-
var dayCount = Math.floor(timeLeft / 86400);
+
border-right-style:solid;
-
+
border-width:1px;
-
var hourCount = Math.floor((timeLeft - dayCount * 86400) / 3600);
+
border-color:white;
-
+
}
-
var minCount = Math.floor((timeLeft - (dayCount * 86400) - (hourCount * 3600)) / 60);
+
p:hover {color:#E6E6E6;}  /* mouse over link */
-
   
+
p:active {color:#FFFFFF;} /* selected link */
-
var secCount = timeLeft - (dayCount * 86400) - (hourCount * 3600) - (minCount * 60);
+
 
-
+
 
-
+
#OpenCountdown{
-
+
        position: relative;
-
if (dayCount > 0) {
+
        font-family:arial, helvetica,sans-serif;
-
+
        font-size:20pt;
-
outputString = dayCount + '日+';
+
        font-color:white;
-
+
        left:350px;
 +
        top:50px;
}
}
-
 
-
outputString += ((hourCount > 0) ? hourCount + ':' : '') + ((minCount < 10) ? '0' + minCount : minCount) + ':' + ((secCount < 10) ? '0' + secCount : secCount);
 
-
 
-
timeLeft -= 1;
 
-
 
-
timeSinceLast += 1;
 
-
 
-
}
 
-
 
-
$('#countDown').text(outputString);
 
-
 
-
});
 
-
 
-
});
 
-
 
 +
</style>
 +
 +
</HEAD>
 +
 +
 +
<BODY onLoad="getTime()">
 +
 +
 +
 +
<form name=timeForm>
 +
<input type=text name=input1 border-style="none" style="border-bottom: 0px solid; border-left: 0px solid;border-right: 0px solid;border-top: 0px solid; font:35pt arial, helvetica,sans-serif; color:white; background-color:black; position:relative; left:380px; top:200px">
 +
</form>
 +
 +
 +
<div id="OpenCountdown">
 +
<p>
 +
2011 KAIST iGEM Teaser Site Open
 +
</p>
 +
</div>
 +
 +
 +
 +
<div id="main_closing" position:relative; left:300px; top:300px; width:200px;>
 +
<img src="https://static.igem.org/mediawiki/2011/3/39/%EA%B7%B8%EB%A6%BC2.png">
 +
</div>
 +
 +
 +
 +
<!--FACEBOOK APPLICATION-->
 +
<div class="widget">
 +
<iframe src="http://www.facebook.com/plugins/like.php?app_id=115152055242776&amp;href=http%3A%2F%2F2011.igem.org%2FTeam%3AKAIST-Korea&amp;send=false&amp;layout=standard&amp;width=300&amp;show_faces=false&amp;action=like&amp;colorscheme=dark&amp;font=arial&amp;height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:225px; height:40px;" allowTransparency="true"></iframe></iframe>
 +
 +
<br /><br />
 +
 +
<!--Twitter APPLICATION-->
 +
<script src="http://widgets.twimg.com/j/2/widget.js"></script>
 +
<script>
 +
new TWTR.Widget({
 +
  version: 2,
 +
  type: 'profile',
 +
  rpp: 4,
 +
  interval: 6000,
 +
  width: 225,
 +
  height: 300,
 +
  theme: {
 +
    shell: {
 +
      background: '#606060',
 +
      color: '#ffffff'
 +
    },
 +
    tweets: {
 +
      background: '#ffffff',
 +
      color: '#000000',
 +
      links: '#0040ff'
 +
    }
 +
  },
 +
  features: {
 +
    scrollbar: false,
 +
    loop: false,
 +
    live: false,
 +
    hashtags: true,
 +
    timestamp: true,
 +
    avatars: false,
 +
    behavior: 'all'
 +
  }
 +
}).render().setUser('iGEM_KAIST').start();
</script>
</script>
-
+
</div>
 +
 
 +
 
 +
 
 +
<div class="abstract">
 +
<forum></forum>
 +
</div>
 +
 
 +
 
 +
 
 +
 
 +
</BODY>
 +
 
 +
 
-
</head>
+
</HTML>
-
+
-
<body>
+
-
+
-
<div><span id="countDown"></span></div>
+
-
+
-
</body>
+
-
+
-
</html>
+

Latest revision as of 11:05, 8 July 2011


2011 KAIST iGEM Teaser Site Open