<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="Content-Security-Policy" content="default-src 'self'; style-src 'self' 'nonce-{{ nonce }}'; img-src 'self' data:; base-uri 'self'; form-action 'self'">
    <title>{{ title }}</title>
    <style nonce="{{ nonce }}">
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 20px;
            line-height: 1.6;
            color: #333;
            background-color: #fff;
        }
        .container {
            max-width: 1000px;
            margin: 0 auto;
        }
        h1 {
            margin-bottom: 10px;
        }
        .description {
            margin-bottom: 20px;
            font-style: italic;
            color: #666;
        }
        .links {
            margin-bottom: 30px;
        }
        .link {
            margin-bottom: 10px;
            padding: 5px;
            border-bottom: 1px solid #eee;
        }
        .link a {
            text-decoration: none;
            color: #0066cc;
        }
        .link a:hover {
            text-decoration: underline;
        }
        .url {
            font-size: 0.8em;
            color: #666;
        }
        .footer {
            margin-top: 40px;
            padding-top: 10px;
            border-top: 1px solid #eee;
            font-size: 0.8em;
            color: #666;
            text-align: center;
        }
        .footer a {
            color: #0066cc;
            text-decoration: none;
        }
        .footer a:hover {
            text-decoration: underline;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>{{ title }}</h1>
        {% if description %}
        <div class="description">{{ description }}</div>
        {% endif %}

        <div class="links">
            {% for name, url in links %}
            <div class="link">
                <a href="{{ url }}" target="_blank">{{ name }}</a>
                <div class="url">{{ url }}</div>
            </div>
            {% endfor %}
        </div>

        <div class="footer">
            <div>Generated by <a href="https://pypi.org/project/minibook/">MiniBook</a> on {{ timestamp }}</div>
            <div>A product by <a href="https://jqr.ae">jqr</a> | <a href="{{ repository_url }}">Repository</a></div>
        </div>
    </div>
</body>
</html>