Use same header on public and teams interface

This commit is contained in:
Némunaire 2013-11-25 15:35:56 +01:00
parent 4efc90a5f0
commit b6792f3b72
8 changed files with 59 additions and 79 deletions

View file

@ -30,7 +30,7 @@
text-shadow: 0 0 5px #00c6ff;
}
#point {
.point {
position: relative;
-moz-animation: mymove 1s ease infinite;
-webkit-animation: mymove 1s ease infinite;

20
htdocs/js/countdown.js Normal file
View file

@ -0,0 +1,20 @@
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() {
setInterval( function() {
update_end();
}, 1000);
});

View file

@ -6,26 +6,7 @@
{/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>
{include file="clock.tpl"}
<div class="container" style="margin-top: 25px">
{if $ERRmessage}
@ -67,32 +48,19 @@
{/block}
{block name=end}
<script src="/js/countdown.js"></script>
<script type="text/javascript">
var end_challenge = new Date({$END * 1000});
{literal}
function update_end()
{
var left = (end_challenge - new Date())/1000;
$(document).ready(function() {
update_end();
$('#carousel-team').carousel({
interval: 2000 });
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);
});
setInterval( function() {
update_end();
}, 1000);
});
{/literal}
</script>
{/block}

View file

@ -1,9 +1,5 @@
{extends file="teams/theme.tpl"}
{block name=head}
<link href="/css/common.css" rel="stylesheet">
{/block}
{block name=exercices}
<div class="panel panel-info">
<div class="panel-heading">

View file

@ -1,28 +1,30 @@
{extends file="layout.tpl"}
{block name=head}
<link href="/css/home.css" rel="stylesheet">
<link href="/css/score.css" rel="stylesheet">
{/block}
{block name=end}
<script src="/js/countdown.js"></script>
<script type="text/javascript">
var end_challenge = new Date({$END * 1000});
{literal}
$(document).ready(function() {
update_end();
$('#carousel-team').carousel({
interval: 2000 });
setInterval( function() {
update_end();
}, 1000);
});
{/literal}
</script>
{/block}
{block name=body}
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/{$SALT_USER}/{$my_team->get_id()}">FIC</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="active"><a href="/{$SALT_USER}/{$my_team->get_id()}/themes">Thèmes</a></li>
<li><a href="/{$SALT_USER}/{$my_team->get_id()}/scores">Scores</a></li>
<li><a href="/{$SALT_USER}/{$my_team->get_id()}/me">Ma team</a></li>
</ul>
<p class="navbar-right navbar-text">01:23:42</p>
</div><!-- /.navbar-collapse -->
</nav>
{include file="clock.tpl"}
<div class="container" style="margin-top: 25px">
{if $ERRmessage}
@ -34,7 +36,8 @@
<div class="row">
<div class="col-md-2">
<aside>
<aside class="panel panel-default">
<div class="panel-body">
<p>
<span style="font-weight: bolder;">{$my_team->get_name()}<a class="badge pull-right" href="/{$SALT_USER}/{$my_team->get_id()}/me">Modifier</a></span>
<em>{$my_team->get_slogan()}</em>
@ -43,6 +46,7 @@
{$my_team->get_pts()} points<a class="badge pull-right" href="/{$SALT_USER}/{$my_team->get_id()}/summary">Synthèse</a><br>
{$my_team->get_rank()}<sup>e</sup> sur {Team::get_nb_teams()}
</p>
</div>
</aside>
<div class="list-group">

View file

@ -1,9 +1,5 @@
{extends file="teams/layout.tpl"}
{block name=head}
<link href="/css/common.css" rel="stylesheet">
{/block}
{block name=content}
<h1>
THIS IS ME

View file

@ -1,9 +1,5 @@
{extends file="teams/layout.tpl"}
{block name=head}
<link href="/css/common.css" rel="stylesheet">
{/block}
{block name=content}
{include file="summary.tpl"}
{/block}

View file

@ -11,7 +11,7 @@
<a class="btn btn-primary" role="button" href="/{$SALT_USER}/{$my_team->get_id()}/{$cur_theme->get_id()}-{$cur_theme->get_name()}/{$exercice->get_id()}">{$exercice->get_name()}</a>
{else}
<a class="btn btn-danger">{$exercice->get_name()}</a>
<a class="btn btn-danger" disabled="disabled">{$exercice->get_name()}</a>
{/if}
{/foreach}
</p>