rustio-core 2.0.5

Runtime core for RustIO: HTTP server, router, middleware, ORM, admin, and migrations.
Documentation
{% extends "base_admin.html" %}

{% block title %}Overview ยท {{ design.project_name | default('RustIO') }}{% endblock %}

{% block admin_content %}
  {% set total = namespace(records=0, max=0) %}
  {% for card in dashboard_cards | default([]) %}
    {% set total.records = total.records + card.value %}
    {% if card.value > total.max %}{% set total.max = card.value %}{% endif %}
  {% endfor %}

  <span class="rio-pill rio-pill--lift">Workspace overview</span>

  <header class="rio-page-head">
    <h1>Your <span class="rio-accent-word">workspace</span></h1>
    <p>
      {% if dashboard_cards | length == 0 %}
        No models registered yet. Add one with <code>rustio new app &lt;name&gt;</code>.
      {% else %}
        {{ dashboard_cards | length }} model{% if dashboard_cards | length != 1 %}s{% endif %} registered,
        {{ total.records }} record{% if total.records != 1 %}s{% endif %} across all of them.
      {% endif %}
    </p>
  </header>

  <div class="rio-stat-grid">
    {% for card in dashboard_cards | default([]) %}
      <a class="rio-stat{% if card.value == total.max and total.max > 0 %} rio-stat--featured{% endif %}"
         href="/admin/{{ card.label | lower }}">
        <div class="rio-stat__value">{{ card.value }}</div>
        <div class="rio-stat__label">{{ card.label }}</div>
      </a>
    {% endfor %}
  </div>
{% endblock %}