Spaces:
Running
Running
Merge pull request #63 from alecrem/chore/issue-62/add-streamlit-config
Browse files- .streamlit/config.toml +9 -0
- Middle_School_Card_Search.py +6 -3
- favicon.ico +0 -0
- pages/1_Check_Card_List.py +6 -3
- streamlit_common/footer.py +2 -2
- streamlit_common/locale.py +7 -7
.streamlit/config.toml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[browser]
|
2 |
+
gatherUsageStats = false
|
3 |
+
|
4 |
+
[theme]
|
5 |
+
primaryColor="#024d19"
|
6 |
+
backgroundColor="#f6f7eb"
|
7 |
+
secondaryBackgroundColor="#f5edcb"
|
8 |
+
textColor="#000000"
|
9 |
+
font="serif"
|
Middle_School_Card_Search.py
CHANGED
@@ -20,8 +20,8 @@ def reset_more_results():
|
|
20 |
|
21 |
|
22 |
st.set_page_config(
|
23 |
-
page_title="
|
24 |
-
page_icon="
|
25 |
layout="wide",
|
26 |
)
|
27 |
lang = st.sidebar.radio(
|
@@ -29,7 +29,10 @@ lang = st.sidebar.radio(
|
|
29 |
options=["English", "日本語"],
|
30 |
)
|
31 |
l = "ja" if lang == "日本語" else "en"
|
32 |
-
st.
|
|
|
|
|
|
|
33 |
st.write(_["search"]["instructions"][l])
|
34 |
|
35 |
mslist_df = pd.read_csv(mslist_path)
|
|
|
20 |
|
21 |
|
22 |
st.set_page_config(
|
23 |
+
page_title="Middle School Tutor | Card Search",
|
24 |
+
page_icon="favicon.ico",
|
25 |
layout="wide",
|
26 |
)
|
27 |
lang = st.sidebar.radio(
|
|
|
29 |
options=["English", "日本語"],
|
30 |
)
|
31 |
l = "ja" if lang == "日本語" else "en"
|
32 |
+
headcol1, headcol2 = st.columns([1, 7])
|
33 |
+
headcol1.image("favicon.ico", width=80)
|
34 |
+
headcol2.write(f"# Middle School Tutor")
|
35 |
+
st.write(f'## {_["search"]["title"][l]}')
|
36 |
st.write(_["search"]["instructions"][l])
|
37 |
|
38 |
mslist_df = pd.read_csv(mslist_path)
|
favicon.ico
ADDED
pages/1_Check_Card_List.py
CHANGED
@@ -8,8 +8,8 @@ mslist_path = "output/middleschool.csv"
|
|
8 |
_ = streamlit_common.locale.get_locale()
|
9 |
|
10 |
st.set_page_config(
|
11 |
-
page_title="
|
12 |
-
page_icon="
|
13 |
layout="wide",
|
14 |
)
|
15 |
lang = st.sidebar.radio(
|
@@ -17,7 +17,10 @@ lang = st.sidebar.radio(
|
|
17 |
options=["English", "日本語"],
|
18 |
)
|
19 |
l = "ja" if lang == "日本語" else "en"
|
20 |
-
st.
|
|
|
|
|
|
|
21 |
st.write(_["check"]["instructions"][l])
|
22 |
|
23 |
mslist_df = pd.read_csv(mslist_path)
|
|
|
8 |
_ = streamlit_common.locale.get_locale()
|
9 |
|
10 |
st.set_page_config(
|
11 |
+
page_title="Middle School Tutor | Check Card List",
|
12 |
+
page_icon="favicon.ico",
|
13 |
layout="wide",
|
14 |
)
|
15 |
lang = st.sidebar.radio(
|
|
|
17 |
options=["English", "日本語"],
|
18 |
)
|
19 |
l = "ja" if lang == "日本語" else "en"
|
20 |
+
headcol1, headcol2 = st.columns([1, 7])
|
21 |
+
headcol1.image("favicon.ico", width=80)
|
22 |
+
headcol2.write(f"# Middle School Tutor")
|
23 |
+
st.write(f'## {_["check"]["title"][l]}')
|
24 |
st.write(_["check"]["instructions"][l])
|
25 |
|
26 |
mslist_df = pd.read_csv(mslist_path)
|
streamlit_common/footer.py
CHANGED
@@ -3,9 +3,9 @@ import streamlit as st
|
|
3 |
fa_import = """
|
4 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css">
|
5 |
"""
|
6 |
-
x_icon = '<i class="fa-brands fa-x-twitter" style="color: #
|
7 |
x_url = "https://x.com/KarawapoM"
|
8 |
-
gh_icon = '<i class="fa-brands fa-github" style="color: #
|
9 |
gh_url = "https://github.com/alecrem/middleschool-cardlist"
|
10 |
|
11 |
|
|
|
3 |
fa_import = """
|
4 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css">
|
5 |
"""
|
6 |
+
x_icon = '<i class="fa-brands fa-x-twitter" style="color: #000000;"></i>'
|
7 |
x_url = "https://x.com/KarawapoM"
|
8 |
+
gh_icon = '<i class="fa-brands fa-github" style="color: #000000;"></i>'
|
9 |
gh_url = "https://github.com/alecrem/middleschool-cardlist"
|
10 |
|
11 |
|
streamlit_common/locale.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
def get_locale():
|
2 |
return {
|
3 |
"search": {
|
4 |
-
"title": {"en": "
|
5 |
"instructions": {
|
6 |
"en": "Enter any English or Japanese text to find all [Middle School legal](https://www.eternalcentral.com/middleschoolrules/) card titles which include it.",
|
7 |
"ja": "カードの英語名か日本語名を入力し始めると[ミドルスクールで使用可能](https://www.eternalcentral.com/middleschoolrules/)なカード名が引っかかります。",
|
@@ -19,19 +19,19 @@ def get_locale():
|
|
19 |
"ja": "カード名もしくはその一部を入力してください",
|
20 |
},
|
21 |
"select_type": {
|
22 |
-
"en": "Select card
|
23 |
"ja": "タイプを選択してください:",
|
24 |
},
|
25 |
"search_by_type": {
|
26 |
-
"en": "Search by card
|
27 |
"ja": "カードタイプで検索:",
|
28 |
},
|
29 |
"search_by_type_placeholder": {
|
30 |
-
"en": "Type a
|
31 |
"ja": "タイプ、サブタイプ、スーパータイプを入力",
|
32 |
},
|
33 |
"select_type_placeholder": {
|
34 |
-
"en": "Select card
|
35 |
"ja": "カードタイプ選択",
|
36 |
},
|
37 |
"search_by_text": {
|
@@ -69,8 +69,8 @@ def get_locale():
|
|
69 |
},
|
70 |
"check": {
|
71 |
"title": {
|
72 |
-
"en": "
|
73 |
-
"ja": "
|
74 |
},
|
75 |
"instructions": {
|
76 |
"en": "Paste or type your list here to confirm that every card in it is [Middle School legal](https://www.eternalcentral.com/middleschoolrules/).",
|
|
|
1 |
def get_locale():
|
2 |
return {
|
3 |
"search": {
|
4 |
+
"title": {"en": "Card Search", "ja": "カード検索"},
|
5 |
"instructions": {
|
6 |
"en": "Enter any English or Japanese text to find all [Middle School legal](https://www.eternalcentral.com/middleschoolrules/) card titles which include it.",
|
7 |
"ja": "カードの英語名か日本語名を入力し始めると[ミドルスクールで使用可能](https://www.eternalcentral.com/middleschoolrules/)なカード名が引っかかります。",
|
|
|
19 |
"ja": "カード名もしくはその一部を入力してください",
|
20 |
},
|
21 |
"select_type": {
|
22 |
+
"en": "Select card type:",
|
23 |
"ja": "タイプを選択してください:",
|
24 |
},
|
25 |
"search_by_type": {
|
26 |
+
"en": "Search by card type:",
|
27 |
"ja": "カードタイプで検索:",
|
28 |
},
|
29 |
"search_by_type_placeholder": {
|
30 |
+
"en": "Type a type, subtype or supertype",
|
31 |
"ja": "タイプ、サブタイプ、スーパータイプを入力",
|
32 |
},
|
33 |
"select_type_placeholder": {
|
34 |
+
"en": "Select card type(s)",
|
35 |
"ja": "カードタイプ選択",
|
36 |
},
|
37 |
"search_by_text": {
|
|
|
69 |
},
|
70 |
"check": {
|
71 |
"title": {
|
72 |
+
"en": "List Check",
|
73 |
+
"ja": "リストチェック",
|
74 |
},
|
75 |
"instructions": {
|
76 |
"en": "Paste or type your list here to confirm that every card in it is [Middle School legal](https://www.eternalcentral.com/middleschoolrules/).",
|