feat: render_show dispatcher + 큰 화면 CSS, default '/' 변경

- SHOW_CSS 상수 추가 (show-stage-*, show-team-*, show-cat-*, show-vote-* 클래스)
- render_show() dispatcher + 3개 skeleton stage 함수 추가 (T9-T11에서 본구현)
- main() default → render_show(), ?mode=vote → render_voter() 명시 라우팅

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
th-kim0823
2026-04-27 20:00:34 +09:00
parent a353f2f337
commit 54fa724420

75
app.py
View File

@@ -30,6 +30,45 @@ CATEGORIES = [
]
PRIZE_PRIORITY = ["utility_team", "polish_team", "fun_team"]
SHOW_CSS = """
<style>
.show-stage-title { font-size: 64px; text-align: center; padding: 16px 0; font-weight: 800; }
.show-stage-sub { font-size: 24px; text-align: center; color: #888; padding-bottom: 24px; }
.show-team-card {
font-size: 24px;
padding: 18px 14px;
border-radius: 14px;
background: #1a1a2a;
border: 1px solid #333;
min-height: 220px;
}
.show-team-name { font-size: 32px; font-weight: 700; text-align: center; margin-bottom: 12px; color: #ffb84d; }
.show-team-member { font-size: 22px; line-height: 1.6; text-align: center; }
.show-info-box {
font-size: 26px;
padding: 22px;
border-radius: 12px;
background: #1f1f2f;
margin-top: 24px;
}
.show-cat-card {
border-radius: 14px;
padding: 18px;
min-height: 480px;
}
.show-cat-T1 { background: linear-gradient(135deg, #ffb84d, #ff8c00); color: #222; }
.show-cat-T2 { background: linear-gradient(135deg, #4dffd2, #2a8e7e); color: #1a1a1a; }
.show-cat-T3 { background: linear-gradient(135deg, #ff4d6d, #b83a55); color: white; }
.show-cat-T4 { background: linear-gradient(135deg, #a64dff, #6a2eaf); color: white; }
.show-cat-title { font-size: 32px; font-weight: 800; margin-bottom: 4px; }
.show-cat-tagline { font-size: 16px; font-style: italic; margin-bottom: 4px; }
.show-cat-tone { font-size: 14px; opacity: 0.85; margin-bottom: 12px; }
.show-cat-item { font-size: 17px; line-height: 1.45; padding: 4px 0; }
.show-vote-counter { font-size: 96px; text-align: center; font-weight: 900; padding: 16px 0; }
.show-vote-caption { font-size: 36px; text-align: center; color: #ccc; padding: 12px 0; }
</style>
"""
_lock = threading.RLock()
@@ -324,6 +363,34 @@ def archive_results():
# --- UI ---
def render_show():
data = load_data()
st.markdown(SHOW_CSS, unsafe_allow_html=True)
stage = data.get("settings", {}).get("current_stage", "intro")
if stage == "topics":
render_stage_topics(data)
elif stage == "vote":
render_stage_vote(data)
else:
render_stage_intro(data)
def render_stage_intro(data):
st.markdown('<div class="show-stage-title">🚀 해커톤</div>', unsafe_allow_html=True)
st.markdown('<div class="show-stage-sub">팀 편성</div>', unsafe_allow_html=True)
st.info("Task 9에서 구현")
def render_stage_topics(data):
st.markdown('<div class="show-stage-title">💡 예시 주제</div>', unsafe_allow_html=True)
st.info("Task 10에서 구현")
def render_stage_vote(data):
st.markdown('<div class="show-stage-title">🗳 투표 시작</div>', unsafe_allow_html=True)
st.info("Task 11에서 구현")
def render_voter():
if not can_accept_votes(load_data()):
st.title("🗳 해커톤 투표")
@@ -817,16 +884,18 @@ def render_raw():
def main():
st.set_page_config(page_title="해커톤 투표", page_icon="🗳", layout="wide")
mode = st.query_params.get("mode", "vote")
st.set_page_config(page_title="해커톤", page_icon="🚀", layout="wide")
mode = st.query_params.get("mode", "show")
if mode == "admin":
render_admin()
elif mode == "ceremony":
render_ceremony()
elif mode == "raw":
render_raw()
else:
elif mode == "vote":
render_voter()
else:
render_show()
if __name__ == "__main__":