|
import streamlit as st |
|
import requests |
|
|
|
|
|
st.set_page_config( |
|
page_title="HUMANOPS - Automatizaci贸n con Alma", |
|
layout="centered", |
|
) |
|
|
|
|
|
page_bg_img = """ |
|
<style> |
|
body { |
|
background: linear-gradient(135deg, #74ebd5, #ACB6E5); |
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; |
|
color: #ffffff; |
|
} |
|
h1, h2, h3 { |
|
text-align: center; |
|
margin-top: 1.5rem; |
|
margin-bottom: 1rem; |
|
} |
|
.form-container { |
|
background: rgba(255,255,255,0.15); |
|
padding: 30px; |
|
border-radius: 12px; |
|
max-width: 500px; |
|
margin: 2rem auto; |
|
} |
|
label { |
|
font-weight: bold; |
|
margin-top: 1rem; |
|
display: block; |
|
} |
|
.stTextInput, .stTextArea { |
|
margin-top: 0.5rem; |
|
} |
|
.submit-button { |
|
margin-top: 1.5rem; |
|
background-color: #ffffff; |
|
color: #4a90e2; |
|
padding: 0.7rem 1.5rem; |
|
font-size: 1rem; |
|
font-weight: bold; |
|
border: none; |
|
border-radius: 8px; |
|
cursor: pointer; |
|
transition: background 0.3s; |
|
} |
|
.submit-button:hover { |
|
background-color: #f0f0f0; |
|
} |
|
.success { |
|
text-align: center; |
|
margin-top: 1rem; |
|
font-weight: bold; |
|
color: #fdfdfd; |
|
} |
|
</style> |
|
""" |
|
st.markdown(page_bg_img, unsafe_allow_html=True) |
|
|
|
|
|
st.title("HUMANOPS") |
|
st.subheader("Automatizaci贸n con alma para tu empresa") |
|
|
|
|
|
with st.container(): |
|
st.markdown("<div class='form-container'>", unsafe_allow_html=True) |
|
st.write("Complet谩 tus datos y descubr铆 c贸mo HUMANOPS puede transformar tu organizaci贸n.") |
|
|
|
|
|
with st.form(key="contact_form"): |
|
nombre = st.text_input("Nombre") |
|
email = st.text_input("Email") |
|
mensaje = st.text_area("Mensaje (contanos sobre tu empresa)") |
|
|
|
|
|
submit_button = st.form_submit_button(label="Enviar", help="Env铆a tus datos") |
|
|
|
st.markdown("</div>", unsafe_allow_html=True) |
|
|
|
|
|
if submit_button: |
|
if nombre and email and mensaje: |
|
|
|
data = { |
|
"nombre": nombre, |
|
"email": email, |
|
"mensaje": mensaje |
|
} |
|
|
|
webhook_url = "https://hook.us2.make.com/f5q1azqgpjaoaf1wdo5o2phe093csrbr" |
|
try: |
|
response = requests.post(webhook_url, data=data) |
|
if response.status_code == 200: |
|
st.success("隆Gracias! Tus datos se enviaron correctamente.") |
|
else: |
|
st.error(f"Error al enviar los datos. C贸digo de estado: {response.status_code}") |
|
except Exception as e: |
|
st.error(f"Ocurri贸 un error al enviar la informaci贸n: {e}") |
|
else: |
|
st.warning("Por favor, complet谩 todos los campos antes de enviar.") |
|
|
|
|