laterite-admin 0.1.0

Laterite CMF admin surface: the Axum router, session middleware, and login shell
Documentation
{% extends "base.html" %}
{% block title %}{{ title }} - Laterite{% endblock %}
{% block content %}
<div class="lat-toolbar"><h1>{{ title }}</h1></div>
<div class="lat-card" style="max-width:620px">
  {% if !description.is_empty() %}<p style="color:var(--text-muted);font-size:var(--fs-13);margin:0 0 18px">{{ description }}</p>{% endif %}
  {% if let Some(message) = error %}<div class="lat-alert">{{ message }}</div>{% endif %}
  <form method="post" action="{{ action }}">
    {% for field in fields %}
    <div class="lat-field">
      {% if field.switch %}
      <label class="lat-check"><input type="checkbox" id="{{ field.name }}" name="{{ field.name }}" value="on"{% if field.checked %} checked{% endif %}> {{ field.label }}</label>
      {% else if field.textarea %}
      <label class="lat-field__label" for="{{ field.name }}">{{ field.label }}</label>
      <textarea class="lat-input" id="{{ field.name }}" name="{{ field.name }}">{{ field.value }}</textarea>
      {% else %}
      <label class="lat-field__label" for="{{ field.name }}">{{ field.label }}</label>
      <input class="lat-input" type="text" id="{{ field.name }}" name="{{ field.name }}" value="{{ field.value }}">
      {% endif %}
      {% if let Some(help) = field.help %}<p class="lat-help">{{ help }}</p>{% endif %}
    </div>
    {% endfor %}
    <div class="lat-actions">
      <button class="lat-btn lat-btn--primary" type="submit">Save</button>
      <a class="lat-btn lat-btn--ghost" href="/admin/settings">Cancel</a>
    </div>
  </form>
</div>
{% endblock %}