<!DOCTYPE html>
<html lang="fr" ng-app="FICApp">
  <head>
    <meta charset="utf-8">
    <title ng-bind="'Challenge Forensic' + ($root.title?' - '+$root.title:'')">Challenge Forensic</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
    <meta name="author" content="EPITA Laboratoire SRS">
    <meta name="robots" content="all">
    <base href="/">
    <link href="/css/bootstrap.min.css" type="text/css" rel="stylesheet" media="screen">
    <link href="/css/glyphicon.css" type="text/css" rel="stylesheet" media="screen">
    <link href="/css/fic.css" type="text/css" rel="stylesheet" media="screen">
    <script src="/js/angular.min.js"></script>
  </head>
  <body class="bg-light">

    <div class="navbar navbar-expand-lg navbar-dark bg-dark text-light" ng-controller="CountdownController">
      <div class="container">
	<div class="col-auto d-none d-sm-block">
          <a ng-href="{{ (time.remaining === undefined || my.team_id)?'https://www.forum-fic.com/':'/' }}">
            <img src="/img/fic.png" alt="Forum International de la Cybersécurité" class="center-block">
	  </a>
	</div>
	<div class="clock col-auto text-center" ng-hide="1">Chargement...</div>
	<div class="clock col text-center" ng-class="{expired: time.expired, end: time.end}" ng-if="time.remaining !== undefined && settings.end - settings.start > 0" ng-cloak>
	  <span ng-class="{'d-none': !time.hours, 'd-sm-inline': !time.hours}">
            <span id="hours">{{ time.hours | time }}</span>
            <span class="point">:</span>
	  </span>
          <span id="min">{{ time.minutes | time }}</span>
	  <span ng-class="{'d-none': time.hours, 'd-sm-inline': time.hours}">
            <span class="point">:</span>
            <span id="sec">{{ time.seconds | time }}</span>
	  </span>
	</div>
	<div class="clock col-auto btn-group btn-group-lg" ng-if="time.remaining === undefined || settings.end - settings.start <= 0" ng-cloak>
	    <a class="btn btn-light" href="/">
	      <span class="glyphicon glyphicon-home"></span> Accueil
	    </a>
	    <a class="btn btn-light" href="/rank">
	      <span class="glyphicon glyphicon-list"></span> Classement
	    </a>
	    <a class="btn btn-light" ng-class="{'disabled': settings.videoslink == ''}" href="{{ settings.videoslink }}">
	      <span class="glyphicon glyphicon-blackboard"></span> Vidéos
	    </a>
	</div>
	<div class="col-auto d-none d-md-block">
	  <div class="carousel slide" data-ride="carousel" data-interval="30000" style="width: 150px">
	    <div class="carousel-inner text-center">
	      <div class="carousel-item active">
		<a href="http://www.epita.fr/">
		  <img src="/img/epita.png" alt="Epita">
		</a>
	      </div>
	      <div class="carousel-item">
		<a href="https://srs.epita.fr/">
		  <img src="/img/srs.png" alt="Laboratoire SRS Épita">
		</a>
	      </div>
	      <div class="carousel-item">
		<img src="/img/comcyber.png" alt="Réserves de cyberdéfense">
	      </div>
	    </div>
	  </div>
	</div>
      </div>
    </div>

    <div ng-controller="DataController">

    <div class="sticky-top">
    <nav class="navbar navbar-expand-sm bg-primary" style="border-bottom: none;" ng-cloak>
      <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navMenu" aria-controls="navMenu" aria-expanded="false" aria-label="Toggle navigation">
	<span class="navbar-toggler-icon"></span>
      </button>
      <div class="collapse navbar-collapse" id="navMenu">
	<ul class="navbar-nav mr-auto">
	  <li class="nav-item">
	    <a class="nav-link" href="/">Accueil</a>
	  </li>
	  <li class="nav-item dropdown" ng-class="{active: current_theme}">
	    <a class="nav-link dropdown-toogle" href="#" id="themesMenu" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
	      Scénarii
	    </a>
	    <div class="dropdown-menu niceborder">
	      <a ng-repeat="(k,theme) in themes" ng-class="{active: k == current_theme}" class="dropdown-item" ng-href="/{{ theme.urlid }}">{{ theme.name }} <span class="badge badge-light"><span class="glyphicon glyphicon-fire" aria-hidden="true" ng-if="max_solved > 1 && theme.solved == max_solved" title="Déjà {{ theme.solved }} défis ont été résolus dans ce thème"></span> <span class="glyphicon glyphicon-gift" aria-hidden="true" ng-if="theme.exercice_coeff_max > 1" title="Des bonus existent pour au moins un défi de ce thème"></span> <span ng-if="(my.team_id)">{{ theme.exercice_solved }}/</span>{{ theme.exercice_count }}</span></a>
	    </div>
	  </li>
	  <li class="nav-item dropdown" ng-class="{active: current_tag}">
	    <a class="nav-link dropdown-toogle" href="#" id="tagsMenu" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
	      Tags
	    </a>
	    <div class="dropdown-menu niceborder">
	      <input type="search" class="dropdown-item" placeholder="Filtrer" id="filtertag" ng-model="filtertag">
	      <div>
		<a ng-repeat="tname in tagsl | filter: filtertag" ng-class="{active: tname == current_tag}" class="dropdown-item" ng-href="/tags/{{ tname }}">#{{ tname }} <span class="badge badge-light"><span ng-if="(my.team_id)">{{ tags[tname].solved }}/</span>{{ tags[tname].count }}</span></a>
	      </div>
	    </div>
	  </li>
	  <li class="nav-item">
	    <a class="nav-link" href="/rank">Classement</a>
	  </li>
	  <li class="nav-item" ng-if="issues.length > 0">
	    <a class="nav-link" href="/issues">
	      Problèmes <span class="badge" ng-class="{'badge-danger': issues_need_info && issues_known_responses != issues_nb_responses,'badge-warning': !issues_need_info && issues_known_responses != issues_nb_responses,'badge-light': issues_known_responses == issues_nb_responses}">{{ issues_nb_responses }}</span>
	    </a>
	  </li>
	  <li class="nav-item">
	    <a class="nav-link" href="/rules">Aide</a>
	  </li>
	</ul>
      </div>
      <span class="navbar-text text-light" ng-show="(my.team_id)" ng-cloak>
	{{ my.score | number }} <ng-pluralize count="my.score" when="{'0': 'point', '-1': 'point', 'one': 'point', 'other': 'points'}"></ng-pluralize> <span ng-show="teams[my.team_id].rank">&ndash; {{ teams[my.team_id].rank }}<sup>e</sup> sur {{ teams_count }}</span>
	<h4 style="display: inline">
	  <a tabindex="0" href="/edit" class="badge" role="button" style="background-color: {{ teams[my.team_id].color }}; color: {{ teams[my.team_id].color }};">
	    <span class="teamname">{{ my.name }}</span>
	  </a>
	</h4>
      </span>
      <span class="navbar-text text-light" ng-show="!my.team_id && settings.allowRegistration" ng-cloak>
	<a ng-href="/register" class="badge badge-warning" role="button">
	  Inscription
	</a>
      </span>
    </nav>

    <div class="progress" style="background-color: #4eaee6; height: 5px; border-radius: 0;">
      <div class="progress-bar bg-secondary" role="progressbar" style="width: {{timeProgression * 100}}%"></div>
    </div>
    </div>

    <div style="background-image: url({{ themes[current_theme].image }})" ng-if="(current_theme)" class="page-header">
      <div class="container text-primary" ng-cloak>
	<h1 class="display-2"><a ng-href="{{ themes[current_theme].urlid }}" ng-bind="themes[current_theme].name"></a></h1>
	<h2 ng-bind-html="themes[current_theme].authors"></h2>
      </div>
      <div class="headerfade"></div>
    </div>

    <div class="container text-primary clearfix" ng-if="!current_theme" ng-cloak>
      <h1 ng-if="title" ng-cloak>{{ title }} <small class="authors" ng-if="authors">{{ authors }}</small></h1>
      <h1 ng-if="!title">{{ settings.title }} <small class="authors">{{ settings.authors }}</small></h1>
    </div>

    <div class="container" ng-view>
      <noscript>
	<div class="alert alert-danger mt-4">
	  <strong>Veuillez activer le JavaScript.</strong> Ce site requiert un navigateur interprêtant le JavaScript pour fonctionner. Veuillez l'activer ou en télécharger un supportant cette technologie.
	</div>
      </noscript>
    </div>

    <script src="/js/jquery.min.js"></script>
    <script src="/js/bootstrap.min.js"></script>
    <script src="/js/angular-route.min.js"></script>
    <script src="/js/angular-sanitize.min.js"></script>
    <script src="/js/i18n/angular-locale_fr-fr.js"></script>
    <script src="/js/challenge.js"></script>
    <script src="/js/common.js"></script>
    <script src="/js/blake2b.js" defer></script>
  </body>
</html>
