diff --git a/kanken_online/__init__.py b/kanken_online/__init__.py index 1a4a6d4..028baa7 100644 --- a/kanken_online/__init__.py +++ b/kanken_online/__init__.py @@ -107,6 +107,10 @@ def create_app(test_config=None): @login_required def my_page(): return user_page(session["user_id"]) + + @app.get("/exam") + def exam(): + return render_template("exams/level1.html") def format_reading(reading: str) -> str: """Apply bold to the part of the reading which the kanji represents; for kun, this can be @@ -121,6 +125,7 @@ def create_app(test_config=None): emboldened_part = reading[:okurigana_position] return f"{emboldened_part}{reading[okurigana_position+1:]}" + @app.route("/kanji/") def kanji_page(kanji: str): kanji_obj = get_kanji_by_character(kanji) diff --git a/kanken_online/static/exam.css b/kanken_online/static/exam.css new file mode 100644 index 0000000..bc5e1dd --- /dev/null +++ b/kanken_online/static/exam.css @@ -0,0 +1,11 @@ +@counter-style katakana { + system: cyclic; + symbols: "ア" "イ" "ウ" "エ" "オ" "カ" "キ" "ク" "ケ" "コ" "サ" "シ" "ス" "セ" "ソ" "タ" "チ" "ツ" "テ" "ト" "ナ" "ニ" "ヌ" "ネ" "ノ" "ハ" "ヒ" "フ" "ヘ" "ホ" "マ" "ミ" "ム" "メ" "モ" "ヤ" "ユ" "ヨ" "ラ" "リ" "ル" "レ" "ロ" "ワ" "ヲ" "ン"; + speak-as: spell-out; + fallback: lower-alpha; + suffix: " "; +} + +.katakana-list { + list-style-type: katakana; +} diff --git a/kanken_online/static/lang/en.json b/kanken_online/static/lang/en.json index 593b2cd..d47281b 100644 --- a/kanken_online/static/lang/en.json +++ b/kanken_online/static/lang/en.json @@ -43,5 +43,6 @@ "post_body": "Post body", "success_new_post": "Successfully created new post", "user_introduction": "User", -"pfp": "Profile picture" +"pfp": "Profile picture", +"level_1_exam": "Level 1 exam" } \ No newline at end of file diff --git a/kanken_online/static/lang/ja.json b/kanken_online/static/lang/ja.json index b359405..154b97d 100644 --- a/kanken_online/static/lang/ja.json +++ b/kanken_online/static/lang/ja.json @@ -43,5 +43,6 @@ "post_body": "投稿内容", "success_new_post": "無事に新しい投稿を作りました", "user_introduction": "利用者の", -"pfp": "利用者アイコン" +"pfp": "利用者アイコン", +"level_1_exam": "一級試験" } \ No newline at end of file diff --git a/kanken_online/templates/exams/level1.html b/kanken_online/templates/exams/level1.html new file mode 100644 index 0000000..9b5d386 --- /dev/null +++ b/kanken_online/templates/exams/level1.html @@ -0,0 +1,60 @@ +{% extends 'base.html' %} + +{% block styles %} + +{% endblock %} + +{% block header %} +

{% block title %}{{ localize("level_1_exam") }}{% endblock %}

+{% endblock %} + +{% block content %} +

日本漢字能力検定試験問題

+
+

(一)

+

次の傍線部分の読みをひらがなで記せ。

+

1〜20は音読み、21〜30は訓読みである。

+ +
    + {% for i in range(20) %} +
  1. + Test +
  2. + {% endfor %} +
+ +
+ +
    + {% for i in range(10) %} +
  1. + Test +
  2. + {% endfor %} +
+ +
+ +
+

(二)

+

次の傍線部分のカタカナ漢字で記せ。19,20は国字で答えること。

+
    + {% for i in range(15) %} +
  1. Test
  2. + {% endfor %} +
+
+
    +
  1. Test
  2. +
  3. Test
  4. +
  5. Test
  6. +
+
+
+
    +
  1. Test
  2. +
  3. Test
  4. +
+
+ +{% endblock %} \ No newline at end of file