Skip to content

Commit 51ecf62

Browse files
committed
depuration code
1 parent 96dda73 commit 51ecf62

File tree

6 files changed

+147
-177
lines changed

6 files changed

+147
-177
lines changed

Dockerfile.backend

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
FROM python:3.9-slim-buster
1+
FROM python:3.11-slim-bookworm
22

33
WORKDIR /app
44

5-
RUN apt-get update && apt-get install -y --no-install-recommends
6-
build-essential
5+
RUN apt-get update && apt-get install -y --no-install-recommends \
6+
build-essential \
77
libpq-dev
88

99
COPY requirements.txt .
1010
RUN pip install --no-cache-dir -r requirements.txt
1111

1212
COPY src/ /app/src
13-
COPY wsgi.py .
1413

1514
EXPOSE 8000
1615

Dockerfile.frontend

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ FROM node:20-alpine AS builder
33
WORKDIR /app
44

55
COPY package.json package-lock.json vite.config.js ./
6+
COPY index.html .
7+
68
RUN npm install
79

810
COPY src/front/ ./src/front/

docker-compose.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
version: '3.8'
2-
31
services:
42
# Servicio del Backend (Python/Flask API)
53
server:
64
build:
7-
context: . # El contexto es la raíz, donde están todos los archivos
5+
context: . # El contexto es la raíz, donde están todos los archivos
86
dockerfile: Dockerfile.backend # Especifica qué Dockerfile usar
97
restart: always
108
env_file: ./.env
@@ -54,4 +52,4 @@ networks:
5452

5553
volumes:
5654
postgres-data:
57-
driver: local
55+
driver: local

src/front/components/BackendURL.jsx

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/front/components/HeaderContact.jsx

Lines changed: 140 additions & 140 deletions
Original file line numberDiff line numberDiff line change
@@ -61,164 +61,164 @@ const HeaderContact = () => {
6161

6262
return (
6363
<>
64-
<section className="header w-100 h-100 position-relative ">
65-
<img
66-
src={HomeContact}
67-
alt="CloudTech background image"
68-
className="z-n1 mx-auto position-absolute w-100 h-100 object-fit-cover d-sm-block mb-5" />
69-
70-
<div className="position-absolute w-100 h-100 bg-dark bg-opacity-50 mx-auto"></div>
71-
<div className="container w-100 h-100 py-2">
72-
<div className="row align-items-center justify-content-center justify-content-lg-end mb-5">
73-
<div className="col-12 col-lg-6 z-1 align-items-center pt-5 mt-5 pt-lg-0 mt-lg-3">
74-
<h1 className="hero-title-home display-4 fw-bolder w-100 mt-2 text-lg-center text-center d-none d-lg-block">
75-
{t('contact.sectionTitle')}
76-
</h1>
77-
78-
<h1 className="hero-title-home display-4 fw-bolder w-100 mt-5 text-center d-lg-none">
79-
{t('contact.sectionTitle')}
80-
</h1>
81-
82-
<p className="hero-subtitle-home fs-5 text-white fw-bold w-100 mb-4 d-none d-lg-block text-lg-center">
83-
{t('contact.sectionDescription')}
84-
</p>
85-
86-
<p className="hero-subtitle-home fs-5 text-white fw-bold w-100 mb-4 text-center d-lg-none">
87-
{t('contact.sectionDescription')}
88-
</p>
89-
90-
<form onSubmit={handleSubmit} noValidate className="text-start">
91-
<div className="mb-3">
92-
<label htmlFor="name" className="form-label fw-bold form-label-contact">
93-
{t('contact.labels.nameLabel')}
94-
</label>
95-
96-
<input
97-
type="text"
98-
className={`form-control rounded-3 ${status === 'error' && error?.name ? 'is-invalid' : ''}`}
99-
id="name" name="name" value={formData.name} onChange={handleChange}
100-
placeholder={t('contact.placeholders.nameHolder')}
101-
required
102-
/>
103-
{status === 'error' && error?.name && <div className="invalid-feedback fw-bold">{error.name}</div>}
104-
</div>
105-
106-
<div className="row mb-3">
107-
<div className="col-6">
108-
<label
109-
htmlFor="phone"
110-
className="form-label fw-bold form-label-contact">
111-
{t('contact.labels.phoneLabel')}
64+
<section className="header w-100 h-100 position-relative ">
65+
<img
66+
src={HomeContact}
67+
alt="CloudTech background image"
68+
className="z-n1 mx-auto position-absolute w-100 h-100 object-fit-cover d-sm-block mb-5" />
69+
70+
<div className="position-absolute w-100 h-100 bg-dark bg-opacity-50 mx-auto"></div>
71+
<div className="container w-100 h-100 py-2">
72+
<div className="row align-items-center justify-content-center justify-content-lg-end mb-5">
73+
<div className="col-12 col-lg-6 z-1 align-items-center pt-5 mt-5 pt-lg-0 mt-lg-3">
74+
<h1 className="hero-title-home display-4 fw-bolder w-100 mt-2 text-lg-center text-center d-none d-lg-block">
75+
{t('contact.sectionTitle')}
76+
</h1>
77+
78+
<h1 className="hero-title-home display-4 fw-bolder w-100 mt-5 text-center d-lg-none">
79+
{t('contact.sectionTitle')}
80+
</h1>
81+
82+
<p className="hero-subtitle-home fs-5 text-white fw-bold w-100 mb-4 d-none d-lg-block text-lg-center">
83+
{t('contact.sectionDescription')}
84+
</p>
85+
86+
<p className="hero-subtitle-home fs-5 text-white fw-bold w-100 mb-4 text-center d-lg-none">
87+
{t('contact.sectionDescription')}
88+
</p>
89+
90+
<form onSubmit={handleSubmit} noValidate className="text-start">
91+
<div className="mb-3">
92+
<label htmlFor="name" className="form-label fw-bold form-label-contact">
93+
{t('contact.labels.nameLabel')}
11294
</label>
11395

11496
<input
115-
type="tel"
116-
className={`form-control rounded-3 ${status === 'error' && error?.phone ? 'is-invalid' : ''}`}
117-
id="phone" name="phone"
118-
value={formData.phone}
119-
onChange={handleChange}
120-
placeholder={t('contact.placeholders.phoneHolder')}
97+
type="text"
98+
className={`form-control rounded-3 ${status === 'error' && error?.name ? 'is-invalid' : ''}`}
99+
id="name" name="name" value={formData.name} onChange={handleChange}
100+
placeholder={t('contact.placeholders.nameHolder')}
121101
required
122102
/>
103+
{status === 'error' && error?.name && <div className="invalid-feedback fw-bold">{error.name}</div>}
104+
</div>
123105

124-
{status === 'error' && error?.phone &&
125-
<div className="invalid-feedback fw-bold">{error.phone}</div>}
106+
<div className="row mb-3">
107+
<div className="col-6">
108+
<label
109+
htmlFor="phone"
110+
className="form-label fw-bold form-label-contact">
111+
{t('contact.labels.phoneLabel')}
112+
</label>
113+
114+
<input
115+
type="tel"
116+
className={`form-control rounded-3 ${status === 'error' && error?.phone ? 'is-invalid' : ''}`}
117+
id="phone" name="phone"
118+
value={formData.phone}
119+
onChange={handleChange}
120+
placeholder={t('contact.placeholders.phoneHolder')}
121+
required
122+
/>
123+
124+
{status === 'error' && error?.phone &&
125+
<div className="invalid-feedback fw-bold">{error.phone}</div>}
126+
</div>
127+
128+
<div className="col-6">
129+
<label htmlFor="email" className="form-label fw-bold form-label-contact">
130+
{t('contact.labels.emailLabel')}
131+
</label>
132+
133+
<input
134+
type="email"
135+
className={`form-control rounded-3 ${status === 'error' && error?.email ? 'is-invalid' : ''}`}
136+
id="email" name="email"
137+
value={formData.email}
138+
onChange={handleChange}
139+
placeholder={t('contact.placeholders.emailHolder')}
140+
required
141+
/>
142+
143+
{status === 'error' && error?.email &&
144+
<div className="invalid-feedback fw-bold">{error.email}</div>}
145+
</div>
126146
</div>
127147

128-
<div className="col-6">
129-
<label htmlFor="email" className="form-label fw-bold form-label-contact">
130-
{t('contact.labels.emailLabel')}
148+
<div className="mb-3">
149+
<label
150+
htmlFor="company"
151+
className="form-label fw-bold form-label-contact">
152+
{t('contact.labels.projectNameLabel')}
131153
</label>
132154

133155
<input
134-
type="email"
135-
className={`form-control rounded-3 ${status === 'error' && error?.email ? 'is-invalid' : ''}`}
136-
id="email" name="email"
137-
value={formData.email}
156+
type="text"
157+
className="form-control rounded-3"
158+
id="company" name="company"
159+
value={formData.company}
138160
onChange={handleChange}
139-
placeholder={t('contact.placeholders.emailHolder')}
140-
required
161+
placeholder={t('contact.placeholders.projectHolder')}
141162
/>
163+
</div>
164+
165+
<div className="mb-4">
166+
<label
167+
htmlFor="message"
168+
className="form-label fw-bold form-label-contact">
169+
{t('contact.labels.messageLabel')}
170+
</label>
171+
172+
<textarea
173+
className="form-control textarea-contact rounded-3"
174+
id="message"
175+
name="message"
176+
rows="4"
177+
value={formData.message}
178+
onChange={handleChange}
179+
placeholder={t('contact.placeholders.messageHolder')}
180+
>
181+
</textarea>
182+
</div>
142183

143-
{status === 'error' && error?.email &&
144-
<div className="invalid-feedback fw-bold">{error.email}</div>}
184+
{status === 'success' &&
185+
<div className="alert alert-success">
186+
{t('contact.alerts.alertSuccess')}
187+
</div>}
188+
189+
{status === 'error' && error?.general &&
190+
<div className="alert alert-danger">
191+
{t('contact.alerts.alertError')}
192+
</div>}
193+
194+
195+
<div className="d-flex flex-column flex-lg-row gap-3">
196+
<button
197+
type="submit"
198+
className="btn btn-submit-contact fw-semibold btn-lg rounded-pill px-5"
199+
disabled={status === 'loading'}
200+
>
201+
{status === 'loading' ? `${t('contact.alerts.loading')}` : `${t('contact.formButton')}`}
202+
</button>
203+
<a
204+
href="https://wa.me/593978879838"
205+
target="_blank"
206+
rel="noopener noreferrer"
207+
className="btn btn-outline btn-lg rounded-pill px-5 w-100"
208+
>
209+
{t('contact.whatsAppButton')} <FontAwesomeIcon icon={faWhatsapp} />
210+
</a>
145211
</div>
146-
</div>
147-
148-
<div className="mb-3">
149-
<label
150-
htmlFor="company"
151-
className="form-label fw-bold form-label-contact">
152-
{t('contact.labels.projectNameLabel')}
153-
</label>
154-
155-
<input
156-
type="text"
157-
className="form-control rounded-3"
158-
id="company" name="company"
159-
value={formData.company}
160-
onChange={handleChange}
161-
placeholder={t('contact.placeholders.projectHolder')}
162-
/>
163-
</div>
164-
165-
<div className="mb-4">
166-
<label
167-
htmlFor="message"
168-
className="form-label fw-bold form-label-contact">
169-
{t('contact.labels.messageLabel')}
170-
</label>
171-
172-
<textarea
173-
className="form-control textarea-contact rounded-3"
174-
id="message"
175-
name="message"
176-
rows="4"
177-
value={formData.message}
178-
onChange={handleChange}
179-
placeholder={t('contact.placeholders.messageHolder')}
180-
>
181-
</textarea>
182-
</div>
183-
184-
{status === 'success' &&
185-
<div className="alert alert-success">
186-
{t('contact.alerts.alertSuccess')}
187-
</div>}
188-
189-
{status === 'error' && error?.general &&
190-
<div className="alert alert-danger">
191-
{t('contact.alerts.alertError')}
192-
</div>}
193-
194-
195-
<div className="d-flex flex-column flex-lg-row gap-3">
196-
<button
197-
type="submit"
198-
className="btn btn-submit-contact fw-semibold btn-lg rounded-pill px-5"
199-
disabled={status === 'loading'}
200-
>
201-
{status === 'loading' ? `${t('contact.alerts.loading')}` : `${t('contact.formButton')}`}
202-
</button>
203-
<a
204-
href="https://wa.me/593978879838"
205-
target="_blank"
206-
rel="noopener noreferrer"
207-
className="btn btn-outline btn-lg rounded-pill px-5 w-100"
208-
>
209-
{t('contact.whatsAppButton')} <FontAwesomeIcon icon={faWhatsapp} />
210-
</a>
211-
</div>
212-
</form>
212+
</form>
213213

214+
</div>
214215
</div>
215-
</div>
216+
</div>
217+
</section>
218+
<div className="h-100 mb-4">
219+
<br />
216220
</div>
217-
</section>
218-
<div className="h-100 mb-4">
219-
<br/>
220-
</div>
221-
</>
221+
</>
222222
);
223223
};
224224

0 commit comments

Comments
 (0)