rustango-cms 0.4.0

A page-tree content management system for Rust, built on rustango
Documentation
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>{{ page_title }} — {{ "Password required" | translate(locale=LANG) }}</title>
    <link rel="stylesheet" href="/cms-admin/static/cms.css?v={{ cms_asset_version() }}">
    <style>
        body {
            display: flex; align-items: center; justify-content: center;
            min-height: 100vh; margin: 0;
            background: var(--md-sys-color-surface-container-low);
            font: var(--md-sys-typescale-ui-body);
            color: var(--md-sys-color-on-surface);
        }
        .rcms-password-card {
            width: 100%; max-width: 380px;
            padding: 32px;
            background: var(--md-sys-color-surface-container-lowest);
            border-radius: var(--md-sys-radius-xl);
            box-shadow: var(--md-sys-elevation-2);
        }
        .rcms-password-card h1 {
            font: var(--md-sys-typescale-ui-header);
            margin: 0 0 8px;
        }
        .rcms-password-card p { margin: 0 0 24px; color: var(--md-sys-color-on-surface-variant); }
        .rcms-password-card .rcms-error {
            padding: 8px 12px; margin-bottom: 16px;
            background: var(--md-sys-color-error-container);
            color: var(--md-sys-color-on-error-container);
            border-radius: var(--md-sys-radius-md);
            font-size: 13px;
        }
        .rcms-field { margin-bottom: 16px; }
        .rcms-field label { display: block; margin-bottom: 6px; font: var(--md-sys-typescale-ui-label); }
        .rcms-field input {
            width: 100%; height: 40px; padding: 0 12px;
            background: var(--md-sys-color-surface-container);
            border: 1px solid var(--md-sys-color-outline-variant);
            border-radius: var(--md-sys-radius-md);
            font: var(--md-sys-typescale-ui-body);
            box-sizing: border-box;
        }
        .rcms-field input:focus {
            outline: none;
            border-color: var(--md-sys-color-primary);
            box-shadow: 0 0 0 1px var(--md-sys-color-primary);
        }
    </style>
</head>
<body>
    <div class="rcms-password-card">
        <h1>{{ page_title }}</h1>
        <p>{{ "This page is password-protected. Enter the password to continue." | translate(locale=LANG) }}</p>
        {% if error_message %}
            <div class="rcms-error">{{ error_message }}</div>
        {% endif %}
        <form method="post" action="/__cms-view-password">
            <input type="hidden" name="_csrf" value="{{ csrf_token | default(value='') }}">
            <input type="hidden" name="page" value="{{ page_id }}">
            <input type="hidden" name="next" value="{{ next_path }}">
            <div class="rcms-field">
                <label for="vp-password">{{ "Password" | translate(locale=LANG) }}</label>
                <input type="password" id="vp-password" name="password" required autofocus autocomplete="current-password">
            </div>
            <button type="submit" class="rcms-btn rcms-w-full">{{ "View page" | translate(locale=LANG) }}</button>
        </form>
    </div>
</body>
</html>