Spaces:
Sleeping

Top-Gun-Sport / app.py
BoonPing's picture
Update app.py
866ffe6 verified
Raw History Blame Contribute Delete
2.83 kB
import streamlit as st
import pandas as pd
# Page setup
st.set_page_config(page_title="Top Gun Sport", layout="wide")
# ---- HEADER ----
st.markdown(
"""
<style>
.main-title {
font-size: 2.5rem;
font-weight: 800;
text-align: center;
color: #1E88E5;
}
.sub-title {
text-align: center;
font-size: 1.2rem;
color: #555;
margin-bottom: 30px;
}
.card {
background: white;
border-radius: 12px;
padding: 20px;
box-shadow: 0px 4px 8px rgba(0,0,0,0.1);
}
</style>
<div class="main-title">πŸ† Top Gun Sport</div>
<div class="sub-title">Malaysia's Premier Snooker & Billiard Platform</div>
""",
unsafe_allow_html=True
)
# ---- TOURNAMENT HIGHLIGHT ----
st.header("πŸ”₯ Upcoming Tournament")
col1, col2 = st.columns([2,1])
with col1:
st.image("https://upload.wikimedia.org/wikipedia/commons/1/1e/Snooker_Table.jpg", use_container_width=True)
with col2:
st.markdown(
"""
### King of Kings Showdown
πŸ“… Date: 31 August 2025
πŸ“ Venue: SR Cue Sports Academy, Kuala Lumpur
🎟️ Title Sponsor: Light Green
Get ready for Malaysia's **biggest snooker event of the year!**
"""
)
st.button("πŸ‘‰ Register Now")
# ---- RANKINGS ----
st.header("πŸ“Š Player Rankings")
data = {
"Rank": [1,2,3,4,5],
"Player": ["John Tan", "Ali Rahman", "David Lee", "Marcus Ong", "Kelvin Chan"],
"Points": [1200, 1150, 1080, 970, 940]
}
df = pd.DataFrame(data)
st.dataframe(df, use_container_width=True)
# ---- NEWS SECTION ----
st.header("πŸ“° Latest News")
news_col1, news_col2, news_col3 = st.columns(3)
with news_col1:
st.markdown('<div class="card">', unsafe_allow_html=True)
st.image("https://picsum.photos/300/200?random=1")
st.subheader("Junior Cue Masters Launched")
st.caption("The new youth tournament is open for U16, U18 & U21 categories.")
st.markdown('</div>', unsafe_allow_html=True)
with news_col2:
st.markdown('<div class="card">', unsafe_allow_html=True)
st.image("https://picsum.photos/300/200?random=2")
st.subheader("Cleo Masters Announced")
st.caption("Malaysia's first-ever women’s snooker championship goes live.")
st.markdown('</div>', unsafe_allow_html=True)
with news_col3:
st.markdown('<div class="card">', unsafe_allow_html=True)
st.image("https://picsum.photos/300/200?random=3")
st.subheader("AI Auto-Scoring by Supervisions")
st.caption("Clubs upgrade with the latest snooker scoring tech.")
st.markdown('</div>', unsafe_allow_html=True)
# ---- FOOTER ----
st.markdown("---")
st.caption("Β© 2025 Top Gun Sport. Powered by Hugging Face Spaces.")