{% extends "base.html" %}

{% block title %}{{ SITENAME }}{%endblock%}

{% block bodyclass %}home{% endblock %}

{% block content %}
    <h1>{{ page.title }}</h1>
    {{ page.content }}
{% endblock %}

{% block sidebar %}
  {% for article in categories|get_category_articles('algoliterary-works') %}
    <details>
      <summary>
        <h2>{{ article.title }}</h2>
        <dl>
          {{ article.algorithm|display_if_set('Algorithm')}}
          {{ article.trees|display_if_set('Trees')}}
          {{ article.humans|display_if_set('Humans')}}
          {{ article.language|display_if_set('Language')}}
          {{ article.published|display_if_set('Published')}}
          {{ article.license|display_if_set('License')}}
          <dt></dt>
          <dd class="read-online-link"><a href="{{ article.publication_url }}">Read the book online ⤤</a></dd>
        </dl>
      </summary>
      {{ article.content }}
      <dl>
        {{ article.publication_url|display_if_set('URL')}}
        {{ article.repository|display_if_set('Repository')}}
        {{ article.support|display_if_set('With the support of')}}
        {{ article.thanks|display_if_set('Thanks to')}}
      </dl>
    </details>
  {% endfor %}
{% endblock %}