-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththeme.py
More file actions
89 lines (78 loc) · 2.4 KB
/
Copy paththeme.py
File metadata and controls
89 lines (78 loc) · 2.4 KB
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
import streamlit as st
def apply_premium_sidebar():
st.markdown("""
<style>
/* Dark sidebar styling to match React */
[data-testid="stSidebar"] {
background-color: #0F172A;
border-right: 1px solid #1E293B;
}
/* React-style Header: "Activity Icon + DataForge" */
[data-testid="stSidebar"]::before {
content: "DataForge";
display: block;
padding: 1.5rem 1.5rem 0.5rem 1.5rem;
font-size: 1.2rem;
font-weight: 600;
color: #F8FAFC;
border-bottom: 1px solid transparent;
margin-bottom: 0.5rem;
}
/* "Main Menu" Label Injection */
[data-testid="stSidebarNav"]::before {
content: "MAIN MENU";
display: block;
padding: 0 1.5rem 0.5rem 1.5rem;
font-size: 0.75rem;
font-weight: 700;
color: #64748B;
letter-spacing: 0.05em;
}
/* Remove padding from the nav container to reduce gap */
[data-testid="stSidebarNav"] {
padding-top: 0 !important;
}
/* Force remove Streamlit's default flex gaps between list items */
[data-testid="stSidebarNav"] ul {
gap: 0.2rem !important;
}
[data-testid="stSidebarNav"] li {
margin: 0 !important;
padding: 0 !important;
}
/* Sidebar Links - Reduced Gaps & React styling */
[data-testid="stSidebarNav"] a {
padding: 0.4rem 1.5rem !important;
margin: 0 1rem !important;
border-radius: 6px;
transition: all 0.2s ease-in-out;
color: #94A3B8 !important;
font-size: 0.95rem;
font-weight: 500;
text-decoration: none !important;
display: flex;
align-items: center;
gap: 10px;
}
/* Hover state */
[data-testid="stSidebarNav"] a:hover {
background-color: #1E293B;
color: #F8FAFC !important;
}
/* Active Page state */
[data-testid="stSidebarNav"] a[aria-current="page"] {
background-color: #1E293B;
color: #3B82F6 !important;
border-left: 3px solid #3B82F6;
border-radius: 0 6px 6px 0;
}
[data-testid="stSidebarNav"] a[aria-current="page"] * {
color: #3B82F6 !important;
font-weight: 600;
}
/* Adjust default 'Pages' header */
[data-testid="stSidebarNav"] > div:first-child {
margin-top: 10px;
}
</style>
""", unsafe_allow_html=True)