Antonio0616 commited on
Commit
6d79b8b
ยท
verified ยท
1 Parent(s): 91006dc

Update pages/2_information.py

Browse files
Files changed (1) hide show
  1. 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 # ๐Ÿ‘ˆ ์ด๋ฏธ์ง€ ์—†์„ ๋•Œ 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
- # ๐Ÿ‘‰ ์ขŒ์šฐ 2๋‹จ ๋ฐฐ์น˜
96
- col1, col2 = st.columns([2, 1]) # ์™ผ์ชฝ: ์„ค๋ช…, ์˜ค๋ฅธ์ชฝ: ์ด๋ฏธ์ง€
97
 
98
  with col1:
 
99
  st.markdown(
100
  f"""
101
- <div style='background-color:#f9f9f9; padding:20px; border-radius:10px;
102
- box-shadow: 0 2px 6px rgba(0,0,0,0.1);'>
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)