| import streamlit as st |
| from utils import ( |
| APP_ICON_PATH, |
| inject_theme, |
| render_page_header, |
| render_sidebar, |
| ) |
|
|
| st.set_page_config(page_title="Plexi | Home", page_icon=APP_ICON_PATH, layout="wide") |
| inject_theme() |
|
|
| render_page_header( |
| "AI study companion", |
| "Study with real materials, not generic answers", |
| ( |
| "Plexi keeps revision simple: browse the right files, preview them quickly, " |
| "and ask focused questions without losing the subject context." |
| ), |
| badges=[ |
| "Inline file previews", |
| "Subject-scoped retrieval", |
| "Bring your own model", |
| ], |
| ) |
|
|
| intro_col, action_col = st.columns(2, gap="large") |
|
|
| with intro_col: |
| st.markdown( |
| """ |
| <section class="plexi-panel" style="min-height: 122px;"> |
| <div class="plexi-sidecard-title">Built for focused revision</div> |
| <div class="plexi-muted"> |
| Move from finding the right material to understanding it in one clean flow. |
| </div> |
| </section> |
| """, |
| unsafe_allow_html=True, |
| ) |
|
|
| with action_col: |
| st.markdown( |
| """ |
| <section class="plexi-callout" style="min-height: 122px;"> |
| <div class="plexi-sidecard-title">Choose your starting point</div> |
| <div class="plexi-muted"> |
| Open the hub to explore files, or jump straight into the assistant if you already |
| know what you want to study. |
| </div> |
| </section> |
| """, |
| unsafe_allow_html=True, |
| ) |
|
|
| st.markdown( |
| """ |
| <div class="plexi-cta-grid"> |
| <a class="plexi-cta-button" href="/Study_Material_Hub" target="_self">Open Material Hub</a> |
| <a class="plexi-cta-button" href="/Plexi-Assistant" target="_self">Open Assistant</a> |
| </div> |
| """, |
| unsafe_allow_html=True, |
| ) |
|
|
| st.markdown( |
| '<div class="plexi-section-label">How It Works</div>', |
| unsafe_allow_html=True, |
| ) |
| step_cols = st.columns(3, gap="medium") |
| step_cards = [ |
| ( |
| "01", |
| "Choose your subject", |
| "Pick a semester and subject so the experience stays focused on one course.", |
| ), |
| ( |
| "02", |
| "Browse the material", |
| "Open notes, Word docs, and slides in the hub and preview them without leaving the app.", |
| ), |
| ( |
| "03", |
| "Study with Plexi", |
| "Ask for summaries, revision help, or simple explanations from the loaded subject.", |
| ), |
| ] |
| for column, (step, title, body) in zip(step_cols, step_cards): |
| with column: |
| st.markdown( |
| f""" |
| <section class="plexi-stat"> |
| <div class="plexi-stat-label">{step}</div> |
| <div class="plexi-sidecard-title">{title}</div> |
| <div class="plexi-muted">{body}</div> |
| </section> |
| """, |
| unsafe_allow_html=True, |
| ) |
|
|
| st.markdown( |
| '<div class="plexi-section-label">Contribute</div>', |
| unsafe_allow_html=True, |
| ) |
| contribute_cols = st.columns([1.25, 0.75], gap="large") |
|
|
| with contribute_cols[0]: |
| st.markdown( |
| """ |
| <section class="plexi-callout"> |
| <div class="plexi-sidecard-title">Share something useful</div> |
| <div class="plexi-muted"> |
| Have clean notes, slides, or question papers that can help others? |
| Submit them through the upload form and they can be reviewed and added |
| to the study library for everyone. |
| </div> |
| </section> |
| """, |
| unsafe_allow_html=True, |
| ) |
|
|
| with contribute_cols[1]: |
| st.markdown( |
| """ |
| <div class="plexi-cta-grid" style="margin-top:0; grid-template-columns:1fr;"> |
| <a class="plexi-cta-button" href="https://github.com/KunalGupta25/plexi-materials/issues/new?template=upload-material.yml" target="_blank" rel="noopener noreferrer">Submit Materials</a> |
| </div> |
| """, |
| unsafe_allow_html=True, |
| ) |
|
|
| render_sidebar() |
|
|