mbr-core 0.7.0

Render core of mbr, the markdown browser: markdown, templates, config, repository scan, search and indexes. Internal crate of mbr-markdown-browser, versioned in lockstep with it; no API stability guarantees
Documentation
{% set asset_base = relative_base | default(value="/.mbr/") %}
<!doctype html>
<html lang="en">
  <head>
{% include "_head.html" %}
    {% if downloading %}<title>{{ note_name }}</title>{% else %}<title>{{ error_code }} - {{ error_title | default(value="Error") }}</title>{% endif %}
  </head>
  <body>
{% include "_nav.html" %}
    <main id="wrapper" class="container">
      {% if downloading %}
      {#- A note a cloud provider has not downloaded yet. Served as a 503 with
          Retry-After/Refresh (the page reloads itself until the note arrives),
          but not drawn as an error: downloading on first access is normal. -#}
      <article class="mbr-downloading" aria-live="polite">
        {#- Two states, chosen by CSS: the iOS app sets `html.mbr-offline`
            (at document start, so every Refresh reload keeps it) while the
            device has no network path. Nothing else sets it. -#}
        <progress class="mbr-downloading-online" aria-label="Downloading"></progress>
        <h1 class="mbr-downloading-title mbr-downloading-online">Downloading{% if download_provider %} from {{ download_provider }}{% endif %}…</h1>
        <h1 class="mbr-downloading-title mbr-downloading-offline">You're offline.</h1>
        <p class="mbr-downloading-name">{{ note_name }}</p>
        <p class="mbr-downloading-online"><small>This note isn't on this device yet. It opens as soon as it arrives.</small></p>
        <p class="mbr-downloading-offline"><small>This note will download when you're back online.</small></p>
      </article>
      {% else %}
      <article class="error-page">
        <header>
          <h1>{{ error_code }}</h1>
          <p class="error-title">{{ error_title | default(value="Error") }}</p>
        </header>

        {% if error_message %}
        <p>{{ error_message }}</p>
        {% endif %}

        {% if requested_url %}
        <p class="error-url"><code>{{ requested_url }}</code></p>
        {% endif %}

        <footer>
          <nav>
            <ul>
              <li>
                <button onclick="history.back()" class="outline secondary">&larr; Go Back</button>
              </li>
              <li>
                {% if relative_root %}<a href="{{ relative_root }}" role="button" class="outline">Home</a>{% else %}<a href="./" role="button" class="outline">Home</a>{% endif %}
              </li>
            </ul>
          </nav>
          <p><small>Tip: Press <kbd>/</kbd> to search for what you're looking for.</small></p>
        </footer>
      </article>
      {% endif %}
    </main>
{% include "_footer.html" %}
  </body>
{% include "_scripts.html" %}
</html>