From e3f659cac8fa6b87e9919c97f122348d73e87ca7 Mon Sep 17 00:00:00 2001 From: hack_25032030_dc7c14 <25032030@itcelaya.edu.mx> Date: Fri, 22 May 2026 17:57:48 -0600 Subject: [PATCH] Agrego guia, reportes y alertas con menu de navegacion --- __pycache__/main.cpython-314.pyc | Bin 0 -> 2417 bytes alertas.html | 135 +++++++++++++++++++++++++++++++ guia.html | 100 +++++++++++++++++++++++ main.py | 29 +++++++ reportes.html | 109 +++++++++++++++++++++++++ 5 files changed, 373 insertions(+) create mode 100644 __pycache__/main.cpython-314.pyc create mode 100644 alertas.html create mode 100644 guia.html create mode 100644 main.py create mode 100644 reportes.html diff --git a/__pycache__/main.cpython-314.pyc b/__pycache__/main.cpython-314.pyc new file mode 100644 index 0000000000000000000000000000000000000000..34e9677c14d920ddf6cde983a2c191b142c7d601 GIT binary patch literal 2417 zcmdT`%}*Og6rb4-+Y7dVG}I)7;DnIK1aNH3N0T-ZYG{l^h_h)^Ra#;#_81oIU3Ye! zrkqSuDO9c0w2=zxi9-*`t!gjan?HbxMntPbP1RnwC8bi-ocd&v;FU>rZt)wxBW8txI#=T zhV5Yb{Yw)vG0TQ-5*P>aszofVL>9#OOhr>+DokBNG$&TS*ujEF?}gktU}+&eaMjLIU}#>Gn4l@TQJH* zw*^YnJg9KNWC=v={JUqB4@^Q$#iC@+P%i7_0@ZF1q&jn zngI)wzQpi!A(E5{Hfi<0?eAEtWq_n z89IFfeq4grJPoXh{*ppV^D6`QBAZg;p_KUX%A=;{uWx*DMGLwC|Bsr5 z-I}?cv<)(6yKYy>^p)JbiWqC z5UOz0uX7`xBb0}^Bj^gA#WGevQ=>QrnBumWkL{-(Hc@;tI`+7=V_ErDxqE%HwfEQ7-u1qBHd@bD$CgelPCgcbw=XYVzBBflaQIQM zbv-h?7J1P1VD^{3^~TJ)ka_M$p=1A=3_w0RINFQ9!=pXI@+cE0V`1B0fO`>kGG!aq z*>!e{JJs*qeI{jpFWk%_LCRWY^E1S9P}{*C=QP + + + + + Configurar alertas + + + +
+

Configurar alertas

+

Elige cuándo quieres recibir notificaciones

+
+ +
+ 🔔 Las alertas te ayudan a sacar la basura a tiempo sin esperar afuera. +
+ +
+
+
+
🚛
+
+ Ruta por iniciar + Aviso cuando el camión salga del depósito +
+
+ +
+
+
+
📍
+
+ Camión aproximándose + Aviso 15 minutos antes de llegar +
+
+ +
+
+
+
⚠️
+
+ Retrasos o fallas + Aviso si el camión tiene un problema +
+
+ +
+
+
+
🌙
+
+ Ruta nocturna + Servicio especial desde las 10:00 p.m. +
+
+ +
+
+
✅ Preferencias guardadas correctamente
+ + + + + + + + + diff --git a/guia.html b/guia.html new file mode 100644 index 0000000..418c52e --- /dev/null +++ b/guia.html @@ -0,0 +1,100 @@ + + + + + + Guía de Separación de Residuos + + + +
+

Guía de separación

+

Aprende a clasificar tus residuos correctamente

+
+ +
+
+
🌿
+
Orgánicos
+
Se descomponen naturalmente
+ Cáscaras de fruta + Restos de comida + Café y té + Cáscaras de huevo +
+
+
♻️
+
Reciclables
+
Limpios y secos
+ Botellas PET + Latas de aluminio + Cartón limpio + Vidrio +
+
+
🚫
+
Sanitarios
+
No se reciclan
+ Pañales + Toallas sanitarias + Cubrebocas + Papel higiénico +
+
+
⚠️
+
Especiales
+
Requieren manejo especial
+ Pilas y baterías + Medicamentos + Electrónicos + Aceite usado +
+
+
+ ⏰ Saca tu basura solo cuando recibas la alerta. No persigas al camión. +
+ + + + \ No newline at end of file diff --git a/main.py b/main.py new file mode 100644 index 0000000..77ab744 --- /dev/null +++ b/main.py @@ -0,0 +1,29 @@ +from fastapi import FastAPI, Request +from fastapi.responses import HTMLResponse +from datetime import datetime + +app = FastAPI() + +reportes = [] + +@app.get("/guia", response_class=HTMLResponse) +def guia_separacion(): + with open("guia.html", "r", encoding="utf-8") as f: + return f.read() + +@app.get("/reportes", response_class=HTMLResponse) +def pagina_reportes(): + with open("reportes.html", "r", encoding="utf-8") as f: + return f.read() + +@app.get("/alertas", response_class=HTMLResponse) +def pagina_alertas(): + with open("alertas.html", "r", encoding="utf-8") as f: + return f.read() + +@app.post("/api/reportes") +async def recibir_reporte(request: Request): + datos = await request.json() + datos["fecha"] = datetime.now().strftime("%d/%m/%Y %H:%M") + reportes.append(datos) + return {"mensaje": "Reporte recibido correctamente", "total": len(reportes)} \ No newline at end of file diff --git a/reportes.html b/reportes.html new file mode 100644 index 0000000..8a0cdb5 --- /dev/null +++ b/reportes.html @@ -0,0 +1,109 @@ + + + + + + Reportar incidencia + + + + +
+

Buzón de reportes

+

Ayúdanos a mejorar el servicio

+
+ +
+ ⏰ Recuerda: solo saca la basura cuando recibas la alerta de llegada. +
+ +
+ + + + + + + + + + +
+ +
+
+

¡Reporte enviado!

+

Gracias por ayudarnos a mejorar el servicio de recolección.

+ +
+ + + + + + \ No newline at end of file