Export themes as array
This commit is contained in:
parent
492ab72dcd
commit
0ddd6c4899
3 changed files with 83 additions and 70 deletions
|
|
@ -12,15 +12,15 @@
|
|||
</ol>
|
||||
</nav>
|
||||
|
||||
<div class="alert alert-warning" style="margin-top:15px;" ng-if="!(my.exercices[current_exercice])">
|
||||
<div class="alert alert-warning" style="margin-top:15px;" ng-if="!(my.exercices[current_exercice_my])">
|
||||
Vous n'avez pas encore accès à cet exercice.
|
||||
</div>
|
||||
<div class="jumbotron text-indent" style="margin-top: 15px" class="well well-lg" ng-if="!(my.exercices[current_exercice])">
|
||||
<div class="jumbotron text-indent" style="margin-top: 15px" class="well well-lg" ng-if="!(my.exercices[current_exercice_my])">
|
||||
<p class="lead text-justify" ng-bind-html="themes[current_theme].intro"></p>
|
||||
</div>
|
||||
<div class="jumbotron text-indent" style="margin-top: 15px" class="well well-lg" ng-if="(my.exercices[current_exercice])">
|
||||
<div class="jumbotron text-indent" style="margin-top: 15px" class="well well-lg" ng-if="(my.exercices[current_exercice_my])">
|
||||
<h3 class="display-4">{{ themes[current_theme].exercices[current_exercice].title }}</h3>
|
||||
<p class="lead text-justify" ng-bind-html="my.exercices[current_exercice].statement"></p>
|
||||
<p class="lead text-justify" ng-bind-html="my.exercices[current_exercice_my].statement"></p>
|
||||
<hr class="my-3">
|
||||
<ul>
|
||||
<li><strong>Gain :</strong> <ng-pluralize count="themes[current_theme].exercices[current_exercice].gain" when="{'one': '{} point', 'other': '{} points'}"></ng-pluralize> <em ng-if="settings.firstBlood && themes[current_theme].exercices[current_exercice].solved < 1">{{ 1 + settings.firstBlood | coeff }} prem's</em> <em ng-if="themes[current_theme].exercices[current_exercice].curcoeff != 1.0">{{ themes[current_theme].exercices[current_exercice].curcoeff | coeff }} bonus</em></li>
|
||||
|
|
@ -30,13 +30,13 @@
|
|||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-xl" ng-if="(my.exercices[current_exercice] && my.exercices[current_exercice].files.length)" style="margin-bottom: 15px">
|
||||
<div class="col-xl" ng-if="(my.exercices[current_exercice_my] && my.exercices[current_exercice_my].files.length)" style="margin-bottom: 15px">
|
||||
<div class="card" style="margin-bottom: 15px">
|
||||
<div class="card-header text-white">
|
||||
<span class="glyphicon glyphicon-download-alt" aria-hidden="true"></span> Téléchargements
|
||||
</div>
|
||||
<div class="list-group">
|
||||
<a ng-href="{{ file.path }}" target="_self" class="list-group-item" ng-repeat="file in my.exercices[current_exercice].files">
|
||||
<a ng-href="{{ file.path }}" target="_self" class="list-group-item" ng-repeat="file in my.exercices[current_exercice_my].files">
|
||||
<h1 class="float-left" style="margin: 7px 7px 5px -5px"><span class="glyphicon glyphicon-download" aria-hidden="true"></span></h1>
|
||||
<h4 class="list-group-item-heading"><strong><samp>{{ file.name }}</samp></strong></h4>
|
||||
<p class="list-group-item-text"><nobr>Taille : <span title="{{ file.size }} octets">{{ file.size | size }}</span></nobr> – <nobr><span title="blake2.net">b2sum</span> : <samp class="cksum" title="{{ file.checksum }}">{{ file.checksum }}</samp></nobr></p>
|
||||
|
|
@ -45,13 +45,13 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xl" ng-if="(my.exercices[current_exercice] && my.exercices[current_exercice].hints.length)" style="margin-bottom: 15px">
|
||||
<div class="col-xl" ng-if="(my.exercices[current_exercice_my] && my.exercices[current_exercice_my].hints.length)" style="margin-bottom: 15px">
|
||||
<div class="card border-info" style="margin-bottom: 15px">
|
||||
<div class="card-header bg-info text-white">
|
||||
<span class="glyphicon glyphicon-lamp" aria-hidden="true"></span> Indices
|
||||
</div>
|
||||
<div class="list-group">
|
||||
<a target="_self" class="list-group-item text-light" ng-repeat="hint in my.exercices[current_exercice].hints" ng-href="{{ hint.file }}">
|
||||
<a target="_self" class="list-group-item text-light" ng-repeat="hint in my.exercices[current_exercice_my].hints" ng-href="{{ hint.file }}">
|
||||
<button ng-click="hsubmit(hint)" class="float-right btn btn-info" ng-if="!(hint.content || hint.file)" ng-class="{disabled: hint.submitted}"><span class="glyphicon glyphicon-lock" aria-hidden="true"></span> Débloquer</button>
|
||||
<button ng-click="hint.hidden = false;" class="float-right btn btn-info" ng-if="!hint.file && hint.hidden"><span class="glyphicon glyphicon-lock" aria-hidden="true"></span> Afficher</button>
|
||||
<h1 class="float-left" style="margin: 5px 7px 5px -5px" ng-if="hint.file"><span class="glyphicon glyphicon-download" aria-hidden="true"></span></h1>
|
||||
|
|
@ -65,15 +65,15 @@
|
|||
</div>
|
||||
|
||||
<div class="col-xl" style="margin-bottom: 25px">
|
||||
<div class="card border-danger" ng-if="my.team_id && my.exercices[current_exercice] && !(my.exercices[current_exercice].solved)" style="margin-bottom: 15px">
|
||||
<div class="card border-danger" ng-if="my.team_id && my.exercices[current_exercice_my] && !(my.exercices[current_exercice_my].solved)" style="margin-bottom: 15px">
|
||||
<div class="card-header bg-danger text-white">
|
||||
<span class="glyphicon glyphicon-flag" aria-hidden="true"></span> Faire son rapport
|
||||
</div>
|
||||
<ul class="list-group" ng-if="(my.exercices[current_exercice].tries || my.exercices[current_exercice].submitted || sberr)">
|
||||
<li class="list-group-item text-warning" ng-if="my.exercices[current_exercice].tries"><ng-pluralize count="my.exercices[current_exercice].tries" when="{'one': '{} tentative effectuée', 'other': '{} tentatives effectuées'}"></ng-pluralize>. Dernière solution envoyée à {{ my.exercices[current_exercice].solved_time | date:"mediumTime" }}. <span ng-if="my.exercices[current_exercice].solve_dist"><ng-pluralize count="my.exercices[current_exercice].solve_dist" when="{'one': '{} réponse erronée', 'other': '{} réponses erronées'}"></ng-pluralize>.</span></li>
|
||||
<li class="list-group-item" ng-class="messageClass" ng-if="my.exercices[current_exercice].submitted || sberr"><strong ng-if="!sberr">Votre solution a bien été envoyée !</strong><strong ng-if="sberr">{{ sberr }}</strong> {{ message }}</li>
|
||||
<ul class="list-group" ng-if="(my.exercices[current_exercice_my].tries || my.exercices[current_exercice_my].submitted || sberr)">
|
||||
<li class="list-group-item text-warning" ng-if="my.exercices[current_exercice_my].tries"><ng-pluralize count="my.exercices[current_exercice_my].tries" when="{'one': '{} tentative effectuée', 'other': '{} tentatives effectuées'}"></ng-pluralize>. Dernière solution envoyée à {{ my.exercices[current_exercice_my].solved_time | date:"mediumTime" }}. <span ng-if="my.exercices[current_exercice_my].solve_dist"><ng-pluralize count="my.exercices[current_exercice_my].solve_dist" when="{'one': '{} réponse erronée', 'other': '{} réponses erronées'}"></ng-pluralize>.</span></li>
|
||||
<li class="list-group-item" ng-class="messageClass" ng-if="my.exercices[current_exercice_my].submitted || sberr"><strong ng-if="!sberr">Votre solution a bien été envoyée !</strong><strong ng-if="sberr">{{ sberr }}</strong> {{ message }}</li>
|
||||
</ul>
|
||||
<div class="card-body" ng-if="!my.exercices[current_exercice].submitted || sberr">
|
||||
<div class="card-body" ng-if="!my.exercices[current_exercice_my].submitted || sberr">
|
||||
<form ng-controller="SubmissionController" ng-submit="ssubmit()">
|
||||
<div class="form-group" ng-repeat="key in flags">
|
||||
<label for="sol_{{ key.id }}">{{ key.name }} :</label>
|
||||
|
|
@ -97,19 +97,19 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card border-success" ng-if="(my.team_id && my.exercices[current_exercice].solved)">
|
||||
<div class="card border-success" ng-if="(my.team_id && my.exercices[current_exercice_my].solved)">
|
||||
<div class="card-header bg-success text-white">
|
||||
<span class="glyphicon glyphicon-flag" aria-hidden="true"></span> Challenge réussi !
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p class="card-text">
|
||||
Vous êtes la {{ my.exercices[current_exercice].solved_rank }}<sup><ng-pluralize count="my.exercices[current_exercice].solved_rank" when="{'one': 're', 'other': 'e'}"></ng-pluralize></sup> équipe à avoir résolu ce challenge à {{ my.exercices[current_exercice].solved_time | date:"mediumTime" }}. Vous avez marqué <ng-pluralize count="my.exercices[current_exercice].gain" when="{'one': '{} point', 'other': '{} points'}"></ng-pluralize> !
|
||||
Vous êtes la {{ my.exercices[current_exercice_my].solved_rank }}<sup><ng-pluralize count="my.exercices[current_exercice_my].solved_rank" when="{'one': 're', 'other': 'e'}"></ng-pluralize></sup> équipe à avoir résolu ce challenge à {{ my.exercices[current_exercice_my].solved_time | date:"mediumTime" }}. Vous avez marqué <ng-pluralize count="my.exercices[current_exercice_my].gain" when="{'one': '{} point', 'other': '{} points'}"></ng-pluralize> !
|
||||
</p>
|
||||
<a href="/{{ themes[current_theme].urlid }}" class="btn btn-success">Passer au challenge suivant</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card border-success" ng-if="(!my.team_id && my.exercices[current_exercice].keys)">
|
||||
<div class="card border-success" ng-if="(!my.team_id && my.exercices[current_exercice_my].keys)">
|
||||
<div class="card-header bg-success text-white">
|
||||
<span class="glyphicon glyphicon-flag" aria-hidden="true"></span> Solution du challenge
|
||||
</div>
|
||||
|
|
@ -117,13 +117,13 @@
|
|||
<p>
|
||||
Vérifiez les clefs que vous trouvez en comparant leur <a href="https://blake2.net/">BLAKE2b</a> :
|
||||
</p>
|
||||
<dl class="dl-horizontal" ng-repeat="key in my.exercices[current_exercice].keys">
|
||||
<dl class="dl-horizontal" ng-repeat="key in my.exercices[current_exercice_my].keys">
|
||||
<dt title="{{ key.slice(128) }}">{{ key.slice(128) }}</dt>
|
||||
<dd><samp class="cksum">{{ key.slice(0, 128) }}</samp></dd>
|
||||
</dl>
|
||||
<div class="embed-responsive embed-responsive-16by9">
|
||||
<iframe type="text/html" ng-if="my.exercices[current_exercice].video_uri" ng-src="{{ my.exercices[current_exercice].video_uri }}" class="embed-responsive-item">
|
||||
Regardez la vidéo de résolution de cet exercice : <a ng-href="{{ my.exercices[current_exercice].video_uri }}">{{ my.exercices[current_exercice].video_uri }}</a>.
|
||||
<iframe type="text/html" ng-if="my.exercices[current_exercice_my].video_uri" ng-src="{{ my.exercices[current_exercice_my].video_uri }}" class="embed-responsive-item">
|
||||
Regardez la vidéo de résolution de cet exercice : <a ng-href="{{ my.exercices[current_exercice_my].video_uri }}">{{ my.exercices[current_exercice_my].video_uri }}</a>.
|
||||
</iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Reference in a new issue