acton-htmx 1.0.0-beta.7

Opinionated Rust web framework for HTMX applications
Documentation
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}acton-htmx{% endblock %}</title>

    <!-- HTMX Core -->
    <script src="https://unpkg.com/htmx.org@2.0.4"
            integrity="sha384-HGfztofotfshcF7+8n44JQL2oJmowVChPTg48S+jvZoztPfvwD79OC/LTtG6dMp+"
            crossorigin="anonymous"></script>

    <!-- HTMX Extensions (optional) -->
    {% block htmx_extensions %}{% endblock %}

    <!-- Styles -->
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            line-height: 1.6;
            color: #333;
            background-color: #f5f5f5;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 2rem;
        }

        /* HTMX loading indicator */
        .htmx-indicator {
            display: none;
        }

        .htmx-request .htmx-indicator {
            display: inline;
        }

        .htmx-request.htmx-indicator {
            display: inline;
        }

        /* Flash messages */
        .flash-messages {
            margin-bottom: 1rem;
        }

        /* Error messages */
        .errors {
            color: #d32f2f;
            background-color: #ffebee;
            border: 1px solid #ef5350;
            padding: 0.75rem;
            border-radius: 4px;
            margin-bottom: 1rem;
        }
    </style>

    {% block styles %}{% endblock %}
</head>
<body>
    <!-- Flash messages container (out-of-band swaps) -->
    <div id="flash-container" hx-swap-oob="true">
        {% include "partials/flash.html" %}
    </div>

    <!-- Main content -->
    <div class="container">
        {% block content %}{% endblock %}
    </div>

    <!-- Scripts -->
    {% block scripts %}{% endblock %}

    <!-- HTMX configuration -->
    <script>
        // Configure HTMX defaults
        htmx.config.defaultSwapStyle = 'innerHTML';
        htmx.config.defaultSwapDelay = 0;
        htmx.config.defaultSettleDelay = 20;

        // Enable debug logging in development
        {% if debug %}
        htmx.logAll();
        {% endif %}

        // Global error handler
        document.body.addEventListener('htmx:responseError', function(evt) {
            console.error('HTMX Error:', evt.detail);
        });
    </script>
</body>
</html>