diff --git a/code/backend/pages/01_Ingest_Data.py b/code/backend/pages/01_Ingest_Data.py index 0ddee22fb..b8ed3dc4c 100644 --- a/code/backend/pages/01_Ingest_Data.py +++ b/code/backend/pages/01_Ingest_Data.py @@ -19,15 +19,13 @@ layout="wide", menu_items=None, ) -mod_page_style = """ - - """ -st.markdown(mod_page_style, unsafe_allow_html=True) +def load_css(file_path): + with open(file_path) as f: + st.markdown(f"", unsafe_allow_html=True) + +# Load the common CSS +load_css("pages/common.css") def reprocess_all(): backend_url = urllib.parse.urljoin( diff --git a/code/backend/pages/02_Explore_Data.py b/code/backend/pages/02_Explore_Data.py index 60cc984b8..4c2784837 100644 --- a/code/backend/pages/02_Explore_Data.py +++ b/code/backend/pages/02_Explore_Data.py @@ -15,14 +15,6 @@ layout="wide", menu_items=None, ) -mod_page_style = """ - - """ -st.markdown(mod_page_style, unsafe_allow_html=True) # CSS to inject contained in a string hide_table_row_index = """ @@ -35,6 +27,14 @@ # Inject CSS with Markdown st.markdown(hide_table_row_index, unsafe_allow_html=True) +def load_css(file_path): + with open(file_path) as f: + st.markdown(f"", unsafe_allow_html=True) + +# Load the common CSS +load_css("pages/common.css") + + try: search_handler = Search.get_search_handler(env_helper) diff --git a/code/backend/pages/03_Delete_Data.py b/code/backend/pages/03_Delete_Data.py index 5badfe4be..5d4da90f9 100644 --- a/code/backend/pages/03_Delete_Data.py +++ b/code/backend/pages/03_Delete_Data.py @@ -17,14 +17,14 @@ layout="wide", menu_items=None, ) -mod_page_style = """ - - """ -st.markdown(mod_page_style, unsafe_allow_html=True) + +def load_css(file_path): + with open(file_path) as f: + st.markdown(f"", unsafe_allow_html=True) + +# Load the common CSS +load_css("pages/common.css") + # CSS to inject contained in a string hide_table_row_index = """ diff --git a/code/backend/pages/04_Configuration.py b/code/backend/pages/04_Configuration.py index 5f31bb9e5..9ed3063b2 100644 --- a/code/backend/pages/04_Configuration.py +++ b/code/backend/pages/04_Configuration.py @@ -18,14 +18,12 @@ menu_items=None, ) -MOD_PAGE_STYLE = """ - - """ -st.markdown(MOD_PAGE_STYLE, unsafe_allow_html=True) +def load_css(file_path): + with open(file_path) as f: + st.markdown(f"", unsafe_allow_html=True) + +# Load the common CSS +load_css("pages/common.css") config = ConfigHelper.get_active_config_or_default()