From 2a4c724af5e0fe2d01ed0b112c9438f232bd36ee Mon Sep 17 00:00:00 2001 From: Kiril Kovachev Date: Mon, 14 Oct 2024 11:28:53 +0100 Subject: [PATCH] Add kotoba view --- kanken_online/__init__.py | 4 ++++ kanken_online/templates/kotoba.html | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 kanken_online/templates/kotoba.html diff --git a/kanken_online/__init__.py b/kanken_online/__init__.py index ef60b94..4a8489e 100644 --- a/kanken_online/__init__.py +++ b/kanken_online/__init__.py @@ -57,6 +57,10 @@ def create_app(test_config=None): kanji.glyph_origin = "会意。广(げん)(いえ)と、𣏟(はい)(あさ)とから成り、屋下であさの繊維をはぎとる、ひいて「あさ」の意を表す。" return render_template("kanji.html", kanji=kanji) + + @app.route("/kotoba/") + def kotoba_page(kotoba: str): + return render_template("kotoba.html", kotoba=kotoba) from . import database database.initialize_app(app) diff --git a/kanken_online/templates/kotoba.html b/kanken_online/templates/kotoba.html new file mode 100644 index 0000000..78f4235 --- /dev/null +++ b/kanken_online/templates/kotoba.html @@ -0,0 +1,18 @@ +{% extends 'base.html' %} + +{% block header %} +

{% block title %}Kotoba - {{ kotoba.word }}{% endblock %}

+{% endblock %} + +{% block content %} +
+
+
+ {{ kotoba.word }} +
+
+
+

{{ kotoba.meanings }}

+
+
+{% endblock %}