cryogenic22's picture
Create src/utils/ui.py
202aca8 verified
import streamlit as st
def set_page_config():
"""Configure Streamlit page settings"""
st.set_page_config(
page_title="EduAI Platform",
page_icon="🎓",
layout="wide",
initial_sidebar_state="expanded"
)
def apply_custom_css():
"""Apply custom CSS styling"""
st.markdown("""
<style>
/* Main app container */
.stApp {
max-width: 1200px;
margin: 0 auto;
}
/* Sidebar styling */
.css-1d391kg {
background-color: white;
padding: 2rem 1rem;
}
/* Chat container */
.chat-container {
background-color: white;
border-radius: 10px;
padding: 20px;
margin: 10px 0;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
/* Message styling */
.user-message {
background-color: #007bff;
color: white;
padding: 10px 15px;
border-radius: 15px;
margin: 5px 0;
max-width: 80%;
margin-left: auto;
}
.assistant-message {
background-color: #f1f3f5;
color: #1a1a1a;
padding: 10px 15px;
border-radius: 15px;
margin: 5px 0;
max-width: 80%;
}
/* Button styling */
.stButton button {
width: 100%;
border-radius: 0.25rem;
transition: all 0.2s ease;
}
.stButton button:hover {
transform: translateY(-1px);
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
/* Progress bars */
.stProgress > div > div {
background-color: #007bff;
}
</style>
""", unsafe_allow_html=True)