{% extends "layout_bs4.html" %}

{% block content_main %}
<div class="container">
  <div class="jumbotron mt-3 bg-white">
    <h1 class="display-4">Scout</h1>
    <p class="lead">Analyze VCFs quicker and easier</p>
    <hr class="my-4">
    <p>
      Scout allows you to browse VCFs in a web browser, identify
      compound pairs, and solve cases as a team.
    </p>

    <p>Version <strong>{{ version }}</strong></p>

    {% if current_user.is_authenticated %}
      <p>
        <a class="btn btn-primary btn-lg text-white" href="{{ url_for('cases.index') }}" role="button">
          Welcome <strong>{{ current_user.name }}!</strong>
        </a>
      </p>
    {% else %}
      {% if config.GOOGLE %}
        <a class="btn btn-primary" href="{{ url_for('login.login') }}" role="button">
          Login with Google
        </a>
      {% elif config.LDAP_HOST %}
        <form class="form-row" method="POST" action="{{ url_for('login.login') }}">
          <div class="col-4">
            <label>Username{{ form.username(class="form-control") }}</label>
          </div>
          <div class="col-4">
            <label>Password{{ form.password(class="form-control") }}</label>
          </div>
          <div class="col-4">
            <button type="submit" class="btn btn-primary form-control text-white">Login</button>
          </div>
          {{ form.hidden_tag() }}
        </form>
        {% else %}
        <form action="{{ url_for('login.login') }}">
          <div class="row">
            <div class="col-8">
              <input type="text" placeholder="email" class="form-control" name="email">
            </div>
            <div class="col-4">
              <button type="submit" class="btn btn-primary form-control text-white">Login</button>
            </div>
          </div>
        </form>
      {% endif %}
    {% endif %}
  </div>
  <main>
    <div class="row justify-content-center align-items-center">
      <div class="col-xs-12 col-sm-4">
        <img class="img-responsive center-block" width="250" src="{{ url_for('public.static', filename='logo-scilifelab.png') }}">
      </div>
      <div class="col-xs-12 col-sm-4">
        <img class="img-responsive center-block" width="125" src="{{ url_for('public.static', filename='swedac.png') }}">
      </div>
      <div class="col-xs-12 col-sm-4">
        <img class="img-responsive center-block" width="250" src="{{ url_for('public.static', filename='logo-karolinska.png') }}">
      </div>
    </div>
  </main>
</div>
{% endblock %}
