Spaces:
Sleeping
Sleeping
Update src/app.py
Browse files- src/app.py +10 -6
src/app.py
CHANGED
|
@@ -6,31 +6,31 @@ st.markdown("<h1 style='text-align: center; color: #6A1B9A;'>πΈ BharatPlay</h1
|
|
| 6 |
st.markdown("<h3 style='text-align: center;'>Explore Indian Games by Category</h3>", unsafe_allow_html=True)
|
| 7 |
st.markdown("---")
|
| 8 |
|
| 9 |
-
# Define categories
|
| 10 |
categories = [
|
| 11 |
{
|
| 12 |
"name": "Indoor",
|
| 13 |
"description": "Games played indoors with minimal space and equipment.",
|
| 14 |
"icon": "π²",
|
| 15 |
-
"
|
| 16 |
},
|
| 17 |
{
|
| 18 |
"name": "Outdoor",
|
| 19 |
"description": "Games played in open areas, often requiring physical activity.",
|
| 20 |
"icon": "π",
|
| 21 |
-
"
|
| 22 |
},
|
| 23 |
{
|
| 24 |
"name": "Traditional",
|
| 25 |
"description": "Culturally rooted games passed down generations.",
|
| 26 |
"icon": "πͺ",
|
| 27 |
-
"
|
| 28 |
},
|
| 29 |
{
|
| 30 |
"name": "Martial Arts",
|
| 31 |
"description": "Ancient combat-based physical disciplines and sports.",
|
| 32 |
"icon": "π₯",
|
| 33 |
-
"
|
| 34 |
}
|
| 35 |
]
|
| 36 |
|
|
@@ -44,8 +44,12 @@ for i, cat in enumerate(categories):
|
|
| 44 |
<div style='background-color: #f3e5f5; padding: 20px; border-radius: 15px; margin: 10px; box-shadow: 0 0 10px #ccc;'>
|
| 45 |
<h2 style='color: #4A148C;'>{cat['icon']} {cat['name']}</h2>
|
| 46 |
<p>{cat['description']}</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
</div>
|
| 48 |
""",
|
| 49 |
unsafe_allow_html=True
|
| 50 |
)
|
| 51 |
-
st.page_link(f"{cat['file']}", label=f"Explore {cat['name']}", icon=cat["icon"])
|
|
|
|
| 6 |
st.markdown("<h3 style='text-align: center;'>Explore Indian Games by Category</h3>", unsafe_allow_html=True)
|
| 7 |
st.markdown("---")
|
| 8 |
|
| 9 |
+
# Define categories
|
| 10 |
categories = [
|
| 11 |
{
|
| 12 |
"name": "Indoor",
|
| 13 |
"description": "Games played indoors with minimal space and equipment.",
|
| 14 |
"icon": "π²",
|
| 15 |
+
"page": "Indoor"
|
| 16 |
},
|
| 17 |
{
|
| 18 |
"name": "Outdoor",
|
| 19 |
"description": "Games played in open areas, often requiring physical activity.",
|
| 20 |
"icon": "π",
|
| 21 |
+
"page": "Outdoor"
|
| 22 |
},
|
| 23 |
{
|
| 24 |
"name": "Traditional",
|
| 25 |
"description": "Culturally rooted games passed down generations.",
|
| 26 |
"icon": "πͺ",
|
| 27 |
+
"page": "Traditional"
|
| 28 |
},
|
| 29 |
{
|
| 30 |
"name": "Martial Arts",
|
| 31 |
"description": "Ancient combat-based physical disciplines and sports.",
|
| 32 |
"icon": "π₯",
|
| 33 |
+
"page": "Martial_Arts"
|
| 34 |
}
|
| 35 |
]
|
| 36 |
|
|
|
|
| 44 |
<div style='background-color: #f3e5f5; padding: 20px; border-radius: 15px; margin: 10px; box-shadow: 0 0 10px #ccc;'>
|
| 45 |
<h2 style='color: #4A148C;'>{cat['icon']} {cat['name']}</h2>
|
| 46 |
<p>{cat['description']}</p>
|
| 47 |
+
<a href='/{cat["page"]}' target='_self'>
|
| 48 |
+
<button style='background-color: #8e24aa; color: white; padding: 8px 16px; border-radius: 8px; border: none;'>
|
| 49 |
+
Explore
|
| 50 |
+
</button>
|
| 51 |
+
</a>
|
| 52 |
</div>
|
| 53 |
""",
|
| 54 |
unsafe_allow_html=True
|
| 55 |
)
|
|
|