Files
lotto-app/templates/index.html
2024-12-17 12:41:23 +00:00

47 lines
1.6 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Lottery Number Generator</title>
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
</head>
<body>
<div class="container">
<h1>Lottery Number Generator</h1>
<form method="POST">
<!-- Retain selected game_type -->
<label for="game_type">Select Game:</label>
<select name="game_type" id="game_type" required>
<option value="euromillions" {% if game_type == 'euromillions' %}selected{% endif %}>EuroMillions</option>
<option value="lotto" {% if game_type == 'lotto' %}selected{% endif %}>Lotto</option>
<option value="eurodreams" {% if game_type == 'eurodreams' %}selected{% endif %}>EuroDreams</option>
</select>
<!-- Retain selected lines -->
<label for="lines">Number of Lines:</label>
<input type="number" name="lines" id="lines" min="1" max="10" value="{{ lines }}" required>
<button type="submit">Generate Numbers</button>
</form>
{% if result %}
<div class="results">
<h2>Generated Numbers:</h2>
{% for line in result %}
<div class="line">
Numbers: {{ line.numbers }}
{% if line.lucky_stars %}
| Lucky Stars: {{ line.lucky_stars }}
{% endif %}
{% if line.dream_number %}
| Dream Number: {{ line.dream_number }}
{% endif %}
</div>
{% endfor %}
</div>
{% endif %}
</div>
</body>
</html>