renox-core 1.0.0

Runtime of the Renox web framework: routing, views, database and models, validation, auth, queue, scheduler, mail, storage. Use it through the `renox` crate.
Documentation
{#- A grid's rows to print or save as PDF (`?export=print`, `Grid::export`):
    every row the filters match, headings grouped as on screen, repeated on
    each printed page. -#}
<!doctype html>
<html lang="{{ app.locale }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex">
<title>{{ title }}</title>
{{ renox_grid() }}
<style>
  :root { color-scheme: light; }
  body { margin: 24px; font: 12px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; color: #1d1d1f; background: #fff; }
  .print-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
  h1 { font-size: 18px; margin: 0; }
  .meta { color: #5b5b61; margin: 2px 0 0; }
  .actions { display: flex; gap: 8px; }
  .actions a, .actions button { font: inherit; font-size: 14px; padding: 6px 14px; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none; }
  .actions button { background: #0071e3; color: #fff; }
  .actions a { background: rgba(120, 120, 128, 0.12); color: #0066cc; }
  table { border-collapse: collapse; width: 100%; }
  th, td { border: 1px solid #d2d2d7; padding: 4px 6px; text-align: start; vertical-align: top; }
  thead th { background: #f2f2f7; font-weight: 600; text-align: center; }
  thead { display: table-header-group; }
  tr { break-inside: avoid; }
  .num { text-align: end; font-variant-numeric: tabular-nums; }
  @page { size: landscape; margin: 12mm; }
  @media print { body { margin: 0; } .print-bar .actions { display: none; } }
</style>
</head>
<body>
<div class="print-bar">
  <div>
    <h1>{{ title }}</h1>
    <p class="meta">{{ total | number }} {{ t('ui.grid.row_word', count=total) }} ยท {{ t('ui.grid.printed') }} {{ printed | date("%Y-%m-%d %H:%M") }}</p>
  </div>
  <div class="actions">
    <a href="{{ back }}">{{ t('ui.grid.back') }}</a>
    <button type="button" data-grid-print>{{ t('ui.grid.print') }}</button>
  </div>
</div>
<table>
  <thead>
    {%- for heading_row in header %}
    <tr>
      {%- for h in heading_row %}
      {%- if h.group %}<th scope="colgroup" colspan="{{ h.colspan }}">{{ h.label }}</th>
      {%- else %}<th scope="col" rowspan="{{ h.rowspan }}">{{ columns[h.index].label }}</th>{% endif %}
      {%- endfor %}
    </tr>
    {%- endfor %}
  </thead>
  <tbody>
    {%- for row in rows %}
    <tr>{% for cell in row %}<td{% if columns[loop.index0].numeric %} class="num"{% endif %}>{{ cell }}</td>{% endfor %}</tr>
    {%- endfor %}
  </tbody>
</table>
</body>
</html>