Add kanji view
This commit is contained in:
parent
835b5bf123
commit
447f8d4770
@ -31,7 +31,32 @@ def create_app(test_config=None):
|
|||||||
@app.route("/options")
|
@app.route("/options")
|
||||||
@login_required
|
@login_required
|
||||||
def options():
|
def options():
|
||||||
return "options"
|
return render_template("options.html")
|
||||||
|
|
||||||
|
@app.route("/kanji/<kanji>")
|
||||||
|
def kanji_page(kanji: str):
|
||||||
|
# TODO use database to get kanji
|
||||||
|
class Kanji():
|
||||||
|
pass
|
||||||
|
|
||||||
|
# Highly tentative testing data
|
||||||
|
kanji = Kanji()
|
||||||
|
kanji.character = "麻"
|
||||||
|
kanji.is_joyo = "joyo kanji"
|
||||||
|
kanji.level = "pre-2"
|
||||||
|
kanji.strokes = 11
|
||||||
|
kanji.radical = "麻"
|
||||||
|
kanji.added_strokes = 0
|
||||||
|
kanji.goon = "マ"
|
||||||
|
kanji.kanon = "バ"
|
||||||
|
kanji.toon = ""
|
||||||
|
kanji.soon = ""
|
||||||
|
kanji.kanyoon = ""
|
||||||
|
kanji.kun = "あさ, しびれる"
|
||||||
|
kanji.meanings = "①あさ。クワ科の一年草。また、あさ類の総称。「亜麻」「乱麻」 ②しびれる。しびれ。「麻酔」「麻痺(マヒ)」類痲(マ)"
|
||||||
|
kanji.glyph_origin = "会意。广(げん)(いえ)と、𣏟(はい)(あさ)とから成り、屋下であさの繊維をはぎとる、ひいて「あさ」の意を表す。"
|
||||||
|
|
||||||
|
return render_template("kanji.html", kanji=kanji)
|
||||||
|
|
||||||
from . import database
|
from . import database
|
||||||
database.initialize_app(app)
|
database.initialize_app(app)
|
||||||
|
Loading…
Reference in New Issue
Block a user