-
Notifications
You must be signed in to change notification settings - Fork 0
/
css.py
39 lines (32 loc) · 943 Bytes
/
css.py
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
import streamlit as st
# Full width for main area
# https://discuss.streamlit.io/t/custom-render-widths/81/6
def max_main_width():
max_width_str = f"max-width: 2000px;"
st.markdown(
f"""
<style>
.reportview-container .main .block-container{{
{max_width_str}
}}
.reportview-container .main .block-container:first-child {{
padding-top: 0;
margin-top: 0;
}}
</style>
""",
unsafe_allow_html=True)
# Hide dev menu
def hide_dev_menu():
hide_streamlit_style = """
<style>
#MainMenu {visibility: hidden;}
footer {visibility: hidden;}
</style>
"""
st.markdown(hide_streamlit_style, unsafe_allow_html=True)
def all_css(is_max_main_width=True, is_hide_dev_menu=True):
if is_max_main_width:
max_main_width()
if is_hide_dev_menu:
hide_dev_menu()