{% extends 'html.html' %}

{% block script %}
const proceed = e => {
  e.preventDefault()
  window.location.assign('/' + $('.inputbox').val())
}
$('.proceed').on('click', proceed)
$('.inputbox').on('keyup', e => {
  if (e.keyCode == 13) proceed(e)
})
{% endblock %}

{% block contentBox %}
  {% if showErrorMessage %}<div class="text errorMessage">The access code you entered is wrong.  Please try again.</div>{% endif %}
  <h2 id="title">Welcome</h2>
  <div id="message" class="text">Please provide your access code:</div>
  <div class="text"><input class="inputbox" type="text" placeholder="access code"></input></div>
  <div><a class="button proceed" href="">Proceed</a></div>
{% endblock %}
