Add kotoba view
This commit is contained in:
parent
21d14b086b
commit
2a4c724af5
@ -57,6 +57,10 @@ def create_app(test_config=None):
|
|||||||
kanji.glyph_origin = "会意。广(げん)(いえ)と、𣏟(はい)(あさ)とから成り、屋下であさの繊維をはぎとる、ひいて「あさ」の意を表す。"
|
kanji.glyph_origin = "会意。广(げん)(いえ)と、𣏟(はい)(あさ)とから成り、屋下であさの繊維をはぎとる、ひいて「あさ」の意を表す。"
|
||||||
|
|
||||||
return render_template("kanji.html", kanji=kanji)
|
return render_template("kanji.html", kanji=kanji)
|
||||||
|
|
||||||
|
@app.route("/kotoba/<kotoba>")
|
||||||
|
def kotoba_page(kotoba: str):
|
||||||
|
return render_template("kotoba.html", kotoba=kotoba)
|
||||||
|
|
||||||
from . import database
|
from . import database
|
||||||
database.initialize_app(app)
|
database.initialize_app(app)
|
||||||
|
18
kanken_online/templates/kotoba.html
Normal file
18
kanken_online/templates/kotoba.html
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
|
{% block header %}
|
||||||
|
<h1>{% block title %}Kotoba - {{ kotoba.word }}{% endblock %}</h1>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div id="headword-and-meaning">
|
||||||
|
<div id="kotoba-box">
|
||||||
|
<div id="headword-box">
|
||||||
|
<span id="kotoba">{{ kotoba.word }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="meaning-box">
|
||||||
|
<p id="meanings">{{ kotoba.meanings }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
Loading…
Reference in New Issue
Block a user