mirror of
https://github.com/senju1337/senju.git
synced 2025-12-24 07:39:29 +00:00
feat: store lines of a haiku, not just as a str
Refs: OPS-24
This commit is contained in:
parent
5fa2122972
commit
82f8c7a721
2 changed files with 15 additions and 15 deletions
|
|
@ -3,4 +3,4 @@ from dataclasses import dataclass
|
|||
|
||||
@dataclass
|
||||
class Haiku:
|
||||
text: str
|
||||
lines: list[str]
|
||||
|
|
|
|||
|
|
@ -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 %}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue