jayanth-2005 commited on
Commit
0eed289
Β·
verified Β·
1 Parent(s): 84f32a7

Update src/app.py

Browse files
Files changed (1) hide show
  1. 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 with file names (relative to project root)
10
  categories = [
11
  {
12
  "name": "Indoor",
13
  "description": "Games played indoors with minimal space and equipment.",
14
  "icon": "🎲",
15
- "file": "1_Indoor.py"
16
  },
17
  {
18
  "name": "Outdoor",
19
  "description": "Games played in open areas, often requiring physical activity.",
20
  "icon": "🏏",
21
- "file": "2_Outdoor.py"
22
  },
23
  {
24
  "name": "Traditional",
25
  "description": "Culturally rooted games passed down generations.",
26
  "icon": "πŸͺ€",
27
- "file": "3_Traditional.py"
28
  },
29
  {
30
  "name": "Martial Arts",
31
  "description": "Ancient combat-based physical disciplines and sports.",
32
  "icon": "πŸ₯‹",
33
- "file": "4_Martial_Arts.py"
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
  )