<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <title>{{ display_path }} | Home Stream</title>
  <link rel="icon" type="image/png" href="{{ url_for('static', filename='favicon.png') }}" />
  <link rel="stylesheet" href="{{ url_for('static', filename='pico.min.css') }}" />
  <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}" />
  <script src="{{ url_for('static', filename='main.js') }}" crossorigin></script>
</head>

<body {% block body_attrs %}{% endblock %}>
  <main class="container">
    {%- if session.username %}
    <div id="user-info">
      <form method="get" action="{{ url_for('logout') }}">
        <button>Logout ({{ session.username }})</button>
      </form>
    </div>
    {%- endif %}
    <h1>{{ display_path }}</h1>

    {% if breadcrumb_parts %}
      <p class="breadcrumbs">📂
        {% for crumb in breadcrumb_parts %}
          <a href="{{ url_for('browse', subpath=crumb.slug) }}">{{ crumb.name }}</a>
          {% if not loop.last %} / {% endif %}
        {% endfor %}
      </p>
    {% endif %}
    {%- block content %}
    {%- endblock %}
  </main>
  <footer class="container">
    <hr />
    <p>
      Powered by <a href="https://github.com/mxmehl/home-stream" target="_blank">home-stream</a>
      {%- if session.username %} {{ version_info }}{% endif %}
    </p>
  </footer>
</body>

</html>
