File size: 1,649 Bytes
78b86a9
 
dfe5163
78b86a9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a7c26a1
 
dfe5163
78b86a9
 
 
 
 
 
 
 
 
 
 
 
 
 
b8867b5
78b86a9
b8867b5
 
78b86a9
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import streamlit as st
import os
from modules import intro, module1, module2, module3,module4, assignments, resources
from config import CUSTOM_CSS

# Set page configuration
st.set_page_config(
    page_title="Course Website",
    page_icon="📚",
    layout="wide"
)

# Apply custom CSS
st.markdown(CUSTOM_CSS, unsafe_allow_html=True)

# Initialize session state for navigation if it doesn't exist
if 'current_page' not in st.session_state:
    st.session_state.current_page = 'intro'

# Define course sections with their corresponding module functions
course_sections = {
    "Introduction": (intro.show, "intro"),
    "Module 1: Getting Started": (module1.show, "module1"),
    "Module 2: Learning from Examples": (module2.show, "module2"),
    "Module 3: Machine Learning Demo": (module3.show, "module3"),
    "Module 4: Custom Learning Path": (module4.show, "module4"),
    "Assignments": (assignments.show, "assignments"),
    "Resources": (resources.show, "resources")
}

# Create navigation buttons in sidebar
for section_name, (_, section_id) in course_sections.items():
    if st.sidebar.button(section_name, key=section_id):
        st.session_state.current_page = section_id

# Display content based on current page
current_module = next((module for module, section_id in course_sections.values() 
                      if section_id == st.session_state.current_page), intro.show)
current_module()

# Footer
st.markdown("""
<div class="footer">
    <div class="footer-content">
        <div class="footer-text">
            <p>© 2025 Cura Learning All rights reserved.</p>
        </div>
    </div>
</div>
""", unsafe_allow_html=True)