Add search view

This commit is contained in:
Kiril Kovachev 2024-10-14 12:13:26 +01:00
parent f4f6e624ed
commit 469bf8dfd7
3 changed files with 21 additions and 3 deletions

View File

@ -62,6 +62,10 @@ def create_app(test_config=None):
def kotoba_page(kotoba: str):
return render_template("kotoba.html", kotoba=kotoba)
@app.route("/search")
def search_page():
return render_template("search.html")
from . import database
database.initialize_app(app)

View File

@ -6,7 +6,9 @@ EXISTING_STRINGS = {
"log_out",
"main_page",
"username",
"password"
"password",
"search",
"search_placeholder"
}
ENGLISH = {
@ -20,7 +22,8 @@ ENGLISH = {
"main_page": "Main Page",
"username": "Username",
"password": "Password",
"search": "Search"
"search": "Search",
"search_placeholder": "Enter kanji or word"
}
JAPANESE = {
@ -33,7 +36,9 @@ JAPANESE = {
"forum": "掲示板",
"main_page": "ホームページ",
"username": "ユーザー名",
"password": "パスワード"
"password": "パスワード",
"search": "検索",
"search_placeholder": "漢字・言葉を入力"
}
LANGUAGES = [

View File

@ -0,0 +1,9 @@
{% extends 'base.html' %}
{% block header %}
<h1>{% block title %}{{ localize("search") }}{% endblock %}</h1>
{% endblock %}
{% block content %}
<input type="text" id="search_bar" placeholder="{{ localize("search_placeholder") }}">
{% endblock %}