feat: store lines of a haiku, not just as a str

Refs: OPS-24
This commit is contained in:
Christoph J. Scherr 2025-02-25 18:32:50 +01:00
parent 5fa2122972
commit 82f8c7a721
No known key found for this signature in database
GPG key ID: 9EB784BB202BB7BB
2 changed files with 15 additions and 15 deletions

View file

@ -3,4 +3,4 @@ from dataclasses import dataclass
@dataclass
class Haiku:
text: str
lines: list[str]

View file

@ -4,17 +4,17 @@
<div class="bg-violet-900 min-h-screen flex items-center justify-center text-white">
<div class="text-center">
<div class="bg-white text-gray-900 p-10 rounded-lg shadow-lg max-w-2xl mx-auto transform -translate-y-10">
<h1 class="text-4xl font-bold text-violet-700 mb-6">Haiku of the Day</h1>
<p class="text-2xl italic leading-relaxed">
An old silent pond<br>
A frog jumps into the pond—<br>
Splash! Silence again.
<h1 class="text-4xl font-bold text-violet-700 mb-6">{{ title }}</h1>
<p class="text-2xl italic leading-relaxed text-left">
{% for line in context.haiku.lines %}
{{ line }}<br>
{% endfor %}
</p>
</div>
<a href="{{ url_for('index_view') }}" class=" inline-block bg-violet-600 hover:bg-violet-700 text-white font-bold py-2 px-4 rounded-lg">
<a href="{{ url_for('index_view') }}"
class=" inline-block bg-violet-600 hover:bg-violet-700 text-white font-bold py-2 px-4 rounded-lg">
Back to Home
</a>
</div>
</div>
{% endblock %}