File size: 4,283 Bytes
fe1457e
56237e0
18c4048
b03533d
4a4483a
 
b03533d
4a4483a
b03533d
b6f4b72
4a4483a
 
 
3247c5e
b9afd7d
4a4483a
 
 
3247c5e
 
4a4483a
 
3247c5e
4a4483a
 
 
 
b9afd7d
4a4483a
 
 
b9afd7d
3247c5e
4a4483a
 
 
3247c5e
4a4483a
 
 
3247c5e
 
4a4483a
3247c5e
4a4483a
816254e
 
 
 
4a4483a
 
 
3247c5e
b9afd7d
4a4483a
 
 
 
bf4868e
b9afd7d
4433ec0
3247c5e
bd8d689
4a4483a
 
3247c5e
 
e8dce15
3247c5e
4a4483a
 
 
bd8d689
3247c5e
 
13e79a4
4a4483a
 
 
 
 
 
b9afd7d
4a4483a
 
 
 
b9afd7d
4a4483a
14c18a1
b9afd7d
 
 
 
 
 
 
816254e
b9afd7d
 
 
 
 
 
 
4a4483a
 
 
 
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
import streamlit as st


st.set_page_config(
    page_title="Aula Python",
    page_icon="🐍",
    layout="wide",
    initial_sidebar_state="collapsed",
)

st.markdown(
    """
    <style>
      .stApp { background: #F5F8FA; }
      .block-container { max-width: 1160px; padding-top: 3.2rem; }
      .hero { text-align: center; margin: 1rem auto 2.8rem; }
      .hero-badge {
        display: inline-block; padding: .45rem .9rem; border-radius: 999px;
        background: #101820; color: white; font-weight: 700; letter-spacing: .04em;
        border-bottom: 4px solid #009FE3;
      }
      .hero h1 {
        margin: 1rem 0 .5rem; color: #101820; font-size: clamp(2.5rem, 6vw, 4.6rem);
        line-height: 1.02; letter-spacing: -.04em;
      }
      .hero p { color: #475569; font-size: 1.2rem; max-width: 720px; margin: auto; }
      .choice-card {
        min-height: 20rem; padding: 1.6rem; border-radius: 24px; background: rgba(255,255,255,.9);
        border: 1px solid rgba(148,163,184,.35); box-shadow: 0 18px 45px rgba(15,23,42,.10);
      }
      .choice-icon { font-size: 3rem; margin-bottom: .7rem; }
      .choice-card.practice { border-top: 4px solid #009FE3; }
      .choice-card h2 { color: #101820; margin: 0 0 .7rem; }
      .choice-card p { color: #64748b; font-size: 1.04rem; line-height: 1.65; }
      .tag {
        display: inline-block; margin-top: .65rem; padding: .3rem .65rem; border-radius: 8px;
        background: #E6F5FC; color: #007DB3; font-size: .86rem; font-weight: 700;
      }
      div.stButton > button {
        width: 100%; min-height: 3.4rem; border: 0; border-radius: 14px;
        background: #101820; color: white; font-size: 1.05rem; font-weight: 800;
        box-shadow: 0 8px 18px rgba(16,24,32,.18);
      }
      div.stButton > button:hover { background: #009FE3; color: white; border: 0; }
      .footer { text-align:center; color:#64748b; margin-top:3.2rem; font-size:.92rem; }
      [data-testid="stSidebar"],
      [data-testid="stSidebarCollapsedControl"],
      [data-testid="stExpandSidebarButton"],
      [data-testid="collapsedControl"] { display: none !important; }
    </style>
    <section class="hero">
      <span class="hero-badge">FUNDAMENTOS DE COMPUTACIÓN</span>
      <h1>Aprende Python<br>paso a paso</h1>
      <p>Sigue la clase, practica con código Python o comprueba lo que sabes en el simulador.</p>
    </section>
    """,
    unsafe_allow_html=True,
)

lesson_col, exam_col, practice_col = st.columns(3, gap="medium")

with lesson_col:
    st.markdown(
        """
        <div class="choice-card">
          <div class="choice-icon">🐍</div>
          <h2>Clase guiada</h2>
          <p>La clase completa de Python, de arriba abajo: diapositiva, código, diagrama de flujo y ejecución explicada. Incluye los problemas del Tema 2 y del examen parcial resueltos con diagrama y código.</p>
          <span class="tag">TEORÍA · CÓDIGO · DIAGRAMA · EJECUCIÓN</span>
        </div>
        """,
        unsafe_allow_html=True,
    )
    if st.button("Abrir clase guiada →", key="open_lesson"):
        st.switch_page("pages/3_Clase_guiada.py")

with exam_col:
    st.markdown(
        """
        <div class="choice-card">
          <div class="choice-icon">📝</div>
          <h2>Simulador de examen</h2>
          <p>Configura un simulacro general y revisa tu nota y tu rendimiento al terminar.</p>
        </div>
        """,
        unsafe_allow_html=True,
    )
    if st.button("Abrir simulador →", key="open_exam"):
        st.switch_page("pages/2_Simulador_de_examen.py")

with practice_col:
    st.markdown(
        """
        <div class="choice-card practice">
          <div class="choice-icon">🧩</div>
          <h2>Ejercicios de clase</h2>
          <p>Predice la salida, completa código y compara soluciones de Python. Puedes revelar la respuesta y seguir su explicación paso a paso.</p>
          <span class="tag">116 EJERCICIOS DE PYTHON</span>
        </div>
        """,
        unsafe_allow_html=True,
    )
    if st.button("Practicar Python →", key="open_practice"):
        st.switch_page("pages/1_Ejercicios_de_clase.py")

st.markdown(
    '<p class="footer">🐍 Python · Diagramas de flujo · Pensamiento computacional</p>',
    unsafe_allow_html=True,
)