lanna_lalala;- commited on
Commit
425719f
·
1 Parent(s): de0ba00

lesson css try

Browse files
Files changed (1) hide show
  1. phase/Student_view/lesson.py +30 -18
phase/Student_view/lesson.py CHANGED
@@ -571,23 +571,6 @@ def _render_lesson():
571
 
572
  with col_main:
573
  t_title, t_text = topics[topic_idx]
574
- takeaways_html = ""
575
-
576
- if t_text:
577
- takeaways = _extract_takeaways(t_text)
578
- if takeaways:
579
- takeaways_html = f"""
580
- <div class="takeaways-section">
581
- <div class="takeaways-header">
582
- <span style="color: #10b981;">●</span>
583
- <span>Key Takeaways</span>
584
- </div>
585
- {''.join([
586
- f'<div class="takeaway-item"><span class="takeaway-check">✓</span><span>{tk}</span></div>'
587
- for tk in takeaways
588
- ])}
589
- </div>
590
- """
591
 
592
  st.markdown(f"""
593
  <div class="lesson-card">
@@ -601,10 +584,39 @@ def _render_lesson():
601
  <div class="lesson-content">
602
  {t_text.strip() if t_text else "<p>Content coming soon.</p>"}
603
  </div>
604
- {takeaways_html}
605
  </div>
606
  """, unsafe_allow_html=True)
607
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
608
  # Navigation Buttons OUTSIDE lesson card
609
  st.markdown('<div class="nav-buttons">', unsafe_allow_html=True)
610
  col1, col2, col3 = st.columns([1, 1, 1])
 
571
 
572
  with col_main:
573
  t_title, t_text = topics[topic_idx]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
574
 
575
  st.markdown(f"""
576
  <div class="lesson-card">
 
584
  <div class="lesson-content">
585
  {t_text.strip() if t_text else "<p>Content coming soon.</p>"}
586
  </div>
 
587
  </div>
588
  """, unsafe_allow_html=True)
589
 
590
+ # Key Takeaways
591
+ if t_text:
592
+ st.markdown(t_text.strip(), unsafe_allow_html=True)
593
+ else:
594
+ st.info("Content coming soon.")
595
+
596
+ if t_text:
597
+ takeaways = _extract_takeaways(t_text)
598
+ if takeaways:
599
+ st.markdown("""
600
+ <div class="sidebar-card">
601
+ <div class="takeaways-section" style="min-height: 150px;">
602
+ <div class="takeaways-header">
603
+ <span style="color: #10b981;">●</span>
604
+ <span>Key Takeaways</span>
605
+ </div>
606
+ """, unsafe_allow_html=True)
607
+
608
+ for takeaway in takeaways:
609
+ st.markdown(f"""
610
+ <div class="takeaway-item">
611
+ <span class="takeaway-check">✓</span>
612
+ <span>{takeaway}</span>
613
+ </div>
614
+ """, unsafe_allow_html=True)
615
+
616
+ # Close both divs
617
+ st.markdown("</div></div>", unsafe_allow_html=True)
618
+
619
+
620
  # Navigation Buttons OUTSIDE lesson card
621
  st.markdown('<div class="nav-buttons">', unsafe_allow_html=True)
622
  col1, col2, col3 = st.columns([1, 1, 1])