{% extends "base.html" %}

{% block content %}

<div class="action">
  <button onClick="refresh(this)" type="button" value="Refresh" title="new iteration">↻</button>
</div>

<div id="rdn-abstracts">
  <div class="row">
    <div class="col m-5">
      <p class="h1 text-center">Reading Fragments</p>
      <p class="mt-2 text-center">a <span id="time"></span> minute read out of 6375081 minutes reading time</p>
      <a href="{{ url_for('main.index') }}" class="h1 text-left"> ⇽ </a>
    </div>

  </div>

  <div id="alltext">
  {% for abstract in abstracts %}
    <p>
      {{ abstract['abstract'] }}
    </p>
    <span class="joint">&</span>

  {% endfor %}
  </div>
</div>

<script type="text/javascript">
  // code adapted from w3collective
  const text = document.getElementById("alltext").innerText;
  readingTime(text);
</script>

{% endblock %}
