Difference between revisions of "Template:Kyoto Common"

 
(13 intermediate revisions by 2 users not shown)
Line 99: Line 99:
 
   line-height:72px;
 
   line-height:72px;
 
}
 
}
 +
kyoto-calender table{
 +
    border-collapse: collapse;
 +
    margin: 10px;
 +
    margin-right: 4px;
 +
    float: left;
 +
}
 +
.kyoto-calendar th{
 +
    width: 24px;
 +
    border: none;
 +
    padding: 3px;
 +
    background-color: #135589;
 +
    color: #ffffff;
 +
}
 +
 +
.kyoto-calendar td {
 +
    width: 24px;
 +
    height: 24px;
 +
    border: none;
 +
    padding: 0px;
 +
    text-align: center;
 +
}
 +
 +
.kyoto-calendar a {
 +
    width: 100%;
 +
    height: 100%;
 +
    display: block;
 +
    padding-bottom: 2px;
 +
    text-align: center;
 +
    background-color: #aaddff;
 +
}
 +
 +
.kyoto-calendar a:hover{
 +
    background-color: #135589;
 +
    color:#ffffff;
 +
}
 +
 
#nv0 a{
 
#nv0 a{
 
   background: url(https://static.igem.org/mediawiki/2016/8/88/T--Kyoto--Norofig.png);
 
   background: url(https://static.igem.org/mediawiki/2016/8/88/T--Kyoto--Norofig.png);
Line 287: Line 323:
 
#cont li {
 
#cont li {
 
   font-size:13px;
 
   font-size:13px;
   color:#135589;
+
   /*color:#135589;*/
 
   margin-bottom:0px;
 
   margin-bottom:0px;
 
   font-weight:700;
 
   font-weight:700;
Line 315: Line 351:
 
   color:#646464;
 
   color:#646464;
 
   margin-bottom:10px;
 
   margin-bottom:10px;
 +
  font-weight:400;
 +
}
 +
#hp {
 +
  margin:0 0 17px 0;
 +
  padding:0;
 +
  border:0;
 +
  background:none;
 +
}
 +
#hp li{
 +
  list-style:none;
 +
  font-size:15px;
 +
  color:#646464;
 +
  margin-bottom:10px;
 +
  font-weight:400;
 +
}
 +
#hp2 {
 +
  margin:0 0 17px 0;
 +
  padding:0;
 +
  border:0;
 +
  background:none;
 +
}
 +
#hp2 li{
 +
  list-style:square;
 +
  font-size:15px;
 +
  color:#646464;
 +
  margin-bottom:10px;
 +
  margin-left:2em;
 +
  font-weight:400;
 
}
 
}
 
 
  
 
a:link {
 
a:link {
Line 341: Line 403:
 
   height: auto;
 
   height: auto;
 
   }
 
   }
 +
 +
  img.hpimg{
 +
  margin-top: 20px;
 +
  max-width: 600px;
 +
  height: auto;
 +
  }
 +
  
 
</style>
 
</style>
Line 424: Line 493:
  
 
</script>
 
</script>
 
<!-- COUNTDOWN -->
 
<div id="kyoto_alert">count down</div>
 
<style type="text/css">
 
#kyoto_alert {
 
  position: fixed;
 
  bottom: 30px;
 
  right: 10px;
 
  height: 30px;
 
  width: 300px;
 
  padding: 30px 10px;
 
  display: none;
 
 
  /* text */
 
  line-height: 30px;
 
  font-size: 30px;
 
  font-family: sans-serif;
 
  text-align: center;
 
  text-decoration: none;
 
 
  /* color */
 
  background-color: #aaa;
 
  border: 4px solid #888;
 
  color: #eee;
 
 
  /* box sizing */
 
  box-sizing: content-box;
 
  -webkit-box-sizing: content-box;
 
  -moz-box-sizing: content-box;
 
 
  /* border radius */
 
  border-radius: 20px;
 
  -webkit-border-radius: 20px;
 
  -moz-border-radius: 20px;
 
 
  /* select cancel */
 
  user-select: none;
 
  -webkit-user-select: none;
 
  -moz-user-select: none;
 
  -khtml-user-select: none;
 
}
 
</style>
 
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
 
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js"></script>
 
<script>
 
$(function(){
 
 
/* October 17 wiki FREEZE at 12:00PM EDT */
 
var year = 2016;
 
var month = 10;
 
var day = 20;
 
var freeze = Date.UTC(year, month-1, day, 3, 59, 0);
 
 
function get_current_utc() {
 
    var date = new Date();
 
    return Date.UTC(
 
        date.getUTCFullYear(),
 
        date.getUTCMonth(),
 
        date.getUTCDate(),
 
        date.getUTCHours(),
 
        date.getUTCMinutes(),
 
        date.getUTCSeconds()
 
    );
 
}
 
 
/*
 
* return array of the quoteient and remainder
 
*/
 
function qr(dividend, divisor) {
 
    return [Math.floor(dividend/divisor),
 
        dividend%divisor];
 
}
 
 
function repeat_str(str, n) {
 
    var retval = '';
 
    for (var i = 0; i < n; i++) {
 
        retval += str;
 
    }
 
    return retval;
 
}
 
 
/*
 
* transfer Integer to String
 
*/
 
function itos(number, figures) {
 
    return [repeat_str('0', figures-1),number]
 
        .join('').slice(-figures);
 
}
 
 
var timer = setInterval(function() {
 
    //var countdown = document.getElementById("kyoto_alert");
 
    var $countdown = $("#kyoto_alert");
 
    var current_utc = get_current_utc();
 
    var interval = (freeze - current_utc)/1000;
 
    if (interval < 0) {
 
        $countdown.hide();
 
    } else if (interval < 4 * 24 * 3600) {
 
        if (interval < 1 * 3600)
 
            $countdown.css("color", "#f00");
 
        else if (interval < 24 * 3600)
 
            $countdown.css("color", "#ff0");
 
 
        var time = [];
 
        var second_qr = qr(interval, 60);
 
        time.push(itos(second_qr[1], 2) + 's');
 
        var minute_qr = qr(second_qr[0], 60);
 
        time.push(itos(minute_qr[1], 2) + 'm');
 
        time.push(itos(minute_qr[0], 2) + 'h');
 
        $countdown.text(time.reverse().join(' : '));
 
        $countdown.show();
 
    } else {
 
        var time = [];
 
        interval = Math.floor(interval / 60);
 
        var minute_qr = qr(interval, 60);
 
        time.push(itos(minute_qr[1], 2) + 'm');
 
        var hour_qr = qr(minute_qr[0], 24);
 
        time.push(itos(hour_qr[1], 2) + 'h');
 
        time.push(itos(hour_qr[0], 3) + 'd');
 
        $countdown.text(time.reverse().join(' : '));
 
        $countdown.show();
 
    }
 
}, 200);
 
 
$("#kyoto_alert").draggable();
 
 
});
 
</script>
 
 
  
  
 
</html>
 
</html>

Latest revision as of 02:52, 20 October 2016