sparkytron3000/flask_templates/index.html
2024-06-19 20:46:57 -07:00

73 lines
No EOL
2.4 KiB
HTML

<!DOCTYPE html>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sparkytron Config</title>
</head>
<style>
body {
background-color: #333;
color: #fff;
}
.container {
background-color: #444;
border-radius: 10px;
padding: 20px;
margin-top: 50px;
}
.form-control {
background-color: #555;
color: #fff;
}
.btn-primary {
background-color: #6c757d;
border-color: #6c757d;
}
.btn-primary:hover {
background-color: #495057;
border-color: #495057;
}
.alert-success {
background-color: #198754;
color: #fff;
border-color: #198754;
}
</style>
<body>
<div class="container">
<h1 class="mt-5">Warning!</h1>
<p class="lead">This information is stored in PLAIN TEXT in a .env file!</p>
<form method="post">
{% for key, value in key_value_pairs.items() %}
<div class="row mb-3">
<label for="{{ key }}" class="col-sm-2 col-form-label">{{ key }}</label>
<div class="col-sm-10">
<input type="text" id="{{ key }}" name="{{ key }}" value="{{ value }}" class="form-control">
</div>
</div>
{% endfor %}
<button type="submit" class="btn btn-primary">Submit</button>
{% with messages = get_flashed_messages() %}
{% if messages %}
{% for message in messages %}
<div class="alert alert-success alert-dismissible fade show mt-3" role="alert">
{{ message }}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
{% endfor %}
{% endif %}
{% endwith %}
</form>
</div>
</body>
</html>