server/onyx/tpl/bootstrap/public/layout.tpl

99 lines
2.3 KiB
Smarty
Raw Normal View History

2013-11-25 10:55:15 +00:00
{extends file="layout.tpl"}
{block name=head}
<link href="/css/home.css" rel="stylesheet">
<link href="/css/score.css" rel="stylesheet">
{/block}
{block name=content}
<div class="clock">
<div id="ficlogo">
<a href="http://www.forum-fic.com/">
<img src="img/challenge.jpg" alt="Forum International de la Cybersécurité">
</a>
</div>
<div id="epitalogo">
<a href="http://www.epita.fr/">
<img src="img/epita.png" alt="Epita">
</a>
</div>
<div id="Date"></div>
<ul>
<li id="hours"></li>
<li id="point">:</li>
<li id="min"></li>
<li id="point">:</li>
<li id="sec"></li>
</ul>
</div>
<div class="container" style="margin-top: 25px">
{if $ERRmessage}
<div class="alert alert-{$ERRcolor}">
<button class="close" data-dismiss="alert">&times;</button>
<i class="icon-warning-sign"></i> {$ERRmessage}
</div>
{/if}
<div class="row">
<div class="col-md-2">
<h3>Top 10</h3>
<div class="list-group">
{foreach from=$top item=t key=k}
<div class="list-group-item">{$k+1}. <a href="/{$t->id}-{$t->get_name()}">{$t->get_name()}</a></div>
{/foreach}
</div>
</div>
<div class="col-md-10">
{block name=main}{/block}
</div>
</div>
{if isset($teams)}
<div id="carousel-team" class="carousel slide">
<div class="carousel-inner">
{foreach from=$teams item=my_team key=k}
<div class="item{if $k == 0} active{/if}">
<div class="well">
<h1>{$my_team->get_name()}</h1>
{include file="summary.tpl"}
</div>
</div>
{/foreach}
</div>
</div>
{/if}
</div>
{/block}
{block name=end}
<script type="text/javascript">
var end_challenge = new Date({$END * 1000});
{literal}
function update_end()
{
var left = (end_challenge - new Date())/1000;
if (left < 0) left = 0;
var heure = Math.floor(left / 3600);
var min = Math.floor((left / 60) % 60);
var sec = Math.floor(left % 60);
$("#hours").html(( heure < 10 ? "0" : "" ) + heure);
$("#min").html(( min < 10 ? "0" : "" ) + min);
$("#sec").html(( sec < 10 ? "0" : "" ) + sec);
}
$(document).ready(function() {
update_end();
$('#carousel-team').carousel({
interval: 2000 });
setInterval( function() {
update_end();
}, 1000);
});
{/literal}
</script>
{/block}