| """λ‘λ© μ€μΌλ ν€ (κ°λ° κ°μ΄λ 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>' | |