feat: stage topics — 2×2 카테고리 그리드 + 10주제 list + 색상
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
27
app.py
27
app.py
@@ -417,7 +417,32 @@ def render_stage_intro(data):
|
||||
|
||||
def render_stage_topics(data):
|
||||
st.markdown('<div class="show-stage-title">💡 예시 주제</div>', unsafe_allow_html=True)
|
||||
st.info("Task 10에서 구현")
|
||||
st.markdown('<div class="show-stage-sub">영감 얻으세요 — 똑같이 안 만들어도 됩니다</div>', unsafe_allow_html=True)
|
||||
|
||||
cats = data.get("topics", {}).get("categories", [])
|
||||
if not cats:
|
||||
st.warning("주제가 비어 있습니다. 어드민에서 입력하세요.")
|
||||
return
|
||||
|
||||
# 2×2 그리드
|
||||
rows = [cats[i:i + 2] for i in range(0, len(cats), 2)]
|
||||
for row in rows:
|
||||
cols = st.columns(2)
|
||||
for col, cat in zip(cols, row):
|
||||
cat_id = cat.get("id", "T?")
|
||||
items_html = "".join(
|
||||
f'<div class="show-cat-item">▸ {item}</div>' for item in cat.get("items", [])
|
||||
)
|
||||
with col:
|
||||
st.markdown(
|
||||
f'<div class="show-cat-card show-cat-{cat_id}">'
|
||||
f' <div class="show-cat-title">{cat_id}. {cat.get("title", "")}</div>'
|
||||
f' <div class="show-cat-tagline">{cat.get("tagline", "")}</div>'
|
||||
f' <div class="show-cat-tone">톤: {cat.get("tone", "")}</div>'
|
||||
f' {items_html}'
|
||||
f'</div>',
|
||||
unsafe_allow_html=True,
|
||||
)
|
||||
|
||||
|
||||
def render_stage_vote(data):
|
||||
|
||||
Reference in New Issue
Block a user