Spaces:
Sleeping
Sleeping
Update pages/2_information.py
Browse files- pages/2_information.py +38 -11
pages/2_information.py
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
|
| 3 |
st.set_page_config(page_title="Information", layout="wide")
|
|
@@ -14,27 +20,27 @@ terms = {
|
|
| 14 |
"๊ธํ ๋ถํ": {
|
| 15 |
"Die (๋ค์ด)": {
|
| 16 |
"description": "ํ๋ ์ค ๊ณต๊ตฌ์ ํ๋ถ์ ์์น...",
|
| 17 |
-
"image": "assets/Drawing.png"
|
| 18 |
},
|
| 19 |
"Punch (ํ์น)": {
|
| 20 |
"description": "์๋ถ ๊ธํ์ผ๋ก ...",
|
| 21 |
-
"image": "assets/Drawing.png"
|
| 22 |
},
|
| 23 |
"Pad (ํจ๋)": {
|
| 24 |
"description": "์ ์ง ์๋ ฅ์ ๋ฐ๋ ๊ธํ ๋ถํ ์ด์นญ",
|
| 25 |
-
"image": None
|
| 26 |
},
|
| 27 |
},
|
| 28 |
"์์ฌ": {
|
| 29 |
"Blank (๋ธ๋ญํฌ)": {
|
| 30 |
"description": "Punch์ Die๊ฐ ์ฌ๋ฃํ์ ์์ฉํ์ฌ ๋ถ๋ฆฌ๋ ๊ฒฐ๊ณผ๋ฌผ",
|
| 31 |
-
"image": "assets/Drawing.png"
|
| 32 |
},
|
| 33 |
},
|
| 34 |
"๊ณต์ ": {
|
| 35 |
"Blank holder (๋ธ๋ญํฌ ํ๋)": {
|
| 36 |
"description": "๋๋ก์ ๊ธํ ๋๋ ํฌ๋ฐ ๊ธํ์ ๋ถํ...",
|
| 37 |
-
"image": "assets/Drawing.png"
|
| 38 |
},
|
| 39 |
}
|
| 40 |
}
|
|
@@ -42,6 +48,28 @@ terms = {
|
|
| 42 |
# ์ ์ฒด ์ฉ์ด flat dict
|
| 43 |
all_terms = {term: data for cat in terms.values() for term, data in cat.items()}
|
| 44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
# -------------------------------
|
| 46 |
# ์ธ์
์ด๊ธฐํ
|
| 47 |
# -------------------------------
|
|
@@ -92,15 +120,15 @@ if st.session_state["selected_term"]:
|
|
| 92 |
st.markdown("---")
|
| 93 |
st.markdown(f"## ๐ {term}")
|
| 94 |
|
| 95 |
-
#
|
| 96 |
-
col1, col2 = st.columns([2, 1])
|
| 97 |
|
| 98 |
with col1:
|
|
|
|
| 99 |
st.markdown(
|
| 100 |
f"""
|
| 101 |
-
<div
|
| 102 |
-
|
| 103 |
-
<p style='font-size:16px; color:#333;'>{data["description"]}</p>
|
| 104 |
</div>
|
| 105 |
""",
|
| 106 |
unsafe_allow_html=True
|
|
@@ -109,4 +137,3 @@ if st.session_state["selected_term"]:
|
|
| 109 |
with col2:
|
| 110 |
if data["image"]:
|
| 111 |
st.image(data["image"], use_container_width=True)
|
| 112 |
-
|
|
|
|
| 1 |
+
# -------------------------------
|
| 2 |
+
# ์ฉ์ด ๋ฐ์ดํฐ (์นดํ
๊ณ ๋ฆฌ๋ณ, ํ๊ธ+์๋ฌธ ๋ณ๊ธฐ)
|
| 3 |
+
# -------------------------------
|
| 4 |
+
from dashboard_theme.theme import inject
|
| 5 |
+
inject("graphite_gold")
|
| 6 |
+
|
| 7 |
import streamlit as st
|
| 8 |
|
| 9 |
st.set_page_config(page_title="Information", layout="wide")
|
|
|
|
| 20 |
"๊ธํ ๋ถํ": {
|
| 21 |
"Die (๋ค์ด)": {
|
| 22 |
"description": "ํ๋ ์ค ๊ณต๊ตฌ์ ํ๋ถ์ ์์น...",
|
| 23 |
+
"image": "assets/Drawing.png"
|
| 24 |
},
|
| 25 |
"Punch (ํ์น)": {
|
| 26 |
"description": "์๋ถ ๊ธํ์ผ๋ก ...",
|
| 27 |
+
"image": "assets/Drawing.png"
|
| 28 |
},
|
| 29 |
"Pad (ํจ๋)": {
|
| 30 |
"description": "์ ์ง ์๋ ฅ์ ๋ฐ๋ ๊ธํ ๋ถํ ์ด์นญ",
|
| 31 |
+
"image": None
|
| 32 |
},
|
| 33 |
},
|
| 34 |
"์์ฌ": {
|
| 35 |
"Blank (๋ธ๋ญํฌ)": {
|
| 36 |
"description": "Punch์ Die๊ฐ ์ฌ๋ฃํ์ ์์ฉํ์ฌ ๋ถ๋ฆฌ๋ ๊ฒฐ๊ณผ๋ฌผ",
|
| 37 |
+
"image": "assets/Drawing.png"
|
| 38 |
},
|
| 39 |
},
|
| 40 |
"๊ณต์ ": {
|
| 41 |
"Blank holder (๋ธ๋ญํฌ ํ๋)": {
|
| 42 |
"description": "๋๋ก์ ๊ธํ ๋๋ ํฌ๋ฐ ๊ธํ์ ๋ถํ...",
|
| 43 |
+
"image": "assets/Drawing.png"
|
| 44 |
},
|
| 45 |
}
|
| 46 |
}
|
|
|
|
| 48 |
# ์ ์ฒด ์ฉ์ด flat dict
|
| 49 |
all_terms = {term: data for cat in terms.values() for term, data in cat.items()}
|
| 50 |
|
| 51 |
+
# -------------------------------
|
| 52 |
+
# (์ค์) ์ค๋ช
๋ฐ์ค ์ ์ฉ ์คํ์ผ
|
| 53 |
+
# - ํ
๋ง ํจ๋์ ์ฐ๋, ๋ด๋ถ ๋ฌธ๋จ ์ฌ๋ฐฑ๋ง ์ฝ๊ฐ ํ๋
|
| 54 |
+
# -------------------------------
|
| 55 |
+
st.markdown(
|
| 56 |
+
"""
|
| 57 |
+
<style>
|
| 58 |
+
.info-panel { margin: 0 0 16px 0; }
|
| 59 |
+
.info-panel p { margin: 0; line-height: 1.7; font-size: 16px; }
|
| 60 |
+
/* ๋ง์ฝ ๋ฐ์ ์นด๋๊ฐ ํ์ํ๋ฉด ์๋ ํด๋์ค๋ก ์ฌ์ฉ (ํ์ฌ๋ ๋ฏธ์ฌ์ฉ)
|
| 61 |
+
.light-card {
|
| 62 |
+
background:#f9f9f9 !important; color:#1f2937 !important;
|
| 63 |
+
border:1px solid rgba(0,0,0,.08) !important; border-radius:12px;
|
| 64 |
+
padding:20px;
|
| 65 |
+
}
|
| 66 |
+
.light-card * { color:#1f2937 !important; }
|
| 67 |
+
*/
|
| 68 |
+
</style>
|
| 69 |
+
""",
|
| 70 |
+
unsafe_allow_html=True
|
| 71 |
+
)
|
| 72 |
+
|
| 73 |
# -------------------------------
|
| 74 |
# ์ธ์
์ด๊ธฐํ
|
| 75 |
# -------------------------------
|
|
|
|
| 120 |
st.markdown("---")
|
| 121 |
st.markdown(f"## ๐ {term}")
|
| 122 |
|
| 123 |
+
# ์ข(์ค๋ช
) : ์ฐ(์ด๋ฏธ์ง)
|
| 124 |
+
col1, col2 = st.columns([2, 1])
|
| 125 |
|
| 126 |
with col1:
|
| 127 |
+
# โ
ํ
๋ง์ ํจ๋(.panel)์ ๊ทธ๋๋ก ์ฌ์ฉ โ ๋คํฌ ๋ฐฐ๊ฒฝ + ๋ฐ์ ๊ธ์
|
| 128 |
st.markdown(
|
| 129 |
f"""
|
| 130 |
+
<div class="panel info-panel">
|
| 131 |
+
<p>{data["description"]}</p>
|
|
|
|
| 132 |
</div>
|
| 133 |
""",
|
| 134 |
unsafe_allow_html=True
|
|
|
|
| 137 |
with col2:
|
| 138 |
if data["image"]:
|
| 139 |
st.image(data["image"], use_container_width=True)
|
|
|