fabagent / components /skeleton.py
hee_!J
feat: Streamlit λŒ€μ‹œλ³΄λ“œ UI κ΅¬ν˜„
61f3789
Raw
History Blame Contribute Delete
1.03 kB
"""λ‘œλ”© μŠ€μΌˆλ ˆν†€ (개발 κ°€μ΄λ“œ 12μž₯)
tier_num별 μŠ€μΌˆλ ˆν†€ λ ˆμ΄μ•„μ›ƒμ„ HTML λ¬Έμžμ—΄λ‘œ λ°˜ν™˜
tiers.pyκ°€ tier-body μ•ˆμ— κ·ΈλŒ€λ‘œ μ‚½μž…
"""
def skeleton_html(tier_num: int) -> str:
if tier_num in (1, 3):
return """
<div class="t1-grid">
<div class="skel skel-block" style="height: 148px;"></div>
<div class="skel-row">
<div class="skel" style="height: 18px; width: 40%;"></div>
<div class="skel" style="height: 24px;"></div>
<div class="skel" style="height: 24px; width: 85%;"></div>
<div class="skel" style="height: 24px; width: 60%;"></div>
</div>
</div>
"""
rows = 3 if tier_num == 2 else 4
h = 88 if tier_num == 2 else 48
blocks = "".join(
f'<div class="skel" style="height: {h}px; border-radius: 8px; opacity: {1 - i*0.18:.2f};"></div>'
for i in range(rows)
)
return f'<div class="skel-row">{blocks}</div>'