import streamlit as st
from utils.utils import load_header
from utils.constants import CONTRIBUTORS
def about_us_page(contributors):
load_header("Meet Our Team")
data = contributors
full_string = ""
for i in range(0, len(data), 3):
try:
contributor1_name, contributor1_link = data[i]
contributor2_name, contributor2_link = data[i + 1]
contributor3_name, contributor3_link = data[i + 2]
CONTRIBUTORS = f"""
{contributor1_name} |
{contributor2_name} |
{contributor3_name} |
"""
full_string += CONTRIBUTORS
except IndexError:
if len(data[i:]) == 2:
full_string += f"""
{data[i:][0][0]}
|
{data[i:][1][0]}
|
"""
elif len(data[i:]) == 1:
full_string += f"""
{data[i:][0][0]}
|
"""
with open("assets/html/about.html", "r", encoding="utf-8") as file:
html_content = file.read()
st.write(html_content.format(team=full_string), unsafe_allow_html=True)
if __name__ == "__main__":
about_us_page(CONTRIBUTORS)