File size: 2,861 Bytes
8a12600
caa5404
8a12600
caa5404
 
 
 
8a12600
 
caa5404
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8a12600
caa5404
 
 
8a12600
caa5404
8a12600
caa5404
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
import streamlit as st
import requests

# Configuraci贸n inicial de la p谩gina
st.set_page_config(
    page_title="HUMANOPS - Automatizaci贸n con Alma",
    layout="centered",
)

# Estilos CSS para mejorar la apariencia
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)

# T铆tulo principal
st.title("HUMANOPS")
st.subheader("Automatizaci贸n con alma para tu empresa")

# Contenedor para el formulario
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.")

    # Creamos un formulario en Streamlit
    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)")

        # Bot贸n de env铆o
        submit_button = st.form_submit_button(label="Enviar", help="Env铆a tus datos")
    
    st.markdown("</div>", unsafe_allow_html=True)

# L贸gica de env铆o al webhook
if submit_button:
    if nombre and email and mensaje:
        # Datos a enviar al webhook
        data = {
            "nombre": nombre,
            "email": email,
            "mensaje": mensaje
        }
        # Hacemos la petici贸n POST
        webhook_url = "https://hook.us2.make.com/f5q1azqgpjaoaf1wdo5o2phe093csrbr"  # REEMPLAZ脕 ESTA L脥NEA
        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.")