cryman38 commited on
Commit
b4ad4be
Β·
verified Β·
1 Parent(s): 753f710

Upload 14 files

Browse files
interface/about_interface.py CHANGED
@@ -13,7 +13,7 @@ def render():
13
 
14
  # Portfolio Rebalancing Tool Section
15
  create_tool_section(
16
- "πŸ”₯ Portfolio",
17
  """
18
  # 포트폴리였 λ¦¬λ°ΈλŸ°μ‹± 도ꡬ
19
 
@@ -216,7 +216,7 @@ def render():
216
 
217
  # Retirement Planning Tool Section
218
  create_tool_section(
219
- "πŸ§“ Retirement Planning",
220
  """
221
  # 은퇴 κ³„νš 도ꡬ
222
 
 
13
 
14
  # Portfolio Rebalancing Tool Section
15
  create_tool_section(
16
+ "πŸ‡ Portfolio",
17
  """
18
  # 포트폴리였 λ¦¬λ°ΈλŸ°μ‹± 도ꡬ
19
 
 
216
 
217
  # Retirement Planning Tool Section
218
  create_tool_section(
219
+ "πŸŒ… Retirement Planning",
220
  """
221
  # 은퇴 κ³„νš 도ꡬ
222
 
interface/portfolio_rebalancing_interface.py CHANGED
@@ -15,9 +15,9 @@ examples = [
15
 
16
  portfolio_inputs = [
17
  gr.Dropdown(label="πŸ’± Main Currency", choices=currency_codes, value="KRW", info="Assets converted to main currency."),
18
- gr.Textbox(label="πŸ”₯ Holdings", lines=2, info="Format: ticker currency quantity weight, ... ", placeholder="e.g., SCHD USD 500 8, QQQ USD 200 2", value="SCHD USD 500 8,\nQQQ USD 200 2,\n458730 krw 1000 8,\n368590 krw 1000 2"),
19
- gr.Number(label="πŸͺ΅ Cash", value=10000000),
20
- gr.Slider(label="βš–οΈ Cash Ratio (%)", value=15, minimum=0, maximum=100, step=1)
21
  ]
22
 
23
  output = gr.HTML()
 
15
 
16
  portfolio_inputs = [
17
  gr.Dropdown(label="πŸ’± Main Currency", choices=currency_codes, value="KRW", info="Assets converted to main currency."),
18
+ gr.Textbox(label="πŸ‡ Holdings", lines=2, info="Format: ticker currency quantity weight, ... ", placeholder="e.g., SCHD USD 500 8, QQQ USD 200 2", value="SCHD USD 500 8,\nQQQ USD 200 2,\n458730 krw 1000 8,\n368590 krw 1000 2"),
19
+ gr.Number(label="πŸ’§ Cash", value=10000000),
20
+ gr.Slider(label="πŸͺ£ Cash Ratio (%)", value=15, minimum=0, maximum=100, step=1)
21
  ]
22
 
23
  output = gr.HTML()
modules/portfolio_rebalancing.py CHANGED
@@ -90,8 +90,9 @@ def get_portfolio_rebalancing_info(portfolio, target_weights, main_currency_cash
90
  <div>
91
  <div style="margin-bottom: 1.5rem;">
92
  <!-- 전체 ν‰κ°€κΈˆμ•‘ ν‘œμ‹œ -->
93
- <div style="font-size: 1.5rem; margin-top: 1.5rem; margin-bottom: 1.5rem;">As of {current_time}, Market Value </div>
94
- <span style='font-size: 1.5rem; font-weight: bold; color: #1678fb'>{currency_symbol}{total_value:,.0f}</span>
 
95
  <hr style="margin: 1.5rem 0;">
96
  </div>
97
  </div>
 
90
  <div>
91
  <div style="margin-bottom: 1.5rem;">
92
  <!-- 전체 ν‰κ°€κΈˆμ•‘ ν‘œμ‹œ -->
93
+ <div style="font-size: 1.5rem; margin-top: 1.5rem; margin-bottom: 1.5rem;">Market Value</div>
94
+ <span style='font-size: 1.5rem; font-weight: bold; color: #1678fb'>{currency_symbol}{total_value:,.0f}</span>
95
+ As of {current_time}
96
  <hr style="margin: 1.5rem 0;">
97
  </div>
98
  </div>
modules/retirement_planning.py CHANGED
@@ -84,7 +84,7 @@ def retirement_planning(current_age=None, retirement_age=None, current_investmen
84
  </div>
85
  <h3>Dividend Income After Retirement</h3>
86
  <div class='table-container'>
87
- <table style='border-collapse: collapse; width: 100%;'>
88
  <thead>
89
  <tr>
90
  <th>Age</th>
 
84
  </div>
85
  <h3>Dividend Income After Retirement</h3>
86
  <div class='table-container'>
87
+ <table>
88
  <thead>
89
  <tr>
90
  <th>Age</th>
style.css CHANGED
@@ -9,9 +9,6 @@
9
  @import url('https://fonts.googleapis.com/css2?family=Patrick+Hand&display=swap');
10
  @import url('https://fonts.googleapis.com/css2?family=Baloo+Bhai+2:wght@400;700&display=swap');
11
 
12
- /* Comic Sans MS */
13
-
14
-
15
  #col-container {
16
  margin: 0 auto;
17
  max-width: 100%;
@@ -23,9 +20,9 @@
23
  }
24
 
25
  .wrap-text {
26
- word-wrap: break-word; /* 였래된 λΈŒλΌμš°μ €λ₯Ό μœ„ν•΄ */
27
- overflow-wrap: break-word; /* κΈ΄ 단어도 적절히 λŠμ–΄μ„œ μ€„λ°”κΏˆ */
28
- white-space: normal; /* ν…μŠ€νŠΈ 곡간에 맞게 μ€„λ°”κΏˆ */
29
  }
30
 
31
  :root {
@@ -41,8 +38,8 @@
41
  --sell-color: #f44336;
42
  --highlight-edit-bg-color-light: #fff2cc;
43
  --highlight-edit-text-color-light: #0000ff;
44
- --highlight-edit-bg-color-dark: hsl(45, 100%, 70%); /* μ–΄λ‘μš΄ λ°°κ²½ */
45
- --highlight-edit-text-color-dark: hsl(240, 100%, 50%); /* 밝은 ν…μŠ€νŠΈ */
46
  --highlight-yellow-bg-color-light: #ffeb3b;
47
  --highlight-yellow-bg-color-dark: #ffca28;
48
  --highlight-yellow-text-color-light: #000000;
@@ -116,27 +113,10 @@
116
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
117
  }
118
 
119
- /* .container {
120
- font-size: 1.2rem;
121
- margin-bottom: 15px;
122
- padding: 20px;
123
- border: 1px solid #ddd;
124
- border-radius: 5px;
125
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
126
- background-color: var(--highlight-color-light);
127
- } */
128
-
129
-
130
- /* 닀크λͺ¨λ“œ μŠ€νƒ€μΌ */
131
  @media (prefers-color-scheme: dark) {
132
- /* .container {
133
- background-color: var(--highlight-color-dark);
134
- }
135
- */
136
-
137
  .highlight-yellow {
138
  background-color: var(--highlight-yellow-bg-color-dark);
139
- color: var (--highlight-yellow-text-color-dark) !important;
140
  }
141
 
142
  .highlight-black {
@@ -157,61 +137,63 @@
157
  .buy-sell, .highlight-black, .highlight-yellow, .highlight-sky, .highlight-edit {
158
  box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
159
  }
160
-
161
  }
162
- /* κΈ°λ³Έ ν…Œμ΄λΈ” μŠ€νƒ€μΌ */
163
  .table-container {
164
- max-width: 100%;
165
- overflow-x: auto;
166
- border: 1px solid #ddd;
 
 
 
167
  }
168
-
169
  .table-container table {
170
  width: 100%;
171
  border-collapse: collapse;
172
- table-layout: auto;
173
- }
174
-
175
- .table-container th,
176
- .table-container td {
177
- padding: 8px 16px;
178
- border: 1px solid #ddd;
179
- background: #fff;
180
- /* white-space: nowrap; */
181
  text-align: left;
182
- text-transform: uppercase;
183
  }
184
-
185
- .table-container thead {
186
- background: #f9f9f9;
187
  }
188
-
189
- .table-container th:first-child,
190
- .table-container td:first-child {
191
  position: sticky;
192
- left: 0;
193
- background: #f9f9f9;
194
  z-index: 2;
195
  }
196
-
197
- /* 마우슀 μ˜€λ²„ 효과 */
198
- .table-container tr:hover td {
199
- background: #f1f1f1;
 
 
 
 
 
 
200
  }
201
-
202
- /* 닀크 λͺ¨λ“œ */
203
  @media (prefers-color-scheme: dark) {
204
  .table-container {
205
- border: 1px solid #444;
206
  }
207
-
208
  .table-container th,
209
  .table-container td {
210
- border: 1px solid #444;
211
  background: #333;
212
  color: #ccc;
213
  }
214
-
215
  .table-container thead {
216
  background: #444;
217
  }
@@ -221,8 +203,7 @@
221
  background: #444;
222
  }
223
 
224
- /* 닀크 λͺ¨λ“œ 마우슀 μ˜€λ²„ 효과 */
225
  .table-container tr:hover td {
226
- background: #555;
227
  }
228
  }
 
9
  @import url('https://fonts.googleapis.com/css2?family=Patrick+Hand&display=swap');
10
  @import url('https://fonts.googleapis.com/css2?family=Baloo+Bhai+2:wght@400;700&display=swap');
11
 
 
 
 
12
  #col-container {
13
  margin: 0 auto;
14
  max-width: 100%;
 
20
  }
21
 
22
  .wrap-text {
23
+ word-wrap: break-word;
24
+ overflow-wrap: break-word;
25
+ white-space: normal;
26
  }
27
 
28
  :root {
 
38
  --sell-color: #f44336;
39
  --highlight-edit-bg-color-light: #fff2cc;
40
  --highlight-edit-text-color-light: #0000ff;
41
+ --highlight-edit-bg-color-dark: hsl(45, 100%, 70%);
42
+ --highlight-edit-text-color-dark: hsl(240, 100%, 50%);
43
  --highlight-yellow-bg-color-light: #ffeb3b;
44
  --highlight-yellow-bg-color-dark: #ffca28;
45
  --highlight-yellow-text-color-light: #000000;
 
113
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
114
  }
115
 
 
 
 
 
 
 
 
 
 
 
 
 
116
  @media (prefers-color-scheme: dark) {
 
 
 
 
 
117
  .highlight-yellow {
118
  background-color: var(--highlight-yellow-bg-color-dark);
119
+ color: var(--highlight-yellow-text-color-dark) !important;
120
  }
121
 
122
  .highlight-black {
 
137
  .buy-sell, .highlight-black, .highlight-yellow, .highlight-sky, .highlight-edit {
138
  box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
139
  }
 
140
  }
141
+
142
  .table-container {
143
+ width: 100%;
144
+ overflow: auto;
145
+ margin-bottom: 20px;
146
+ position: relative;
147
+ max-height: 600px;
148
+ /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); */
149
  }
150
+
151
  .table-container table {
152
  width: 100%;
153
  border-collapse: collapse;
154
+ }
155
+
156
+ .table-container th, .table-container td {
157
+ border: 1px hidden #ddd;
158
+ padding: 8px;
 
 
 
 
159
  text-align: left;
160
+ background-color: var(--background-color-light);
161
  }
162
+
163
+ .table-container tr:hover td {
164
+ background: #e7f9ef;
165
  }
166
+
167
+ .table-container th {
168
+ background-color: var(--highlight-color-light);
169
  position: sticky;
170
+ top: 0;
 
171
  z-index: 2;
172
  }
173
+
174
+ .table-container td:first-child, .table-container th:first-child {
175
+ position: sticky;
176
+ left: 0;
177
+ z-index: 1;
178
+ background-color: var(--highlight-color-light);
179
+ }
180
+
181
+ .table-container th:first-child {
182
+ z-index: 3;
183
  }
184
+
 
185
  @media (prefers-color-scheme: dark) {
186
  .table-container {
187
+ border: 1px hidden #444;
188
  }
189
+
190
  .table-container th,
191
  .table-container td {
192
+ border: 1px hidden #444;
193
  background: #333;
194
  color: #ccc;
195
  }
196
+
197
  .table-container thead {
198
  background: #444;
199
  }
 
203
  background: #444;
204
  }
205
 
 
206
  .table-container tr:hover td {
207
+ background: #e7f9ef;
208
  }
209
  }