|
@@ -25,10 +25,28 @@ def header_with_theme_logo(title: str,
|
|
|
light_path: str = "logos/NEW_PHYSTECH_for_light.png",
|
|
|
dark_path: str = "logos/NEW_PHYSTECH_for_dark.png",
|
|
|
size_px: int = 100):
|
|
|
+
|
|
|
+ """
|
|
|
+ Display a header with a theme-aware logo and title.
|
|
|
+ Made in HTML/CSS to adapt to light/dark mode in Streamlit.
|
|
|
+
|
|
|
+ Parameters
|
|
|
+ ----------
|
|
|
+ title : str
|
|
|
+ The title to display in the header.
|
|
|
+ light_path : str
|
|
|
+ Path to the light theme logo image.
|
|
|
+ dark_path : str
|
|
|
+ Path to the dark theme logo image.
|
|
|
+ size_px : int
|
|
|
+ Size of the logo in pixels (height).
|
|
|
+ Returns
|
|
|
+ -------
|
|
|
+ None
|
|
|
+ """
|
|
|
light_b64 = _b64_img(light_path)
|
|
|
dark_b64 = _b64_img(dark_path)
|
|
|
if not (light_b64 or dark_b64):
|
|
|
- # если нет логотипов — просто выводим заголовок
|
|
|
st.markdown(f"## {title}")
|
|
|
return
|
|
|
|
|
@@ -37,7 +55,6 @@ def header_with_theme_logo(title: str,
|
|
|
|
|
|
html = f"""
|
|
|
<style>
|
|
|
- /* убираем стандартный padding контейнера Streamlit сверху */
|
|
|
section.main > div:first-child {{
|
|
|
padding-top: 0rem;
|
|
|
}}
|