Skip to content

Commit 4bbd6aa

Browse files
author
Irina
committed
delete redundant sidebar
1 parent 9f3164e commit 4bbd6aa

5 files changed

Lines changed: 260 additions & 116 deletions

File tree

Homepage.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -123,16 +123,6 @@ def load_all_data():
123123
# =========================
124124
# Sidebar filters
125125
# =========================
126-
st.sidebar.markdown(
127-
"""
128-
<h1 style="font-size: 1.5rem; line-height: 1.2; margin-bottom: 0.2rem;">
129-
U.S. Petroleum & WTI Weekly Monitor
130-
</h1>
131-
""",
132-
unsafe_allow_html=True,
133-
)
134-
st.sidebar.caption("Source: GDELT + EIA")
135-
st.sidebar.divider()
136126
st.sidebar.header("Filters")
137127
st.sidebar.caption("Affects correlation statistics and key findings below.")
138128

pages/2_Geopolitical_Conflict_Context.py

Lines changed: 65 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,77 @@
1717
st.markdown(
1818
"""
1919
<style>
20-
[data-testid="stSidebar"] { background-color: #0D2B5E !important; }
21-
[data-testid="stSidebar"] * { color: white !important; }
22-
[data-testid="stSidebar"] .stDateInput input {
23-
color: #1A1A1A !important;
24-
background-color: #E4EBF4 !important;
20+
[data-testid="stSidebar"] {
21+
background-color: #0D2B5E !important;
2522
}
26-
[data-testid="stSidebarNav"] a { color: rgba(255,255,255,0.8) !important; }
27-
[data-testid="stSidebarNav"] a:hover {
23+
24+
[data-testid="stSidebar"] > div {
25+
background-color: #0D2B5E !important;
26+
}
27+
28+
[data-testid="stSidebar"] * {
2829
color: white !important;
29-
background-color: rgba(255,255,255,0.1) !important;
3030
}
31-
[data-testid="stSidebarNav"] { padding-top: 3.5rem; }
31+
32+
[data-testid="stSidebarNav"] {
33+
padding-top: 3.8rem;
34+
background-color: #0D2B5E !important;
35+
}
36+
3237
[data-testid="stSidebarNav"]::before {
3338
content: "U.S. Petroleum & WTI Weekly Monitor";
34-
display: block; position: absolute;
35-
top: 0; left: 0; right: 0;
36-
padding: 1rem 1.2rem 0.2rem 1.2rem;
37-
font-size: 1.05rem; font-weight: 600; line-height: 1.3;
39+
display: block;
40+
position: absolute;
41+
top: 0;
42+
left: 0;
43+
right: 0;
44+
padding: 1rem 1.2rem 0.3rem 1.2rem;
45+
font-size: 1.05rem;
46+
font-weight: 700;
47+
line-height: 1.3;
3848
color: white !important;
49+
background-color: #0D2B5E !important;
50+
}
51+
52+
[data-testid="stSidebarNav"] a {
53+
color: rgba(255,255,255,0.85) !important;
54+
background-color: transparent !important;
55+
}
56+
57+
[data-testid="stSidebarNav"] a:hover {
58+
color: white !important;
59+
background-color: rgba(255,255,255,0.12) !important;
60+
border-radius: 0.4rem;
61+
}
62+
63+
[data-testid="stSidebarNav"] a[aria-current="page"] {
64+
color: white !important;
65+
background-color: rgba(255,255,255,0.16) !important;
66+
border-radius: 0.4rem;
67+
font-weight: 700;
68+
}
69+
70+
[data-testid="stSidebar"] .stDateInput input {
71+
color: #1A1A1A !important;
72+
background-color: #E4EBF4 !important;
73+
}
74+
75+
[data-testid="stSidebar"] input {
76+
color: #1A1A1A !important;
77+
background-color: #E4EBF4 !important;
78+
}
79+
80+
[data-testid="stSidebar"] textarea {
81+
color: #1A1A1A !important;
82+
background-color: #E4EBF4 !important;
83+
}
84+
85+
[data-testid="stSidebar"] div[data-baseweb="select"] * {
86+
color: #1A1A1A !important;
87+
}
88+
89+
[data-testid="stSidebar"] div[data-baseweb="select"] > div {
90+
background-color: #E4EBF4 !important;
3991
}
4092
</style>
4193
""",
@@ -53,20 +105,6 @@ def interpret(text: str):
53105
)
54106

55107

56-
# =========================
57-
# Sidebar
58-
# =========================
59-
st.sidebar.markdown(
60-
"""
61-
<h1 style="font-size: 1.5rem; line-height: 1.2; margin-bottom: 0.2rem;">
62-
U.S. Petroleum & WTI Weekly Monitor
63-
</h1>
64-
""",
65-
unsafe_allow_html=True,
66-
)
67-
st.sidebar.caption("Source: GDELT")
68-
st.sidebar.divider()
69-
70108
# =========================
71109
# Page header
72110
# =========================

pages/3_WTI_Price.py

Lines changed: 65 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,77 @@
1717
st.markdown(
1818
"""
1919
<style>
20-
[data-testid="stSidebar"] { background-color: #0D2B5E !important; }
21-
[data-testid="stSidebar"] * { color: white !important; }
22-
[data-testid="stSidebar"] .stDateInput input {
23-
color: #1A1A1A !important;
24-
background-color: #E4EBF4 !important;
20+
[data-testid="stSidebar"] {
21+
background-color: #0D2B5E !important;
2522
}
26-
[data-testid="stSidebarNav"] a { color: rgba(255,255,255,0.8) !important; }
27-
[data-testid="stSidebarNav"] a:hover {
23+
24+
[data-testid="stSidebar"] > div {
25+
background-color: #0D2B5E !important;
26+
}
27+
28+
[data-testid="stSidebar"] * {
2829
color: white !important;
29-
background-color: rgba(255,255,255,0.1) !important;
3030
}
31-
[data-testid="stSidebarNav"] { padding-top: 3.5rem; }
31+
32+
[data-testid="stSidebarNav"] {
33+
padding-top: 3.8rem;
34+
background-color: #0D2B5E !important;
35+
}
36+
3237
[data-testid="stSidebarNav"]::before {
3338
content: "U.S. Petroleum & WTI Weekly Monitor";
34-
display: block; position: absolute;
35-
top: 0; left: 0; right: 0;
36-
padding: 1rem 1.2rem 0.2rem 1.2rem;
37-
font-size: 1.05rem; font-weight: 600; line-height: 1.3;
39+
display: block;
40+
position: absolute;
41+
top: 0;
42+
left: 0;
43+
right: 0;
44+
padding: 1rem 1.2rem 0.3rem 1.2rem;
45+
font-size: 1.05rem;
46+
font-weight: 700;
47+
line-height: 1.3;
3848
color: white !important;
49+
background-color: #0D2B5E !important;
50+
}
51+
52+
[data-testid="stSidebarNav"] a {
53+
color: rgba(255,255,255,0.85) !important;
54+
background-color: transparent !important;
55+
}
56+
57+
[data-testid="stSidebarNav"] a:hover {
58+
color: white !important;
59+
background-color: rgba(255,255,255,0.12) !important;
60+
border-radius: 0.4rem;
61+
}
62+
63+
[data-testid="stSidebarNav"] a[aria-current="page"] {
64+
color: white !important;
65+
background-color: rgba(255,255,255,0.16) !important;
66+
border-radius: 0.4rem;
67+
font-weight: 700;
68+
}
69+
70+
[data-testid="stSidebar"] .stDateInput input {
71+
color: #1A1A1A !important;
72+
background-color: #E4EBF4 !important;
73+
}
74+
75+
[data-testid="stSidebar"] input {
76+
color: #1A1A1A !important;
77+
background-color: #E4EBF4 !important;
78+
}
79+
80+
[data-testid="stSidebar"] textarea {
81+
color: #1A1A1A !important;
82+
background-color: #E4EBF4 !important;
83+
}
84+
85+
[data-testid="stSidebar"] div[data-baseweb="select"] * {
86+
color: #1A1A1A !important;
87+
}
88+
89+
[data-testid="stSidebar"] div[data-baseweb="select"] > div {
90+
background-color: #E4EBF4 !important;
3991
}
4092
</style>
4193
""",
@@ -53,20 +105,6 @@ def interpret(text: str):
53105
)
54106

55107

56-
# =========================
57-
# Sidebar
58-
# =========================
59-
st.sidebar.markdown(
60-
"""
61-
<h1 style="font-size: 1.5rem; line-height: 1.2; margin-bottom: 0.2rem;">
62-
U.S. Petroleum & WTI Weekly Monitor
63-
</h1>
64-
""",
65-
unsafe_allow_html=True,
66-
)
67-
st.sidebar.caption("Source: EIA")
68-
st.sidebar.divider()
69-
70108
# =========================
71109
# Page header
72110
# =========================

pages/4_Gasoline_Price.py

Lines changed: 65 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,77 @@
1717
st.markdown(
1818
"""
1919
<style>
20-
[data-testid="stSidebar"] { background-color: #0D2B5E !important; }
21-
[data-testid="stSidebar"] * { color: white !important; }
22-
[data-testid="stSidebar"] .stDateInput input {
23-
color: #1A1A1A !important;
24-
background-color: #E4EBF4 !important;
20+
[data-testid="stSidebar"] {
21+
background-color: #0D2B5E !important;
2522
}
26-
[data-testid="stSidebarNav"] a { color: rgba(255,255,255,0.8) !important; }
27-
[data-testid="stSidebarNav"] a:hover {
23+
24+
[data-testid="stSidebar"] > div {
25+
background-color: #0D2B5E !important;
26+
}
27+
28+
[data-testid="stSidebar"] * {
2829
color: white !important;
29-
background-color: rgba(255,255,255,0.1) !important;
3030
}
31-
[data-testid="stSidebarNav"] { padding-top: 3.5rem; }
31+
32+
[data-testid="stSidebarNav"] {
33+
padding-top: 3.8rem;
34+
background-color: #0D2B5E !important;
35+
}
36+
3237
[data-testid="stSidebarNav"]::before {
3338
content: "U.S. Petroleum & WTI Weekly Monitor";
34-
display: block; position: absolute;
35-
top: 0; left: 0; right: 0;
36-
padding: 1rem 1.2rem 0.2rem 1.2rem;
37-
font-size: 1.05rem; font-weight: 600; line-height: 1.3;
39+
display: block;
40+
position: absolute;
41+
top: 0;
42+
left: 0;
43+
right: 0;
44+
padding: 1rem 1.2rem 0.3rem 1.2rem;
45+
font-size: 1.05rem;
46+
font-weight: 700;
47+
line-height: 1.3;
3848
color: white !important;
49+
background-color: #0D2B5E !important;
50+
}
51+
52+
[data-testid="stSidebarNav"] a {
53+
color: rgba(255,255,255,0.85) !important;
54+
background-color: transparent !important;
55+
}
56+
57+
[data-testid="stSidebarNav"] a:hover {
58+
color: white !important;
59+
background-color: rgba(255,255,255,0.12) !important;
60+
border-radius: 0.4rem;
61+
}
62+
63+
[data-testid="stSidebarNav"] a[aria-current="page"] {
64+
color: white !important;
65+
background-color: rgba(255,255,255,0.16) !important;
66+
border-radius: 0.4rem;
67+
font-weight: 700;
68+
}
69+
70+
[data-testid="stSidebar"] .stDateInput input {
71+
color: #1A1A1A !important;
72+
background-color: #E4EBF4 !important;
73+
}
74+
75+
[data-testid="stSidebar"] input {
76+
color: #1A1A1A !important;
77+
background-color: #E4EBF4 !important;
78+
}
79+
80+
[data-testid="stSidebar"] textarea {
81+
color: #1A1A1A !important;
82+
background-color: #E4EBF4 !important;
83+
}
84+
85+
[data-testid="stSidebar"] div[data-baseweb="select"] * {
86+
color: #1A1A1A !important;
87+
}
88+
89+
[data-testid="stSidebar"] div[data-baseweb="select"] > div {
90+
background-color: #E4EBF4 !important;
3991
}
4092
</style>
4193
""",
@@ -53,20 +105,6 @@ def interpret(text: str):
53105
)
54106

55107

56-
# =========================
57-
# Sidebar
58-
# =========================
59-
st.sidebar.markdown(
60-
"""
61-
<h1 style="font-size: 1.5rem; line-height: 1.2; margin-bottom: 0.2rem;">
62-
U.S. Petroleum & WTI Weekly Monitor
63-
</h1>
64-
""",
65-
unsafe_allow_html=True,
66-
)
67-
st.sidebar.caption("Source: EIA")
68-
st.sidebar.divider()
69-
70108
# =========================
71109
# Page header
72110
# =========================

0 commit comments

Comments
 (0)