ahanbose commited on
Commit
ae41df5
Β·
verified Β·
1 Parent(s): 524476d

Update src/app.py

Browse files
Files changed (1) hide show
  1. src/app.py +9 -8
src/app.py CHANGED
@@ -19,6 +19,7 @@ Run: streamlit run app.py
19
 
20
  import logging
21
  import os
 
22
  import re
23
  import sys
24
  from pathlib import Path
@@ -315,7 +316,7 @@ _PLOT_LAYOUT = dict(
315
  def render_login():
316
  """SPJIMR login β€” fully responsive across desktop, tablet, mobile."""
317
 
318
- st.markdown("""
319
  <style>
320
  @import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300&family=DM+Sans:wght@300;400;500&display=swap');
321
 
@@ -596,10 +597,10 @@ def render_login():
596
 
597
  <!-- Right panel bg: desktop only -->
598
  <div class="spjimr-form-bg"></div>
599
- """, unsafe_allow_html=True)
600
 
601
  # ── Form heading ──────────────────────────────────────────────────────────
602
- st.markdown("""
603
  <div style="margin-bottom:1.4rem;">
604
  <div style="display:inline-flex;align-items:center;gap:6px;
605
  background:rgba(246,125,49,0.12);color:#F67D31;
@@ -620,7 +621,7 @@ def render_login():
620
  Sign in with your SPJIMR email to continue.
621
  </div>
622
  </div>
623
- """, unsafe_allow_html=True)
624
 
625
  err_slot = st.empty()
626
 
@@ -666,14 +667,14 @@ def render_login():
666
  st.session_state["login_user"] = email_val.lower()
667
  st.rerun()
668
 
669
- st.markdown("""
670
  <div style="display:flex;align-items:center;gap:12px;margin:1.2rem 0;">
671
  <div style="flex:1;height:1px;background:rgba(80,0,115,0.4);"></div>
672
  <span style="font-family:'DM Sans',sans-serif;font-size:12px;
673
  color:rgba(196,164,212,0.45);">or continue with</span>
674
  <div style="flex:1;height:1px;background:rgba(80,0,115,0.4);"></div>
675
  </div>
676
- """, unsafe_allow_html=True)
677
 
678
  if st.button(
679
  "\U0001f510 SPJIMR Single Sign-On (SSO)",
@@ -684,7 +685,7 @@ def render_login():
684
  st.session_state["login_user"] = "sso_user@spjimr.org"
685
  st.rerun()
686
 
687
- st.markdown("""
688
  <div style="margin-top:1.4rem;text-align:center;font-family:'DM Sans',sans-serif;
689
  font-size:12px;color:rgba(196,164,212,0.45);line-height:1.9;">
690
  New to the platform?
@@ -692,7 +693,7 @@ def render_login():
692
  Having trouble?
693
  <a href="#" style="color:#F67D31;text-decoration:none;font-weight:500;">Contact IT support</a>
694
  </div>
695
- """, unsafe_allow_html=True)
696
 
697
 
698
 
 
19
 
20
  import logging
21
  import os
22
+ import textwrap
23
  import re
24
  import sys
25
  from pathlib import Path
 
316
  def render_login():
317
  """SPJIMR login β€” fully responsive across desktop, tablet, mobile."""
318
 
319
+ st.markdown(textwrap.dedent("""
320
  <style>
321
  @import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300&family=DM+Sans:wght@300;400;500&display=swap');
322
 
 
597
 
598
  <!-- Right panel bg: desktop only -->
599
  <div class="spjimr-form-bg"></div>
600
+ """), unsafe_allow_html=True)
601
 
602
  # ── Form heading ──────────────────────────────────────────────────────────
603
+ st.markdown(textwrap.dedent("""
604
  <div style="margin-bottom:1.4rem;">
605
  <div style="display:inline-flex;align-items:center;gap:6px;
606
  background:rgba(246,125,49,0.12);color:#F67D31;
 
621
  Sign in with your SPJIMR email to continue.
622
  </div>
623
  </div>
624
+ """), unsafe_allow_html=True)
625
 
626
  err_slot = st.empty()
627
 
 
667
  st.session_state["login_user"] = email_val.lower()
668
  st.rerun()
669
 
670
+ st.markdown(textwrap.dedent("""
671
  <div style="display:flex;align-items:center;gap:12px;margin:1.2rem 0;">
672
  <div style="flex:1;height:1px;background:rgba(80,0,115,0.4);"></div>
673
  <span style="font-family:'DM Sans',sans-serif;font-size:12px;
674
  color:rgba(196,164,212,0.45);">or continue with</span>
675
  <div style="flex:1;height:1px;background:rgba(80,0,115,0.4);"></div>
676
  </div>
677
+ """), unsafe_allow_html=True)
678
 
679
  if st.button(
680
  "\U0001f510 SPJIMR Single Sign-On (SSO)",
 
685
  st.session_state["login_user"] = "sso_user@spjimr.org"
686
  st.rerun()
687
 
688
+ st.markdown(textwrap.dedent("""
689
  <div style="margin-top:1.4rem;text-align:center;font-family:'DM Sans',sans-serif;
690
  font-size:12px;color:rgba(196,164,212,0.45);line-height:1.9;">
691
  New to the platform?
 
693
  Having trouble?
694
  <a href="#" style="color:#F67D31;text-decoration:none;font-weight:500;">Contact IT support</a>
695
  </div>
696
+ """), unsafe_allow_html=True)
697
 
698
 
699