Update src/app.py
Browse files- src/app.py +303 -367
src/app.py
CHANGED
|
@@ -1128,21 +1128,20 @@ def _navigate_to_ticker(ticker):
|
|
| 1128 |
|
| 1129 |
|
| 1130 |
def render_grouped_alert_panel(prices, rate):
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1131 |
groups = _build_alert_groups(prices, rate)
|
| 1132 |
total_cnt = sum(len(v) for v in groups.values())
|
| 1133 |
if total_cnt == 0:
|
| 1134 |
return
|
| 1135 |
|
| 1136 |
-
elapsed = time.time() - st.session_state.alert_panel_start_time
|
| 1137 |
-
time_left = max(0, 60 - int(elapsed))
|
| 1138 |
-
if time_left == 0 and not st.session_state.alert_panel_minimized:
|
| 1139 |
-
st.session_state.alert_panel_minimized = True
|
| 1140 |
-
|
| 1141 |
TAB_CFG = {
|
| 1142 |
-
"κΈλ³": {"icon": "β‘", "accent": "#FF6B35", "bg": "rgba(255,107,53,0.
|
| 1143 |
-
"λ§€μ": {"icon": "π", "accent": "#00D4AA", "bg": "rgba(0,212,170,0.
|
| 1144 |
-
"μ΅μ ": {"icon": "β
", "accent": "#4299E1", "bg": "rgba(66,153,225,0.
|
| 1145 |
-
"μ€ν±λ‘μ€": {"icon": "π", "accent": "#E53E3E", "bg": "rgba(229,62,62,0.
|
| 1146 |
}
|
| 1147 |
|
| 1148 |
sl_cnt = len(groups["μ€ν±λ‘μ€"])
|
|
@@ -1157,386 +1156,346 @@ def render_grouped_alert_panel(prices, rate):
|
|
| 1157 |
else:
|
| 1158 |
st.session_state.alert_active_tab = "κΈλ³"
|
| 1159 |
active_tab = st.session_state.alert_active_tab
|
|
|
|
| 1160 |
|
| 1161 |
-
|
| 1162 |
-
|
| 1163 |
-
rows = []
|
| 1164 |
-
for item in groups[tab]:
|
| 1165 |
-
pct = item["change_pct"]
|
| 1166 |
-
rows.append({
|
| 1167 |
-
"ticker": item["ticker"],
|
| 1168 |
-
"name": (item["name"][:14] + "..") if len(item["name"]) > 14 else item["name"],
|
| 1169 |
-
"pct_str": ("β² " if pct >= 0 else "βΌ ") + str(round(abs(pct), 1)) + "%",
|
| 1170 |
-
"price": format(item["current_price"], ",") + "μ",
|
| 1171 |
-
})
|
| 1172 |
-
data[tab] = rows
|
| 1173 |
-
|
| 1174 |
-
tab_json = json.dumps(
|
| 1175 |
-
{t: {"icon": v["icon"], "accent": v["accent"], "bg": v["bg"], "border": v["border"]}
|
| 1176 |
-
for t, v in TAB_CFG.items()},
|
| 1177 |
-
ensure_ascii=False
|
| 1178 |
-
)
|
| 1179 |
-
data_json = json.dumps(data, ensure_ascii=False)
|
| 1180 |
-
timer_col = "#E53E3E" if time_left <= 15 else ("#EAB308" if time_left <= 30 else "#8B98B4")
|
| 1181 |
-
|
| 1182 |
-
B = badge_col
|
| 1183 |
-
T = str(time_left)
|
| 1184 |
-
N = str(total_cnt)
|
| 1185 |
-
TC = timer_col
|
| 1186 |
-
IMIN = "true" if minimized else "false"
|
| 1187 |
-
ITAB = json.dumps(active_tab, ensure_ascii=False)
|
| 1188 |
-
# CSS display κ°μ μ§μ λ¬Έμμ΄λ‘ μ²λ¦¬ (% ν¬λ§€ν
μΆ©λ λ°©μ§)
|
| 1189 |
-
DMIN = "flex" if minimized else "none"
|
| 1190 |
-
DPAN = "none" if minimized else "flex"
|
| 1191 |
-
|
| 1192 |
-
html_template = """<!DOCTYPE html>
|
| 1193 |
-
<html>
|
| 1194 |
-
<head>
|
| 1195 |
-
<meta charset="utf-8">
|
| 1196 |
-
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@600;700;800&family=Noto+Sans+KR:wght@400;500;700;900&display=swap" rel="stylesheet">
|
| 1197 |
<style>
|
| 1198 |
-
|
| 1199 |
-
|
| 1200 |
-
|
| 1201 |
-
|
| 1202 |
-
|
| 1203 |
-
|
| 1204 |
-
|
| 1205 |
-
|
| 1206 |
-
|
| 1207 |
-
|
| 1208 |
-
bottom: 24px;
|
| 1209 |
-
right: 20px;
|
| 1210 |
-
z-index: 9999;
|
| 1211 |
-
pointer-events: auto;
|
| 1212 |
}
|
| 1213 |
-
|
|
|
|
|
|
|
|
|
|
| 1214 |
align-items: center;
|
| 1215 |
-
gap:
|
| 1216 |
-
background: linear-gradient(135deg, #1a1f2e
|
| 1217 |
-
border: 1px solid __BADGE_COL__;
|
| 1218 |
border-radius: 40px;
|
| 1219 |
-
padding: 10px
|
| 1220 |
cursor: pointer;
|
| 1221 |
-
box-shadow: 0 8px
|
| 1222 |
-
|
| 1223 |
-
|
| 1224 |
-
transition: border-color 0.2s;
|
| 1225 |
-
}
|
| 1226 |
-
#badge:hover { border-color: rgba(255,255,255,0.3); }
|
| 1227 |
-
.badge-dot {
|
| 1228 |
-
width: 6px; height: 6px; border-radius: 50%%;
|
| 1229 |
-
background: __BADGE_COL__;
|
| 1230 |
-
animation: pulse 1.5s infinite;
|
| 1231 |
-
display: inline-block;
|
| 1232 |
}
|
| 1233 |
-
|
| 1234 |
-
|
| 1235 |
-
|
| 1236 |
-
|
| 1237 |
-
}
|
| 1238 |
-
.p-header {
|
| 1239 |
-
background: linear-gradient(135deg, #1e2538 0%%, #161c2c 100%%);
|
| 1240 |
border: 1px solid rgba(255,255,255,0.09);
|
| 1241 |
border-bottom: none;
|
| 1242 |
-
border-radius:
|
| 1243 |
-
padding: 14px
|
| 1244 |
}
|
| 1245 |
-
.
|
| 1246 |
-
display: flex;
|
|
|
|
| 1247 |
justify-content: space-between;
|
| 1248 |
-
margin-bottom:
|
| 1249 |
-
}
|
| 1250 |
-
.live-dot {
|
| 1251 |
-
width: 8px; height: 8px; border-radius: 50%%;
|
| 1252 |
-
background: #FF6B35;
|
| 1253 |
-
box-shadow: 0 0 8px rgba(255,107,53,0.8);
|
| 1254 |
-
animation: pulse 1.5s infinite;
|
| 1255 |
-
display: inline-block;
|
| 1256 |
-
}
|
| 1257 |
-
.live-label {
|
| 1258 |
-
font-size: 12px; font-weight: 700; color: #e8eaf0;
|
| 1259 |
-
letter-spacing: 0.08em;
|
| 1260 |
-
font-family: 'JetBrains Mono', monospace;
|
| 1261 |
-
}
|
| 1262 |
-
.total-badge {
|
| 1263 |
-
background: rgba(229,62,62,0.15);
|
| 1264 |
-
border: 1px solid rgba(229,62,62,0.3);
|
| 1265 |
-
border-radius: 5px; padding: 1px 7px;
|
| 1266 |
-
font-size: 10px; color: #E53E3E; font-weight: 700;
|
| 1267 |
-
font-family: 'JetBrains Mono', monospace;
|
| 1268 |
}
|
| 1269 |
-
|
| 1270 |
-
|
| 1271 |
-
|
| 1272 |
-
|
| 1273 |
-
|
| 1274 |
-
.min-btn {
|
| 1275 |
-
background: transparent;
|
| 1276 |
-
border: 1px solid rgba(255,255,255,0.1);
|
| 1277 |
-
border-radius: 6px;
|
| 1278 |
-
color: rgba(255,255,255,0.35);
|
| 1279 |
-
font-size: 16px; padding: 3px 9px;
|
| 1280 |
-
cursor: pointer; line-height: 1;
|
| 1281 |
-
transition: all 0.15s;
|
| 1282 |
-
font-family: 'JetBrains Mono', monospace;
|
| 1283 |
}
|
| 1284 |
-
.
|
| 1285 |
-
.tabs-row { display: flex; gap: 4px; }
|
| 1286 |
-
.tab-btn {
|
| 1287 |
flex: 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1288 |
border: 1px solid rgba(255,255,255,0.06);
|
| 1289 |
border-bottom: none;
|
| 1290 |
-
border-radius: 8px 8px 0 0;
|
| 1291 |
-
padding: 8px 3px;
|
| 1292 |
-
cursor: pointer;
|
| 1293 |
-
display: flex; flex-direction: column; align-items: center; gap: 3px;
|
| 1294 |
-
transition: all 0.18s;
|
| 1295 |
-
background: transparent;
|
| 1296 |
-
}
|
| 1297 |
-
.tab-btn:hover { opacity: 0.9 !important; }
|
| 1298 |
-
.tab-icon { font-size: 14px; }
|
| 1299 |
-
.tab-label { font-size: 9px; font-weight: 700; letter-spacing: 0.04em; font-family: 'Noto Sans KR', sans-serif; }
|
| 1300 |
-
.tab-count {
|
| 1301 |
-
border-radius: 8px; min-width: 16px; height: 16px;
|
| 1302 |
-
display: flex; align-items: center; justify-content: center;
|
| 1303 |
-
font-size: 9px; font-weight: 700; padding: 0 4px; color: #fff;
|
| 1304 |
-
font-family: 'JetBrains Mono', monospace;
|
| 1305 |
}
|
| 1306 |
-
|
| 1307 |
-
|
|
|
|
|
|
|
| 1308 |
border: 1px solid rgba(255,255,255,0.09);
|
| 1309 |
-
border-radius: 0 0
|
| 1310 |
-
|
|
|
|
| 1311 |
overflow-y: auto;
|
| 1312 |
-
padding: 8px;
|
| 1313 |
}
|
| 1314 |
-
.
|
| 1315 |
-
.
|
| 1316 |
-
|
| 1317 |
-
|
| 1318 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1319 |
border-radius: 10px;
|
| 1320 |
-
cursor: pointer;
|
| 1321 |
border: 1px solid transparent;
|
| 1322 |
-
margin-bottom:
|
| 1323 |
-
transition:
|
| 1324 |
-
|
| 1325 |
}
|
| 1326 |
-
.alert-
|
| 1327 |
-
.alert-
|
| 1328 |
-
|
| 1329 |
-
|
| 1330 |
display: flex; align-items: center; justify-content: center;
|
| 1331 |
flex-shrink: 0;
|
| 1332 |
-
font-size: 9px; font-weight: 800;
|
| 1333 |
font-family: 'JetBrains Mono', monospace;
|
|
|
|
| 1334 |
}
|
| 1335 |
-
|
| 1336 |
-
|
| 1337 |
-
|
| 1338 |
-
|
| 1339 |
-
|
| 1340 |
-
|
| 1341 |
-
|
| 1342 |
-
from { transform: translateY(30px); opacity: 0; }
|
| 1343 |
-
to { transform: translateY(0); opacity: 1; }
|
| 1344 |
}
|
| 1345 |
-
|
| 1346 |
-
|
| 1347 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1348 |
}
|
| 1349 |
-
@keyframes
|
| 1350 |
-
0%
|
| 1351 |
-
50%% { opacity: 0.3; }
|
| 1352 |
}
|
| 1353 |
-
@keyframes
|
| 1354 |
-
from { transform:
|
| 1355 |
-
to { transform:
|
| 1356 |
}
|
| 1357 |
</style>
|
| 1358 |
-
|
| 1359 |
-
|
| 1360 |
-
|
| 1361 |
-
|
| 1362 |
-
|
| 1363 |
-
|
| 1364 |
-
|
| 1365 |
-
|
| 1366 |
-
|
| 1367 |
-
|
| 1368 |
-
|
| 1369 |
-
|
| 1370 |
-
|
| 1371 |
</span>
|
| 1372 |
-
<span style="font-size:
|
| 1373 |
-
<span
|
| 1374 |
-
|
| 1375 |
-
|
| 1376 |
-
<!-- ν ν¨λ -->
|
| 1377 |
-
<div id="panel" style="display:__DPAN__;">
|
| 1378 |
-
<div class="p-header">
|
| 1379 |
-
<div class="p-header-row">
|
| 1380 |
-
<div style="display:flex;align-items:center;gap:8px;">
|
| 1381 |
-
<span class="live-dot"></span>
|
| 1382 |
-
<span class="live-label">LIVE ALERTS</span>
|
| 1383 |
-
<span class="total-badge">__N__</span>
|
| 1384 |
-
</div>
|
| 1385 |
-
<div style="display:flex;align-items:center;gap:6px;">
|
| 1386 |
-
<div class="timer-wrap">
|
| 1387 |
-
<span style="font-size:12px;">⏱</span>
|
| 1388 |
-
<span id="timer-txt"
|
| 1389 |
-
style="font-size:11px;font-weight:700;font-family:'JetBrains Mono',monospace;color:__TC__;">__T__s</span>
|
| 1390 |
-
</div>
|
| 1391 |
-
<button class="min-btn" onclick="minimize()">−</button>
|
| 1392 |
-
</div>
|
| 1393 |
-
</div>
|
| 1394 |
-
<div class="tabs-row" id="tabs-row"></div>
|
| 1395 |
-
</div>
|
| 1396 |
-
<div class="p-body" id="panel-body"></div>
|
| 1397 |
</div>
|
| 1398 |
-
|
| 1399 |
</div>
|
|
|
|
| 1400 |
|
| 1401 |
-
|
| 1402 |
-
|
| 1403 |
-
|
| 1404 |
-
|
| 1405 |
-
|
| 1406 |
-
|
| 1407 |
-
|
| 1408 |
-
|
| 1409 |
-
|
| 1410 |
-
|
| 1411 |
-
|
| 1412 |
-
|
| 1413 |
-
|
| 1414 |
-
|
| 1415 |
-
var isA = (tab === ACTIVE_TAB);
|
| 1416 |
-
var btn = document.createElement('div');
|
| 1417 |
-
btn.className = 'tab-btn';
|
| 1418 |
-
btn.style.cssText =
|
| 1419 |
-
'background:' + (isA ? tc.bg : 'transparent') + ';' +
|
| 1420 |
-
'border-color:' + (isA ? tc.border : 'rgba(255,255,255,0.06)') + ';' +
|
| 1421 |
-
'border-bottom:' + (isA ? '2px solid ' + tc.accent : '1px solid transparent') + ';' +
|
| 1422 |
-
'opacity:' + (isA ? '1' : '0.55') + ';';
|
| 1423 |
-
btn.innerHTML =
|
| 1424 |
-
'<span class="tab-icon">' + tc.icon + '</span>' +
|
| 1425 |
-
'<span class="tab-label" style="color:' + (isA ? tc.accent : 'rgba(255,255,255,0.4)') + '">' + tab + '</span>' +
|
| 1426 |
-
'<span class="tab-count" style="background:' + (cnt > 0 ? tc.accent : 'rgba(255,255,255,0.15)') + '">' + cnt + '</span>';
|
| 1427 |
-
btn.onclick = (function(t) { return function() { switchTab(t); }; })(tab);
|
| 1428 |
-
el.appendChild(btn);
|
| 1429 |
-
});
|
| 1430 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1431 |
|
| 1432 |
-
|
| 1433 |
-
|
| 1434 |
-
|
| 1435 |
-
|
| 1436 |
-
|
| 1437 |
-
|
| 1438 |
-
if
|
| 1439 |
-
|
| 1440 |
-
|
| 1441 |
-
|
| 1442 |
-
|
| 1443 |
-
|
| 1444 |
-
|
| 1445 |
-
|
| 1446 |
-
|
| 1447 |
-
|
| 1448 |
-
|
| 1449 |
-
|
| 1450 |
-
|
| 1451 |
-
|
| 1452 |
-
|
| 1453 |
-
|
| 1454 |
-
|
| 1455 |
-
|
| 1456 |
-
|
| 1457 |
-
|
| 1458 |
-
|
| 1459 |
-
|
| 1460 |
-
|
| 1461 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1462 |
|
| 1463 |
-
|
| 1464 |
-
|
| 1465 |
-
|
| 1466 |
-
var iv = setInterval(function() {
|
| 1467 |
-
if (MINIMIZED) return;
|
| 1468 |
-
TIME_LEFT--;
|
| 1469 |
-
if (TIME_LEFT <= 0) {
|
| 1470 |
-
clearInterval(iv);
|
| 1471 |
-
minimize();
|
| 1472 |
-
sendAction('expired');
|
| 1473 |
-
return;
|
| 1474 |
-
}
|
| 1475 |
-
if (timerEl) {
|
| 1476 |
-
timerEl.textContent = TIME_LEFT + 's';
|
| 1477 |
-
timerEl.style.color = TIME_LEFT <= 15 ? '#E53E3E' : (TIME_LEFT <= 30 ? '#EAB308' : '#8B98B4');
|
| 1478 |
-
}
|
| 1479 |
-
}, 1000);
|
| 1480 |
|
| 1481 |
-
|
| 1482 |
-
|
| 1483 |
-
|
| 1484 |
-
|
| 1485 |
-
|
| 1486 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1487 |
|
| 1488 |
-
|
| 1489 |
-
|
| 1490 |
-
|
| 1491 |
-
|
| 1492 |
-
iv = setInterval(function() {
|
| 1493 |
-
if (MINIMIZED) return;
|
| 1494 |
-
TIME_LEFT--;
|
| 1495 |
-
if (TIME_LEFT <= 0) { clearInterval(iv); minimize(); sendAction('expired'); return; }
|
| 1496 |
-
if (timerEl) {
|
| 1497 |
-
timerEl.textContent = TIME_LEFT + 's';
|
| 1498 |
-
timerEl.style.color = TIME_LEFT <= 15 ? '#E53E3E' : (TIME_LEFT <= 30 ? '#EAB308' : '#8B98B4');
|
| 1499 |
-
}
|
| 1500 |
-
}, 1000);
|
| 1501 |
-
if (timerEl) { timerEl.textContent = '60s'; timerEl.style.color = '#8B98B4'; }
|
| 1502 |
-
document.getElementById('badge').style.display = 'none';
|
| 1503 |
-
document.getElementById('panel').style.display = 'flex';
|
| 1504 |
-
sendAction('open');
|
| 1505 |
-
}
|
| 1506 |
|
| 1507 |
-
|
| 1508 |
-
|
| 1509 |
-
renderTabs();
|
| 1510 |
-
renderBody();
|
| 1511 |
-
sendAction('tab:' + t);
|
| 1512 |
-
}
|
| 1513 |
|
| 1514 |
-
|
| 1515 |
|
| 1516 |
-
|
| 1517 |
-
|
| 1518 |
-
|
| 1519 |
-
|
| 1520 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1521 |
}
|
| 1522 |
-
</
|
| 1523 |
-
<
|
| 1524 |
-
|
| 1525 |
-
|
| 1526 |
-
|
| 1527 |
-
|
| 1528 |
-
|
| 1529 |
-
|
| 1530 |
-
|
| 1531 |
-
|
| 1532 |
-
|
| 1533 |
-
|
| 1534 |
-
|
| 1535 |
-
|
| 1536 |
-
|
| 1537 |
-
|
| 1538 |
-
|
| 1539 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1540 |
|
| 1541 |
|
| 1542 |
# ============================================================
|
|
@@ -2120,26 +2079,3 @@ with nc[0]: st.button("*β‘*\nλ©λ΄", key="nav_menu", on_click=toggle_menu,
|
|
| 2120 |
with nc[1]: st.button("*β*\nν", key="nav_home", on_click=go_home, use_container_width=True)
|
| 2121 |
with nc[2]: st.button("*β
*\nκ΄μ¬", key="nav_fav", on_click=lambda: select_menu("β
κ΄μ¬ μ’
λͺ©"), use_container_width=True)
|
| 2122 |
with nc[3]: st.button("*βΉ*\nλ€λ‘", key="nav_back", on_click=go_back, use_container_width=True)
|
| 2123 |
-
|
| 2124 |
-
# ββ λλ²κ·Έ: ν¨λ κ°μ λ λ ββββββββββββββββββββββββββββββββββ
|
| 2125 |
-
components.html("""<!DOCTYPE html>
|
| 2126 |
-
<html><head><meta charset="utf-8">
|
| 2127 |
-
<style>
|
| 2128 |
-
* { margin:0; padding:0; }
|
| 2129 |
-
html, body { background:transparent; overflow:hidden; width:100vw; height:100vh; }
|
| 2130 |
-
#box {
|
| 2131 |
-
position: fixed;
|
| 2132 |
-
bottom: 80px;
|
| 2133 |
-
right: 20px;
|
| 2134 |
-
background: red;
|
| 2135 |
-
color: white;
|
| 2136 |
-
padding: 20px;
|
| 2137 |
-
border-radius: 10px;
|
| 2138 |
-
font-size: 16px;
|
| 2139 |
-
font-weight: bold;
|
| 2140 |
-
z-index: 9999;
|
| 2141 |
-
pointer-events: auto;
|
| 2142 |
-
}
|
| 2143 |
-
</style></head>
|
| 2144 |
-
<body><div id="box">β
iframe μλμ€</div></body></html>
|
| 2145 |
-
""", height=0, scrolling=False)
|
|
|
|
| 1128 |
|
| 1129 |
|
| 1130 |
def render_grouped_alert_panel(prices, rate):
|
| 1131 |
+
"""
|
| 1132 |
+
st.markdown κΈ°λ° μλ ν¨λ β HuggingFace Spaces μμ νΈν
|
| 1133 |
+
components.html λ―Έμ¬μ©. position:fixed CSS + Streamlit λ²νΌμΌλ‘ μνΈμμ©.
|
| 1134 |
+
"""
|
| 1135 |
groups = _build_alert_groups(prices, rate)
|
| 1136 |
total_cnt = sum(len(v) for v in groups.values())
|
| 1137 |
if total_cnt == 0:
|
| 1138 |
return
|
| 1139 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1140 |
TAB_CFG = {
|
| 1141 |
+
"κΈλ³": {"icon": "β‘", "accent": "#FF6B35", "bg": "rgba(255,107,53,0.12)", "border": "rgba(255,107,53,0.35)"},
|
| 1142 |
+
"λ§€μ": {"icon": "π", "accent": "#00D4AA", "bg": "rgba(0,212,170,0.12)", "border": "rgba(0,212,170,0.35)"},
|
| 1143 |
+
"μ΅μ ": {"icon": "β
", "accent": "#4299E1", "bg": "rgba(66,153,225,0.12)", "border": "rgba(66,153,225,0.35)"},
|
| 1144 |
+
"μ€ν±λ‘μ€": {"icon": "π", "accent": "#E53E3E", "bg": "rgba(229,62,62,0.12)", "border": "rgba(229,62,62,0.35)"},
|
| 1145 |
}
|
| 1146 |
|
| 1147 |
sl_cnt = len(groups["μ€ν±λ‘μ€"])
|
|
|
|
| 1156 |
else:
|
| 1157 |
st.session_state.alert_active_tab = "κΈλ³"
|
| 1158 |
active_tab = st.session_state.alert_active_tab
|
| 1159 |
+
tc = TAB_CFG[active_tab]
|
| 1160 |
|
| 1161 |
+
# ββ κ³΅ν΅ CSS (ν λ²λ§ μ£Όμ
) ββββββββββββββββββββββββββββββ
|
| 1162 |
+
st.markdown("""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1163 |
<style>
|
| 1164 |
+
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@600;700;800&family=Noto+Sans+KR:wght@400;700;900&display=swap');
|
| 1165 |
+
|
| 1166 |
+
/* ν¨λ μ 체 λνΌ β μ°νλ¨ κ³ μ */
|
| 1167 |
+
.alert-float-wrap {
|
| 1168 |
+
position: fixed !important;
|
| 1169 |
+
bottom: 76px !important;
|
| 1170 |
+
right: 16px !important;
|
| 1171 |
+
width: 360px !important;
|
| 1172 |
+
z-index: 99999 !important;
|
| 1173 |
+
font-family: 'Noto Sans KR', sans-serif !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1174 |
}
|
| 1175 |
+
|
| 1176 |
+
/* μ΅μν λ°°μ§ */
|
| 1177 |
+
.alert-badge {
|
| 1178 |
+
display: flex;
|
| 1179 |
align-items: center;
|
| 1180 |
+
gap: 9px;
|
| 1181 |
+
background: linear-gradient(135deg, #1a1f2e, #151921);
|
|
|
|
| 1182 |
border-radius: 40px;
|
| 1183 |
+
padding: 10px 18px;
|
| 1184 |
cursor: pointer;
|
| 1185 |
+
box-shadow: 0 8px 28px rgba(0,0,0,0.6);
|
| 1186 |
+
width: fit-content;
|
| 1187 |
+
margin-left: auto;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1188 |
}
|
| 1189 |
+
|
| 1190 |
+
/* ν¨λ ν€λ */
|
| 1191 |
+
.alert-panel-hdr {
|
| 1192 |
+
background: linear-gradient(135deg, #1e2538, #161c2c);
|
|
|
|
|
|
|
|
|
|
| 1193 |
border: 1px solid rgba(255,255,255,0.09);
|
| 1194 |
border-bottom: none;
|
| 1195 |
+
border-radius: 14px 14px 0 0;
|
| 1196 |
+
padding: 13px 14px 0;
|
| 1197 |
}
|
| 1198 |
+
.alert-hdr-row {
|
| 1199 |
+
display: flex;
|
| 1200 |
+
align-items: center;
|
| 1201 |
justify-content: space-between;
|
| 1202 |
+
margin-bottom: 12px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1203 |
}
|
| 1204 |
+
|
| 1205 |
+
/* ν ν */
|
| 1206 |
+
.alert-tabs {
|
| 1207 |
+
display: flex;
|
| 1208 |
+
gap: 3px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1209 |
}
|
| 1210 |
+
.alert-tab-item {
|
|
|
|
|
|
|
| 1211 |
flex: 1;
|
| 1212 |
+
border-radius: 8px 8px 0 0;
|
| 1213 |
+
padding: 7px 3px;
|
| 1214 |
+
display: flex;
|
| 1215 |
+
flex-direction: column;
|
| 1216 |
+
align-items: center;
|
| 1217 |
+
gap: 2px;
|
| 1218 |
border: 1px solid rgba(255,255,255,0.06);
|
| 1219 |
border-bottom: none;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1220 |
}
|
| 1221 |
+
|
| 1222 |
+
/* ν¨λ λ°λ */
|
| 1223 |
+
.alert-panel-body {
|
| 1224 |
+
background: linear-gradient(180deg, #161c2a, #111620);
|
| 1225 |
border: 1px solid rgba(255,255,255,0.09);
|
| 1226 |
+
border-radius: 0 0 14px 14px;
|
| 1227 |
+
padding: 7px;
|
| 1228 |
+
max-height: 270px;
|
| 1229 |
overflow-y: auto;
|
|
|
|
| 1230 |
}
|
| 1231 |
+
.alert-panel-body::-webkit-scrollbar { width: 3px; }
|
| 1232 |
+
.alert-panel-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
|
| 1233 |
+
|
| 1234 |
+
/* μλ μμ΄ν
*/
|
| 1235 |
+
.alert-row {
|
| 1236 |
+
display: flex;
|
| 1237 |
+
align-items: center;
|
| 1238 |
+
gap: 11px;
|
| 1239 |
+
padding: 9px 11px;
|
| 1240 |
border-radius: 10px;
|
|
|
|
| 1241 |
border: 1px solid transparent;
|
| 1242 |
+
margin-bottom: 3px;
|
| 1243 |
+
transition: background 0.15s;
|
| 1244 |
+
cursor: pointer;
|
| 1245 |
}
|
| 1246 |
+
.alert-row:hover { background: rgba(255,255,255,0.05) !important; }
|
| 1247 |
+
.alert-ticker-sq {
|
| 1248 |
+
width: 38px; height: 38px;
|
| 1249 |
+
border-radius: 9px;
|
| 1250 |
display: flex; align-items: center; justify-content: center;
|
| 1251 |
flex-shrink: 0;
|
| 1252 |
+
font-size: 9px; font-weight: 800;
|
| 1253 |
font-family: 'JetBrains Mono', monospace;
|
| 1254 |
+
letter-spacing: -0.02em;
|
| 1255 |
}
|
| 1256 |
+
|
| 1257 |
+
/* λ²νΌ μμ μ¨κΈ°κΈ° β μλ ν¨λ λ΄λΆ st.button */
|
| 1258 |
+
div[data-testid="stVerticalBlock"]:has(.alert-float-wrap) div.stButton > button {
|
| 1259 |
+
all: unset !important;
|
| 1260 |
+
cursor: pointer !important;
|
| 1261 |
+
display: block !important;
|
| 1262 |
+
width: 100% !important;
|
|
|
|
|
|
|
| 1263 |
}
|
| 1264 |
+
|
| 1265 |
+
/* μ΅μν/μ΄κΈ°/ν/μ’
λͺ© λ²νΌ κ³΅ν΅ λ¦¬μ
*/
|
| 1266 |
+
.alert-btn-reset > div.stButton > button {
|
| 1267 |
+
background: transparent !important;
|
| 1268 |
+
border: none !important;
|
| 1269 |
+
box-shadow: none !important;
|
| 1270 |
+
padding: 0 !important;
|
| 1271 |
+
margin: 0 !important;
|
| 1272 |
+
color: inherit !important;
|
| 1273 |
+
font-size: inherit !important;
|
| 1274 |
+
font-weight: inherit !important;
|
| 1275 |
+
width: 100% !important;
|
| 1276 |
+
text-align: left !important;
|
| 1277 |
+
cursor: pointer !important;
|
| 1278 |
+
}
|
| 1279 |
+
.alert-btn-reset > div.stButton > button p {
|
| 1280 |
+
margin: 0 !important;
|
| 1281 |
+
color: inherit !important;
|
| 1282 |
+
font-size: inherit !important;
|
| 1283 |
+
white-space: pre-wrap !important;
|
| 1284 |
+
}
|
| 1285 |
+
|
| 1286 |
+
@keyframes alertSlideUp {
|
| 1287 |
+
from { transform: translateY(20px); opacity: 0; }
|
| 1288 |
+
to { transform: translateY(0); opacity: 1; }
|
| 1289 |
}
|
| 1290 |
+
@keyframes alertPulse {
|
| 1291 |
+
0%, 100% { opacity: 1; } 50% { opacity: 0.3; }
|
|
|
|
| 1292 |
}
|
| 1293 |
+
@keyframes alertBadgePop {
|
| 1294 |
+
from { transform: scale(0.6); opacity: 0; }
|
| 1295 |
+
to { transform: scale(1); opacity: 1; }
|
| 1296 |
}
|
| 1297 |
</style>
|
| 1298 |
+
""", unsafe_allow_html=True)
|
| 1299 |
+
|
| 1300 |
+
# ββ μ΅μν λ°°μ§ ββββββββββββββββββββββββββββββββββββββββββ
|
| 1301 |
+
if minimized:
|
| 1302 |
+
st.markdown(f"""
|
| 1303 |
+
<div class="alert-float-wrap" style="animation: alertBadgePop 0.35s cubic-bezier(0.34,1.56,0.64,1);">
|
| 1304 |
+
<div class="alert-badge" style="border: 1px solid {badge_col};">
|
| 1305 |
+
<span style="font-size:19px; position:relative; line-height:1;">π
|
| 1306 |
+
<span style="position:absolute; top:-6px; right:-9px;
|
| 1307 |
+
background:{badge_col}; color:#fff; border-radius:10px;
|
| 1308 |
+
font-size:9px; font-weight:700; min-width:17px; height:17px;
|
| 1309 |
+
display:flex; align-items:center; justify-content:center; padding:0 3px;
|
| 1310 |
+
font-family:'JetBrains Mono',monospace;">{total_cnt}</span>
|
| 1311 |
</span>
|
| 1312 |
+
<span style="font-size:12px; font-weight:700; color:#e8eaf0; font-family:'JetBrains Mono',monospace;">μλ {total_cnt}κ°</span>
|
| 1313 |
+
<span style="width:6px; height:6px; border-radius:50%; background:{badge_col};
|
| 1314 |
+
animation:alertPulse 1.5s infinite; display:inline-block;"></span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1315 |
</div>
|
|
|
|
| 1316 |
</div>
|
| 1317 |
+
""", unsafe_allow_html=True)
|
| 1318 |
|
| 1319 |
+
# λ°°μ§ ν΄λ¦ β μ΄κΈ° λ²νΌ (μ¨κΉ μ²λ¦¬, λ°°μ§ μμ ν¬λͺ
μ€λ²λ μ΄)
|
| 1320 |
+
st.markdown("""
|
| 1321 |
+
<style>
|
| 1322 |
+
.alert-open-btn > div.stButton > button {
|
| 1323 |
+
position: fixed !important;
|
| 1324 |
+
bottom: 76px !important;
|
| 1325 |
+
right: 16px !important;
|
| 1326 |
+
width: 180px !important;
|
| 1327 |
+
height: 44px !important;
|
| 1328 |
+
opacity: 0 !important;
|
| 1329 |
+
cursor: pointer !important;
|
| 1330 |
+
z-index: 999999 !important;
|
| 1331 |
+
background: transparent !important;
|
| 1332 |
+
border: none !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1333 |
}
|
| 1334 |
+
</style>
|
| 1335 |
+
<div class="alert-open-btn">
|
| 1336 |
+
""", unsafe_allow_html=True)
|
| 1337 |
+
if st.button("μλμ΄κΈ°", key="alert_open_btn"):
|
| 1338 |
+
st.session_state.alert_panel_minimized = False
|
| 1339 |
+
st.session_state.alert_panel_start_time = time.time()
|
| 1340 |
+
st.rerun()
|
| 1341 |
+
st.markdown("</div>", unsafe_allow_html=True)
|
| 1342 |
+
return
|
| 1343 |
|
| 1344 |
+
# ββ ν ν¨λ ββββββββββββββββββββββββββββββββββββββββββββββ
|
| 1345 |
+
# ν HTML μμ±
|
| 1346 |
+
tabs_html = ""
|
| 1347 |
+
for tab_name, tcfg in TAB_CFG.items():
|
| 1348 |
+
cnt = len(groups[tab_name])
|
| 1349 |
+
is_a = (tab_name == active_tab)
|
| 1350 |
+
bg = tcfg["bg"] if is_a else "transparent"
|
| 1351 |
+
brd = tcfg["border"] if is_a else "rgba(255,255,255,0.06)"
|
| 1352 |
+
bb = f"2px solid {tcfg['accent']}" if is_a else "1px solid transparent"
|
| 1353 |
+
op = "1" if is_a else "0.5"
|
| 1354 |
+
lc = tcfg["accent"] if is_a else "rgba(255,255,255,0.4)"
|
| 1355 |
+
badge_bg = tcfg["accent"] if cnt > 0 else "rgba(255,255,255,0.15)"
|
| 1356 |
+
tabs_html += f"""
|
| 1357 |
+
<div class="alert-tab-item" style="background:{bg}; border-color:{brd}; border-bottom:{bb}; opacity:{op};">
|
| 1358 |
+
<span style="font-size:13px;">{tcfg['icon']}</span>
|
| 1359 |
+
<span style="font-size:9px; font-weight:700; color:{lc};">{tab_name}</span>
|
| 1360 |
+
<span style="background:{badge_bg}; color:#fff; border-radius:8px;
|
| 1361 |
+
min-width:15px; height:15px; display:flex; align-items:center; justify-content:center;
|
| 1362 |
+
font-size:9px; font-weight:700; padding:0 3px;">{cnt}</span>
|
| 1363 |
+
</div>"""
|
| 1364 |
+
|
| 1365 |
+
# μμ΄ν
HTML μμ±
|
| 1366 |
+
items_html = ""
|
| 1367 |
+
for item in groups[active_tab]:
|
| 1368 |
+
pct = item["change_pct"]
|
| 1369 |
+
pct_str = ("β² " if pct >= 0 else "βΌ ") + str(round(abs(pct), 1)) + "%"
|
| 1370 |
+
nm = (item["name"][:13] + "..") if len(item["name"]) > 13 else item["name"]
|
| 1371 |
+
price_s = format(item["current_price"], ",") + "μ"
|
| 1372 |
+
items_html += f"""
|
| 1373 |
+
<div class="alert-row">
|
| 1374 |
+
<div class="alert-ticker-sq" style="background:{tc['bg']}; border:1px solid {tc['border']}; color:{tc['accent']};">
|
| 1375 |
+
{item['ticker'][:4]}
|
| 1376 |
+
</div>
|
| 1377 |
+
<div style="flex:1; min-width:0;">
|
| 1378 |
+
<div style="font-size:12px; font-weight:700; color:#e8eaf0; margin-bottom:1px;">
|
| 1379 |
+
{item['ticker']} <span style="font-size:10px; color:rgba(255,255,255,0.35); font-weight:400;">{nm}</span>
|
| 1380 |
+
</div>
|
| 1381 |
+
<div style="font-size:11px; color:rgba(255,255,255,0.4);">{price_s}</div>
|
| 1382 |
+
</div>
|
| 1383 |
+
<div style="text-align:right; flex-shrink:0;">
|
| 1384 |
+
<div style="font-size:12px; font-weight:700; color:{tc['accent']}; font-family:'JetBrains Mono',monospace;">{pct_str}</div>
|
| 1385 |
+
<div style="font-size:10px; color:rgba(255,255,255,0.25); margin-top:1px;">β λΆμ</div>
|
| 1386 |
+
</div>
|
| 1387 |
+
</div>"""
|
| 1388 |
|
| 1389 |
+
if not items_html:
|
| 1390 |
+
items_html = '<div style="text-align:center; padding:22px; color:rgba(255,255,255,0.2); font-size:13px;">μλ μμ</div>'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1391 |
|
| 1392 |
+
# ν¨λ μ 체 HTML
|
| 1393 |
+
st.markdown(f"""
|
| 1394 |
+
<div class="alert-float-wrap" style="animation: alertSlideUp 0.4s cubic-bezier(0.34,1.56,0.64,1);">
|
| 1395 |
+
|
| 1396 |
+
<!-- ν€λ -->
|
| 1397 |
+
<div class="alert-panel-hdr">
|
| 1398 |
+
<div class="alert-hdr-row">
|
| 1399 |
+
<div style="display:flex; align-items:center; gap:7px;">
|
| 1400 |
+
<span style="width:7px; height:7px; border-radius:50%; background:#FF6B35;
|
| 1401 |
+
box-shadow:0 0 7px rgba(255,107,53,0.8); animation:alertPulse 1.5s infinite; display:inline-block;"></span>
|
| 1402 |
+
<span style="font-size:12px; font-weight:700; color:#e8eaf0; letter-spacing:.08em; font-family:'JetBrains Mono',monospace;">LIVE ALERTS</span>
|
| 1403 |
+
<span style="background:rgba(229,62,62,0.15); border:1px solid rgba(229,62,62,0.3);
|
| 1404 |
+
border-radius:5px; padding:1px 7px; font-size:10px; color:#E53E3E; font-weight:700;">{total_cnt}</span>
|
| 1405 |
+
</div>
|
| 1406 |
+
<span style="font-size:11px; color:rgba(255,255,255,0.3); font-family:'JetBrains Mono',monospace;">νμ λλ¬ μ ν</span>
|
| 1407 |
+
</div>
|
| 1408 |
+
<!-- ν -->
|
| 1409 |
+
<div class="alert-tabs">{tabs_html}</div>
|
| 1410 |
+
</div>
|
| 1411 |
|
| 1412 |
+
<!-- λ°λ -->
|
| 1413 |
+
<div class="alert-panel-body" style="border-top: 2px solid {tc['accent']};">
|
| 1414 |
+
{items_html}
|
| 1415 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1416 |
|
| 1417 |
+
</div>
|
| 1418 |
+
""", unsafe_allow_html=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1419 |
|
| 1420 |
+
# ββ Streamlit λ²νΌλ€ (ν¬λͺ
μ€λ²λ μ΄λ‘ ν/μ’
λͺ©/μ΅μν μ²λ¦¬) ββ
|
| 1421 |
|
| 1422 |
+
# μ΅μν λ²νΌ
|
| 1423 |
+
st.markdown("""
|
| 1424 |
+
<style>
|
| 1425 |
+
.alert-min-btn > div.stButton > button {
|
| 1426 |
+
position: fixed !important;
|
| 1427 |
+
bottom: 76px !important;
|
| 1428 |
+
right: 16px !important;
|
| 1429 |
+
width: 360px !important;
|
| 1430 |
+
height: 44px !important;
|
| 1431 |
+
opacity: 0 !important;
|
| 1432 |
+
cursor: pointer !important;
|
| 1433 |
+
z-index: 999999 !important;
|
| 1434 |
+
background: transparent !important;
|
| 1435 |
+
border: none !important;
|
| 1436 |
}
|
| 1437 |
+
</style>
|
| 1438 |
+
<div class="alert-min-btn">
|
| 1439 |
+
""", unsafe_allow_html=True)
|
| 1440 |
+
if st.button("ν¨λμ΅μν", key="alert_min_btn"):
|
| 1441 |
+
st.session_state.alert_panel_minimized = True
|
| 1442 |
+
st.rerun()
|
| 1443 |
+
st.markdown("</div>", unsafe_allow_html=True)
|
| 1444 |
+
|
| 1445 |
+
# ν μ ν λ²νΌλ€
|
| 1446 |
+
tab_list = list(TAB_CFG.keys())
|
| 1447 |
+
tab_w = 360 // len(tab_list)
|
| 1448 |
+
for i, tab_name in enumerate(tab_list):
|
| 1449 |
+
left_px = 16 + i * tab_w
|
| 1450 |
+
btn_key = f"alert_tab_{tab_name}"
|
| 1451 |
+
st.markdown(f"""
|
| 1452 |
+
<style>
|
| 1453 |
+
.alert-tab-btn-{i} > div.stButton > button {{
|
| 1454 |
+
position: fixed !important;
|
| 1455 |
+
bottom: 138px !important;
|
| 1456 |
+
left: {left_px}px !important;
|
| 1457 |
+
width: {tab_w}px !important;
|
| 1458 |
+
height: 52px !important;
|
| 1459 |
+
opacity: 0 !important;
|
| 1460 |
+
cursor: pointer !important;
|
| 1461 |
+
z-index: 999999 !important;
|
| 1462 |
+
background: transparent !important;
|
| 1463 |
+
border: none !important;
|
| 1464 |
+
}}
|
| 1465 |
+
</style>
|
| 1466 |
+
<div class="alert-tab-btn-{i}">
|
| 1467 |
+
""", unsafe_allow_html=True)
|
| 1468 |
+
if st.button(tab_name, key=btn_key):
|
| 1469 |
+
st.session_state.alert_active_tab = tab_name
|
| 1470 |
+
st.rerun()
|
| 1471 |
+
st.markdown("</div>", unsafe_allow_html=True)
|
| 1472 |
+
|
| 1473 |
+
# μ’
λͺ© ν΄λ¦ λ²νΌλ€
|
| 1474 |
+
for j, item in enumerate(groups[active_tab]):
|
| 1475 |
+
tk = item["ticker"]
|
| 1476 |
+
row_top = 76 + 44 + 52 + j * 52 # λλ΅μ μΈ κ° μμ΄ν
μμΉ
|
| 1477 |
+
btn_key = f"alert_item_{active_tab}_{tk}_{j}"
|
| 1478 |
+
st.markdown(f"""
|
| 1479 |
+
<style>
|
| 1480 |
+
.alert-item-btn-{j} > div.stButton > button {{
|
| 1481 |
+
position: fixed !important;
|
| 1482 |
+
bottom: {76 + (len(groups[active_tab]) - 1 - j) * 52}px !important;
|
| 1483 |
+
right: 16px !important;
|
| 1484 |
+
width: 360px !important;
|
| 1485 |
+
height: 50px !important;
|
| 1486 |
+
opacity: 0 !important;
|
| 1487 |
+
cursor: pointer !important;
|
| 1488 |
+
z-index: 999999 !important;
|
| 1489 |
+
background: transparent !important;
|
| 1490 |
+
border: none !important;
|
| 1491 |
+
}}
|
| 1492 |
+
</style>
|
| 1493 |
+
<div class="alert-item-btn-{j}">
|
| 1494 |
+
""", unsafe_allow_html=True)
|
| 1495 |
+
if st.button(tk, key=btn_key):
|
| 1496 |
+
_navigate_to_ticker(tk)
|
| 1497 |
+
st.rerun()
|
| 1498 |
+
st.markdown("</div>", unsafe_allow_html=True)
|
| 1499 |
|
| 1500 |
|
| 1501 |
# ============================================================
|
|
|
|
| 2079 |
with nc[1]: st.button("*β*\nν", key="nav_home", on_click=go_home, use_container_width=True)
|
| 2080 |
with nc[2]: st.button("*β
*\nκ΄μ¬", key="nav_fav", on_click=lambda: select_menu("β
κ΄μ¬ μ’
λͺ©"), use_container_width=True)
|
| 2081 |
with nc[3]: st.button("*βΉ*\nλ€λ‘", key="nav_back", on_click=go_back, use_container_width=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|