Spaces:
Sleeping
Sleeping
File size: 1,848 Bytes
a101471 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
import streamlit as st
from sqlalchemy.orm import Session
from sqlalchemy import select
from models import Job, ENGINE
def post_jobs() -> None:
with Session(ENGINE) as session:
stmt = select(Job)
jobs = session.scalars(stmt).all()
if jobs:
st.markdown("""<h1 style="font-family: Garamond;text-indent: 20px;color:#008DFE;">Submit your job applications today!</h1>""",unsafe_allow_html=True)
st.caption(f"""<p style="color:red;">Create your profile and start applying for jobs today. We eagerly anticipate the opportunity to collaborate with you!<p>""",unsafe_allow_html=True)
else:
st.caption(f"""<p style="color:red;">There are currently no available job vacancies. Please check back later. We are eagerly anticipating the opportunity to begin working together.<p>""",unsafe_allow_html=True)
for job in jobs:
with st.expander(f"{job.job_id}: {job.post_name}"):
st.markdown(f"""<p style="font-family:'Garamond'"><b>Description</b>:
<br>{job.description}<br><br>
<b>Experience</b>:
<br>{job.min_experience} - {job.max_experience} year(s)<br><br>
<b>Responsibilities</b>:
<br>{job.responsibilities}<br><br>
<b>Primary Skills</b>:<br>
{job.primary_skills}</p>""",unsafe_allow_html=True)
if job.secondary_skills:
st.markdown(f"""<p style="font-family:'Garamond'"><b>Secondary Skills</b>:
<br>{job.secondary_skills}</p>""",unsafe_allow_html=True)
st.markdown(f"""<p style="font-family:'Garamond'"><b>Apply before</b>:
<br>{job.expires_at}</p>""",unsafe_allow_html=True)
post_jobs() |