File size: 3,973 Bytes
fbe7a99
 
ca07346
fbe7a99
 
 
 
 
ca07346
fbe7a99
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e34605e
fbe7a99
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
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()