121 lines
6.3 KiB
HTML
121 lines
6.3 KiB
HTML
{% extends "layout.html" %}
|
|
{% block content %}
|
|
{% set srs_levels = ['burned', 'enlighten', 'master', 'guru', 'apprentice'] -%}
|
|
{% set item_types = ['radical', 'kanji', 'vocab'] %}
|
|
<div class="modal fade" id="modal-filter" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
|
|
<div class="modal-dialog modal-sm">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
<h4 class="modal-title">Filter</h4>
|
|
</div>
|
|
<form id="filter-form">
|
|
<div class="modal-body">
|
|
<label for="filter-input">Level</label><input type="text" pattern="\d[\d-,]*\d*" class="form-control" id="filter-input" placeholder="e.g. 1-3,5,8 (leave blank for all)">
|
|
<br />
|
|
<p><strong>Progress</strong></p>
|
|
{% for srs_tag in srs_levels %}
|
|
<input type="checkbox" id="{{ srs_tag }}check" name="{{ srs_tag }}" value="{{ srs_tag }}" {% if srs_tag == "burned" %}checked{% endif %}><label for="{{ srs_tag }}check">{{ srs_tag|capitalize }}</label>
|
|
<br />
|
|
{% endfor %}
|
|
<p><strong>Type</strong></p>
|
|
{% for item in item_types %}
|
|
<input type="checkbox" id="{{ item }}check" name="{{ item }}" value="{{ item }}" checked><label for="{{ item }}check">{{ item|capitalize }}</label>
|
|
<br />
|
|
{% endfor %}
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
<button class="btn btn-primary" type="submit">Save changes</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<nav class="navbar navbar-default">
|
|
<div class="container-fluid">
|
|
<div class="navbar-header">
|
|
<a class="navbar-brand" href="{{ url_for('show_home') }}">
|
|
<img alt="Brand" height="24" width="24" src="{{ url_for('static', filename='burned.png')}}">
|
|
</a>
|
|
</div>
|
|
<ul class="nav navbar-nav navbar-right">
|
|
<li data-toggle="tooltip" data-placement="bottom" data-html="true" title="Available modes:<br>Random<br>Linear">
|
|
<button type="button" id="mode-toggle" class="btn btn-default navbar-btn">
|
|
Random Mode
|
|
</button>
|
|
</li>
|
|
<li>
|
|
<button type="button" id="itemfilter" class="btn btn-default navbar-btn" data-toggle="modal" data-target="#modal-filter">
|
|
Filter
|
|
</button>
|
|
</li>
|
|
<li class="dropdown">
|
|
<button class="btn btn-default navbar-btn dropdown-toggle" data-toggle="dropdown">Stats</button>
|
|
<ul class="dropdown-menu" aria-labelledby="dLabel">
|
|
<li><span id="radical-num"></span> Radicals</li>
|
|
<li><span id="kanji-num"></span> Kanji</li>
|
|
<li><span id="vocab-num"></span> Vocabulary</li>
|
|
<li><span id="total-num"></span> Total</li>
|
|
</ul>
|
|
</li>
|
|
<li id="api-refresh" class="navbar-text" data-html="true" data-toggle="tooltip" data-placement="bottom" title="Last API Refresh:<br>{{ current_user.last_updated|datetime_format }}<br>Click to refresh"><img alt="avatar" src="http://www.gravatar.com/avatar/{{ current_user.gravatar }}?s=24"> {{ current_user.username }}</li>
|
|
<li><a href="{{ url_for('logout') }}">Logout</a></li>
|
|
</ul>
|
|
</div>
|
|
</nav>
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col-md-2 col-md-offset-10 col-xs-3 col-xs-offset-9">
|
|
<div id="quiz-counter" class="input-group" style="visibility: hidden">
|
|
<input id="current-quiz" type="number" class="form-control">
|
|
<span id="total-quiz" class="input-group-addon">/0</span>
|
|
<span class="input-group-btn">
|
|
<button class="btn btn-default" id="skip-to-item" type="button">Go!</button>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-12 text-center">
|
|
<div id="error-area" class="alert alert-danger alert-dismissible collapse" role="alert">
|
|
<button type="button" class="close" aria-label="Close"><span aria-hidden="true">×</span></button><div id="error-text"></div>
|
|
</div>
|
|
<div id="success-area" class="alert alert-success alert-dismissible collapse" role="alert">
|
|
<button type="button" class="close" aria-label="Close"><span aria-hidden="true">×</span></button>API Refreshed!
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-12 text-center"><p class="question-size" id="question-area"></p><img id="question-image" src=""></div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="input-group">
|
|
<span class="input-group-addon"> </span>
|
|
<label for="kana"></label><input type="text" autocomplete=off id="kana" class="form-control answer-size answer-form">
|
|
<span class="input-group-btn">
|
|
<button id="submit-answer" class="btn btn-default answer-form" type="button"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span></button>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<br />
|
|
<div class="row">
|
|
<div class="btn-group btn-group-justified col-md-12 text-center" role="group">
|
|
<div class="btn-group" role="group">
|
|
<button class="btn btn-default btn-lg" id="get-help">Reveal Answer(s)</button>
|
|
</div>
|
|
<a class="btn btn-default btn-lg" href="" id="view-on-wk">View on WaniKani</a>
|
|
</div>
|
|
</div>
|
|
<br />
|
|
<div class="row">
|
|
<div id="answer" class="col-md-12 text-center help-size hidden">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script src="{{ url_for('static', filename='wanakana.min.js')}}"></script>
|
|
<script defer src="{{ url_for('static', filename='quiz_item.js')}}"></script>
|
|
{% endblock %}
|