This commit is contained in:
2022-05-22 20:03:30 +02:00
parent a3aa387e99
commit 4ab15ba924
2 changed files with 24 additions and 9 deletions

View File

@ -4,7 +4,7 @@ from st_aggrid import AgGrid, GridOptionsBuilder
import hacks
from restapi import restapi
from utils.st_utils import get_session_id, rerun
from utils.st_utils import get_session_id, rerun, hide_UI_elements
from utils.df_utils import to_excel_binary
@ -14,14 +14,7 @@ st.set_page_config(
layout="wide"
)
hide_st_style = """
<style>
#MainMenu {visibility: hidden;}
footer {visibility: hidden;}
header {visibility: hidden;}
</style>
"""
st.markdown(hide_st_style, unsafe_allow_html=True)
hide_UI_elements()

View File

@ -19,3 +19,25 @@ def get_session_id():
def hide_UI_elements(menu=True, header=True, footer=True):
HIDDEN = " {visibility: hidden;}"
res = []
if menu:
res.append("#MainMenu" + HIDDEN)
if header:
res.append("header" + HIDDEN)
if footer:
res.append("footer" + HIDDEN)
if not res:
return
res = ["<style>"] + res + ["</style>"]
res = "\n".join(res)
return st.markdown(res, unsafe_allow_html=True)