Spaces:
Configuration error
Configuration error
File size: 2,510 Bytes
e46d575 c12625f e46d575 c12625f e46d575 c12625f e46d575 c12625f e46d575 c12625f e46d575 c12625f e46d575 c12625f e46d575 | 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 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | import streamlit as st
import sys, os
sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))
st.set_page_config(
page_title="MathMind AI",
page_icon="๐งฎ",
layout="centered",
initial_sidebar_state="auto",
)
from streamlit_app.utils.auth import is_logged_in
from streamlit_app.utils.ui import apply_theme
apply_theme()
# โโ Landing page โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
st.markdown("""
<style>
.hero { text-align: left; padding: 0.2rem 0.1rem 0.6rem; }
.hero h1 { font-size: 2.4rem; margin-bottom: 0.3rem; }
.hero p { font-size: 1rem; color: #475569; margin-bottom: 0.7rem; }
</style>
<div class="mm-hero hero">
<h1>๐งฎ MathMind AI</h1>
<p>Your personal AI math tutor for Grades 6 โ 12</p>
</div>
""", unsafe_allow_html=True)
st.markdown('<div class="mm-section-title">What you get</div>', unsafe_allow_html=True)
col1, col2, col3 = st.columns(3)
with col1:
st.markdown(
"""
<div class="mm-card">
<div class="mm-feature-title">๐ง Adaptive Explanations</div>
<div class="mm-feature-text">Grade-calibrated, step-by-step answers to any math question.</div>
</div>
""",
unsafe_allow_html=True,
)
with col2:
st.markdown(
"""
<div class="mm-card">
<div class="mm-feature-title">๐ Mini-Tests</div>
<div class="mm-feature-text">Prove your understanding with 5 questions and instant feedback.</div>
</div>
""",
unsafe_allow_html=True,
)
with col3:
st.markdown(
"""
<div class="mm-card">
<div class="mm-feature-title">๐ Badges & Streaks</div>
<div class="mm-feature-text">Earn rewards and track your daily learning consistency.</div>
</div>
""",
unsafe_allow_html=True,
)
st.divider()
if is_logged_in():
st.success(f"Welcome back! You're logged in as **{st.session_state.get('user_email', '')}**")
col_a, col_b = st.columns(2)
with col_a:
st.page_link("pages/2_Tutor.py", label="โถ๏ธ Start Learning", use_container_width=True)
with col_b:
st.page_link("pages/3_Dashboard.py", label="๐ My Dashboard", use_container_width=True)
else:
st.page_link("pages/1_Login.py", label="๐ Get Started โ Login or Sign Up", use_container_width=True)
|