Merge remote-tracking branch 'refs/remotes/origin/master'

This commit is contained in:
Kiril Kovachev 2024-10-24 10:13:30 +01:00
commit aa8da63a68
5 changed files with 80 additions and 2 deletions

View File

@ -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"<b>{emboldened_part}</b>{reading[okurigana_position+1:]}"
@app.route("/kanji/<kanji>")
def kanji_page(kanji: str):
kanji_obj = get_kanji_by_character(kanji)

View File

@ -0,0 +1,11 @@
@counter-style katakana {
system: cyclic;
symbols: "ア" "イ" "ウ" "エ" "オ" "カ" "キ" "ク" "ケ" "コ" "サ" "シ" "ス" "セ" "ソ" "タ" "チ" "ツ" "テ" "ト" "ナ" "ニ" "ヌ" "ネ" "" "ハ" "ヒ" "フ" "ヘ" "ホ" "マ" "ミ" "ム" "メ" "モ" "ヤ" "ユ" "ヨ" "ラ" "リ" "ル" "レ" "ロ" "ワ" "ヲ" "ン";
speak-as: spell-out;
fallback: lower-alpha;
suffix: " ";
}
.katakana-list {
list-style-type: katakana;
}

View File

@ -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"
}

View File

@ -43,5 +43,6 @@
"post_body": "投稿内容",
"success_new_post": "無事に新しい投稿を作りました",
"user_introduction": "利用者の",
"pfp": "利用者アイコン"
"pfp": "利用者アイコン",
"level_1_exam": "一級試験"
}

View File

@ -0,0 +1,60 @@
{% extends 'base.html' %}
{% block styles %}
<link rel="stylesheet" href="{{ url_for('static', filename='exam.css') }}">
{% endblock %}
{% block header %}
<h1>{% block title %}{{ localize("level_1_exam") }}{% endblock %}</h1>
{% endblock %}
{% block content %}
<h1>日本漢字能力検定試験問題</h1>
<div id="q1">
<h2>(一)</h2>
<p>次の傍線部分の読みを<b>ひらがな</b>で記せ。</p>
<p>1〜20は<b>音読み</b>、21〜30は<b>訓読み</b>である。</p>
<ol id="q1-onyomi">
{% for i in range(20) %}
<li>
Test
</li>
{% endfor %}
</ol>
<hr>
<ol id="q2-kunyomi" start="21">
{% for i in range(10) %}
<li>
Test
</li>
{% endfor %}
</ol>
</div>
<div id="q2">
<h2>(二)</h2>
<p>次の傍線部分の<b>カタカナ</b><b>漢字</b>で記せ。19,20は<b>国字</b>で答えること。</p>
<ol id="q2-kakitori">
{% for i in range(15) %}
<li>Test</li>
{% endfor %}
</ol>
<div>
<ol start="16">
<li>Test</li>
<li>Test</li>
<li>Test</li>
</ol>
</div>
<hr>
<ol id="q2-kokuji-kakitori" start="19">
<li>Test</li>
<li>Test</li>
</ol>
</div>
{% endblock %}