a1c1853ca5
git-subtree-dir: utils_v2 git-subtree-split: 88e444ac57ca6c090736645616d8a8a2d2af367b
103 lines
4.0 KiB
Python
103 lines
4.0 KiB
Python
"""
|
|
|
|
AUTHOR:
|
|
|
|
Khushal P Soonderji
|
|
|
|
DATE:
|
|
|
|
Tuesday, 14th Oct., 2025.
|
|
|
|
OBJECTIVE:
|
|
|
|
To provide a standard logo that can be rendered from anywhere.
|
|
|
|
REFERENCES:
|
|
|
|
1) https://docs.streamlit.io/develop/api-reference
|
|
|
|
DOWNLOADS:
|
|
|
|
N/A
|
|
|
|
"""
|
|
|
|
|
|
# *****************************************************************************************************************
|
|
# ***** ****
|
|
# *** IMPORT ***
|
|
# ***** ****
|
|
# *****************************************************************************************************************
|
|
|
|
|
|
# To make sibling directories accessible for imports:
|
|
import sys
|
|
sys.path.append(".")
|
|
sys.path.append("..")
|
|
|
|
# Streamlit:
|
|
import streamlit as st
|
|
|
|
# For working with datatypes:
|
|
from typing import Literal
|
|
|
|
|
|
# *****************************************************************************************************************
|
|
# ***** ****
|
|
# *** MACROS / ONE-TIME INIT ***
|
|
# ***** ****
|
|
# *****************************************************************************************************************
|
|
|
|
|
|
# --- Nothing Yet
|
|
|
|
|
|
# *****************************************************************************************************************
|
|
# ***** ****
|
|
# *** VARIABLES ***
|
|
# ***** ****
|
|
# *****************************************************************************************************************
|
|
|
|
|
|
# --- Nothing Yet
|
|
|
|
|
|
# *****************************************************************************************************************
|
|
# ***** ****
|
|
# *** FUNCTIONS ***
|
|
# ***** ****
|
|
# *****************************************************************************************************************
|
|
|
|
|
|
def draw(
|
|
full_image: str,
|
|
icon_image: str,
|
|
size: Literal["small", "medium", "large"] = "large",
|
|
) -> None:
|
|
|
|
"""
|
|
Draws the logo of the site with the provided inputs.
|
|
:param full_image: The full-sized image to when the sidebar is open.
|
|
:param icon_image: The icon-size image to use when the sidebar is closed.
|
|
:param size: The desired size of the logo.
|
|
:return: None.
|
|
"""
|
|
|
|
st.logo(
|
|
image = full_image,
|
|
icon_image = icon_image,
|
|
size = size
|
|
)
|
|
|
|
|
|
# *****************************************************************************************************************
|
|
# ***** ****
|
|
# *** MAIN PROGRAM ***
|
|
# ***** ****
|
|
# *****************************************************************************************************************
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
pass
|