Spaces:
Sleeping
Sleeping
import streamlit as st | |
def main(): | |
# Custom CSS for Contact page | |
st.markdown(""" | |
<style> | |
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap'); | |
.stApp { | |
font-family: 'Poppins', sans-serif; | |
background: #f8fafc; | |
min-height: 100vh; | |
color: #1a202c; | |
} | |
#MainMenu {visibility: visible;} | |
footer {visibility: hidden;} | |
.stDeployButton {display: none;} | |
header {visibility: hidden;} | |
.stApp > header {visibility: hidden;} | |
.container { | |
max-width: 1200px; | |
margin: 0 auto; | |
padding: 1.5rem; | |
} | |
.header { | |
padding: 1.5rem 0; | |
text-align: center; | |
} | |
.header-title { | |
font-size: 2.5rem; | |
font-weight: 700; | |
color: #1a202c; | |
display: inline-flex; | |
align-items: center; | |
gap: 0.5rem; | |
} | |
.section { | |
margin-bottom: 2rem; | |
} | |
.section-title { | |
font-size: 2rem; | |
font-weight: 600; | |
color: #1a202c; | |
margin-bottom: 0.5rem; | |
display: flex; | |
align-items: center; | |
gap: 0.5rem; | |
} | |
.section-text { | |
font-size: 1.1rem; | |
color: #4a5568; | |
line-height: 1.5; | |
max-width: 800px; | |
margin: 0 auto; | |
} | |
.contact-container { | |
display: flex; | |
gap: 2rem; | |
flex-wrap: wrap; | |
} | |
.contact-form { | |
flex: 1; | |
min-width: 300px; | |
} | |
.map-container { | |
flex: 1; | |
min-width: 300px; | |
} | |
.map-container iframe { | |
width: 100%; | |
height: 400px; | |
border: none; | |
border-radius: 8px; | |
} | |
.stTextInput > div > div > input, | |
.stTextArea > div > div > textarea { | |
border-radius: 8px !important; | |
border: 1px solid #d1d5db !important; | |
padding: 1rem !important; | |
font-size: 1.1rem !important; | |
font-family: 'Poppins', sans-serif !important; | |
background: #ffffff !important; | |
transition: all 0.2s ease !important; | |
} | |
.stTextInput > div > div > input:focus, | |
.stTextArea > div > div > textarea:focus { | |
border-color: #6366f1 !important; | |
box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1) !important; | |
outline: none !important; | |
} | |
.stTextInput > div > div > input::placeholder, | |
.stTextArea > div > div > textarea::placeholder { | |
color: #9ca3af !important; | |
} | |
.stButton > button { | |
background: #6366f1 !important; | |
color: white !important; | |
border-radius: 8px !important; | |
padding: 0.75rem 2rem !important; | |
font-size: 1.1rem !important; | |
font-weight: 600 !important; | |
font-family: 'Poppins', sans-serif !important; | |
transition: all 0.2s ease !important; | |
border: none !important; | |
width: 100% !important; | |
} | |
.stButton > button:hover { | |
background: #4f46e5 !important; | |
transform: translateY(-1px) !important; | |
} | |
.stSidebar { | |
background: #ffffff; | |
border-right: 1px solid #e5e7eb; | |
} | |
.stSidebar .sidebar-content { | |
padding: 1rem; | |
} | |
</style> | |
""", unsafe_allow_html=True) | |
# Header | |
st.markdown(""" | |
<div class="header"> | |
<div class="container"> | |
<h1 class="header-title">π‘οΈ TruthCheck</h1> | |
</div> | |
</div> | |
""", unsafe_allow_html=True) | |
# Contact Content | |
st.markdown(""" | |
<div class="container"> | |
<div class="section"> | |
<h2 class="section-title">π¬ Get in Touch</h2> | |
<p class="section-text"> | |
Have questions or feedback? Reach out to us via the form below or visit our office. We're here to help! | |
</p> | |
</div> | |
<div class="contact-container"> | |
<div class="contact-form"> | |
<h3 class="section-title">π© Contact Form</h3> | |
""", unsafe_allow_html=True) | |
# Contact Form | |
with st.form(key="contact_form"): | |
name = st.text_input("Name", placeholder="Your full name") | |
email = st.text_input("Email", placeholder="Your email address") | |
message = st.text_area("Message", placeholder="Your message or inquiry", height=150) | |
submit_button = st.form_submit_button("Send Message") | |
if submit_button: | |
if name and email and message: | |
st.success("Thank you for your message! We'll get back to you soon.") | |
else: | |
st.error("Please fill out all fields before submitting.") | |
st.markdown(""" | |
</div> | |
<div class="map-container"> | |
<h3 class="section-title">π Our Location</h3> | |
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3151.835434509374!2d144.9537363153167!3d-37.81627927975195!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x6ad642af0f11fd81%3A0xf577d9d9a9a9a9a9!2sMelbourne%20VIC%2C%20Australia!5e0!3m2!1sen!2sus!4v1634567891234" allowfullscreen="" loading="lazy"></iframe> | |
</div> | |
</div> | |
</div> | |
""", unsafe_allow_html=True) | |
if __name__ == "__main__": | |
main() |