{% if not standalone %}{% extends "base.html" %}{% else %}{% extends "base_standalone.html" %}{% endif %}

{% block styles %}
{{ super() }}

<style>
html {
  position: relative;
  min-height: 100%;
}
body {
  margin-bottom: 60px; /* Margin bottom by footer height */
}
.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 60px; /* Set the fixed height of the footer here */
  line-height: 60px; /* Vertically center the text there */
  background-color: #f5f5f5;
}

</style>

{% endblock %}

{% block jumbo %}

<div class="jumbotron jumbotron-fluid">
  <div class="container">
    <h1 class="display-4">
        <i class="fas fa-book-open"></i>
        Jot</h1>
      <h2 class="text-muted">Journal Targeter</h2>
    <p class="lead">Explore journals matched to your manuscript's title, abstract
        and references.</p>
  </div>
</div>

{% endblock %}


{% block page_content %}




{% if last_title %}
    {% set card_width = 4 %}
    {% set has_results = True %}
{% else %}
    {% set card_width = 6 %}
    {% set has_results = False %}
{% endif %}

<div class="container pb-3">

<div class="card-deck">
    <div class="card" >
      <div class="card-body">
        <h3 class="card-title">
            <i class="fas fa-search"></i>
            Search</h3>
        <p class="card-text">Run a new search using your title, abstract, and
            references.</p>
        <a href="{{ url_for('main.search') }}" class="btn btn-primary">New search</a>
      </div>
    </div>

    {% if has_results %}
    <div class="card ">
      <div class="card-body">
        <h3 class="card-title">
            <i class="fas fa-poll"></i>
            Results</h3>
        <p class="card-text">
            <strong>Title:</strong> <span class="text-muted">{{ last_title }}</span>
        </p>
        <a href="{{ url_for('main.results') }}" class="btn btn-primary">View results</a>
      </div>
    </div>
    {% endif %}

    <div class="card">
      <div class="card-body">
        <h3 class="card-title">
            <i class="fas fa-info-circle"></i>
            Demo</h3>
        <p class="card-text">Browse interactive results pages from a demo query.</p>
        <a href="{{ url_for('main.demo') }}" class="btn btn-primary">View demo</a>
      </div>
    </div>

</div>
</div>

{% endblock %}

{% block footer %}

    <footer class="footer">
      <div class="container">
{#        <span class="text-muted">Place sticky footer content here.</span>#}

        <span class="text-muted">Created by the Townsend Lab. Source code available on
            <a href="https://github.com/Townsend-Lab-Yale/"
               rel="nofollow noopener noreferrer" style="color:#6c757d;">
                <i class="fab fa-github" aria-hidden="true"></i> GitHub</a></span>




      </div>
    </footer>

{% endblock %}