diff --git a/app/tab_disclaimer.py b/app/tab_info.py similarity index 63% rename from app/tab_disclaimer.py rename to app/tab_info.py index 2cf53bb6..ef6fb555 100644 --- a/app/tab_disclaimer.py +++ b/app/tab_info.py @@ -1,17 +1,17 @@ -# -*- coding: utf-8 -*- -"""Disclaimer tab.""" -import streamlit as st - - -def content_disclaimer(): - with st.expander("What is this?"): - st.markdown( - """ -**Disclaimer** - -Information on product details of the PTX Business Opportunity Analyser - including a citation suggestion of the tool. - """ - ) - st.image("static/disclaimer.png") - st.image("static/disclaimer_2.png") +# -*- coding: utf-8 -*- +"""Info tab.""" +import streamlit as st + + +def content_info(): + with st.expander("What is this?"): + st.markdown( + """ +**Info** + +Information on product details of the PTX Business Opportunity Analyser + including a citation suggestion of the tool. + """ + ) + st.image("static/info.png") + st.image("static/info_2.png") diff --git a/ptxboa_streamlit.py b/ptxboa_streamlit.py index d5d1f674..07e148c7 100644 --- a/ptxboa_streamlit.py +++ b/ptxboa_streamlit.py @@ -14,7 +14,7 @@ from app.tab_country_fact_sheets import content_country_fact_sheets from app.tab_dashboard import content_dashboard from app.tab_deep_dive_countries import content_deep_dive_countries -from app.tab_disclaimer import content_disclaimer +from app.tab_info import content_info from app.tab_input_data import content_input_data from app.tab_literature import content_literature from app.tab_market_scanning import content_market_scanning @@ -86,9 +86,14 @@ "Certification schemes", "Sustainability", "Literature", - "Disclaimer", + "Info", ) +tabs_icons = { + "Dashboard": "house-fill", + "Info": "question-circle-fill", +} + # the "tab_key" is used to identify the sac.tabs element. Whenever a tab is switched # programatically (e.g. via app.ptxboa.functions.move_to_tab), the "tab_key" entry is # incremented by 1. This allows us to set the programatically set tab as the default @@ -101,7 +106,7 @@ st.session_state[st.session_state["tab_key"]] = "Dashboard" sac.tabs( - [sac.TabsItem(label=i) for i in tabs], + [sac.TabsItem(label=i, icon=tabs_icons.get(i, None)) for i in tabs], index=tabs.index(st.session_state[st.session_state["tab_key"]]), format_func="title", align="center", @@ -176,5 +181,5 @@ if st.session_state[st.session_state["tab_key"]] == "Literature": content_literature(cd) -if st.session_state[st.session_state["tab_key"]] == "Disclaimer": - content_disclaimer() +if st.session_state[st.session_state["tab_key"]] == "Info": + content_info() diff --git a/static/disclaimer.png b/static/info.png similarity index 100% rename from static/disclaimer.png rename to static/info.png diff --git a/static/disclaimer_2.png b/static/info_2.png similarity index 100% rename from static/disclaimer_2.png rename to static/info_2.png