mirror of
https://github.com/senju1337/senju.git
synced 2025-12-24 07:39:29 +00:00
feat: add Haiku page and link
Refs: OPS-1337
This commit is contained in:
parent
25227c8767
commit
0dc2b53579
3 changed files with 29 additions and 8 deletions
|
|
@ -2,10 +2,13 @@ from flask import Flask, render_template
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
def index():
|
def index():
|
||||||
context = {
|
return render_template("index.jinja", title="Senju", active_page="home")
|
||||||
"number": 1337
|
|
||||||
}
|
@app.route("/haiku")
|
||||||
return render_template("index.jinja", context=context, title="Senju")
|
def haiku_page():
|
||||||
|
return render_template("haiku.jinja", title="Haiku of the Day", active_page="haiku")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,9 @@
|
||||||
<!-- Current: "bg-gray-900 text-white", Default: "text-gray-300 hover:bg-gray-700 hover:text-white" -->
|
<!-- Current: "bg-gray-900 text-white", Default: "text-gray-300 hover:bg-gray-700 hover:text-white" -->
|
||||||
<a href="#" class="rounded-md bg-gray-900 px-3 py-2 text-sm font-medium text-white"
|
<a href="#" class="rounded-md bg-gray-900 px-3 py-2 text-sm font-medium text-white"
|
||||||
aria-current="page">Start</a>
|
aria-current="page">Start</a>
|
||||||
<a href="#"
|
<a href="{{ url_for('haiku_page') }}" class="rounded-md px-3 py-2 text-sm font-medium text-gray-300 hover:bg-gray-700 hover:text-white">
|
||||||
class="rounded-md px-3 py-2 text-sm font-medium text-gray-300 hover:bg-gray-700 hover:text-white">Haiku</a>
|
Haiku
|
||||||
<a href="#"
|
</a> <a href="#"
|
||||||
class="rounded-md px-3 py-2 text-sm font-medium text-gray-300 hover:bg-gray-700 hover:text-white">Information</a>
|
class="rounded-md px-3 py-2 text-sm font-medium text-gray-300 hover:bg-gray-700 hover:text-white">Information</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
18
senju/templates/haiku.jinja
Normal file
18
senju/templates/haiku.jinja
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
{% extends "base.jinja" %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="bg-violet-900 min-h-screen flex flex-col items-center justify-center text-white">
|
||||||
|
<div class="bg-white text-gray-900 p-6 rounded-lg shadow-lg max-w-lg text-center">
|
||||||
|
<h1 class="text-3xl font-bold text-violet-700 mb-4">Haiku of the Day</h1>
|
||||||
|
<p class="text-xl italic">
|
||||||
|
An old silent pond<br>
|
||||||
|
A frog jumps into the pond—<br>
|
||||||
|
Splash! Silence again.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<a href="{{ url_for('index') }}" class="mt-6 bg-violet-600 hover:bg-violet-700 text-white font-bold py-2 px-4 rounded-lg">
|
||||||
|
Back to Home
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue