Add search view
This commit is contained in:
parent
f4f6e624ed
commit
469bf8dfd7
@ -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)
|
||||
|
||||
|
@ -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 = [
|
||||
|
9
kanken_online/templates/search.html
Normal file
9
kanken_online/templates/search.html
Normal 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 %}
|
Loading…
Reference in New Issue
Block a user