add student officer content on homepage

This commit is contained in:
Carl Zhang
2025-10-03 19:04:40 -05:00
parent f625c5ab87
commit 0375584d53

View File

@@ -135,3 +135,41 @@ def home():
</div>
</section>
""", unsafe_allow_html=True)
# Student Officers
# load image in base64
import base64
def load_image(image_path):
with open(image_path, "rb") as image_file:
return base64.b64encode(image_file.read()).decode()
jesus_torres_img = load_image("./images/student_officer_photo/jesus_torres.jpg")
benjamin_mosley_img = load_image("./images/student_officer_photo/benjamin_mosley.jpg")
st.markdown(
f"""
<section>
<h2>Student Officers</h2>
<div class="faculty-container">
<div class="faculty-row">
<div class="faculty">
<img src="data:image/jpeg;base64,{jesus_torres_img}" alt="Jesus Torres">
<div class="faculty-info">
<strong>Jesus Torres</strong><br>
President <br>
<a href="mailto:jtorres8@buffs.wtamu.edu">jtorres8@buffs.wtamu.edu</a>
</div>
</div>
<div class="faculty">
<img src="data:image/jpeg;base64,{benjamin_mosley_img}" alt="Benjamin Mosley">
<div class="faculty-info">
<strong>Benjamin Mosley</strong><br>
Tech Lead <br>
<a href="mailto:brmosley1@buffs.wtamu.edu">brmosley1@buffs.wtamu.edu</a>
</div>
</div>
</div>
</div>
</section>
""", unsafe_allow_html=True)