From f3377eb722ba1f68ebb944443727c955f321291d Mon Sep 17 00:00:00 2001 From: orson Date: Sat, 8 Mar 2025 15:29:24 -0600 Subject: [PATCH] added leaderboard and goodies --- app.py | 2 +- static/styles.css | 46 ++++++++++++-------- templates/add_pin.html | 4 +- templates/base.html | 69 +++++++++++------------------- templates/dashboard.html | 44 +++++++++++-------- templates/faq.html | 17 ++++++++ templates/index.html | 28 ++++++++++-- templates/leaderboard.html | 88 +++++++++++++++++++++++++------------- templates/nav.html | 61 ++++++++++++++++++++++++++ templates/quienes.html | 30 ++++++++++--- templates/secondbase.html | 5 ++- 11 files changed, 271 insertions(+), 123 deletions(-) create mode 100644 templates/faq.html create mode 100644 templates/nav.html diff --git a/app.py b/app.py index 9d13ca1..5bfee3b 100644 --- a/app.py +++ b/app.py @@ -119,7 +119,7 @@ def create_app(config=Config): def registrame(referral_code): inviter = mongo.db.users.find_one({"referral_code": referral_code}) if not inviter: - message = "Ooops, parece que nadie te invitó aquí" + message = "Ooops, parece que nadie te invitó aquí... Puedes saber más sobre esta decisión aquí https://baches.qro.mx/quienes#preguntas" return render_template('error.html', message = message), 406 if request.method == 'POST': diff --git a/static/styles.css b/static/styles.css index d74be33..bc06055 100644 --- a/static/styles.css +++ b/static/styles.css @@ -19,7 +19,7 @@ body, html { margin: 0; padding: 0; overflow: hidden; - height: 100%; + /* height: 100%; */ width: 100%; color: var(--text-color); } @@ -55,12 +55,12 @@ main { margin: 0; padding: 0; position: absolute; - top: 0; + top: 10vh; left: 0; display: flex; align-items: center; justify-content: center; - height: 100vh; + /* height: 100vh; */ width: 100vw; z-index: 5; } @@ -139,21 +139,29 @@ button { position: relative; overflow: hidden; background-color: var(--accent-color); + border: none; } button::after { content: ''; position: absolute; - height: 100%; - width: 100%; - top: 0; - left: -100%; - background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent); - transition: left 0.5s ease; + height: 150%; + width: 150%; + top: -25%; + left: -25%; + background: radial-gradient(circle, rgba(255,255,255,0.3) 100%, transparent 10.01%); + transform: scale(0); + opacity: 0; + transition: transform 0.3s ease, opacity 0.3s ease; +} + +button:hover { + background-color: rgba(255, 136, 0, 0.8); } button:hover::after { - left: 100%; + transform: scale(1); + opacity: 1; } #pinner-top { @@ -253,12 +261,15 @@ section#pinner-modal::-webkit-scrollbar-thumb { .leaflet-marker-icon:hover { transform: scale(1.2); } +.eaflet-popup-content { + width: 100%; +} .marker-cluster { - background-color: greenyellow !important; + background-color: rgb(249, 170, 61) !important; border-radius: 100px; - box-shadow: 0 0 10px rgba(172, 255, 47, 0.7); - animation: pulse 2s infinite; + box-shadow: 0 0 10px rgba(85, 38, 5, 0.7); + /* Animation removed as it was causing visibility issues */ } .fa, .far, .fas { @@ -291,17 +302,18 @@ section#pinner-modal::-webkit-scrollbar-thumb { 90% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-20px); } } + @keyframes fadeIn { 0% { opacity: 0; transform: translateY(0); } 90% { opacity: 1; transform: translateY(0); } } @keyframes pulse { - 0% { transform: scale(1); } - 50% { transform: scale(1.05); } - 100% { transform: scale(1); } +@keyframes pulse { + 0% { box-shadow: 0 0 10px rgba(172, 255, 47, 0.7); } + 50% { box-shadow: 0 0 15px rgba(172, 255, 47, 0.9); } + 100% { box-shadow: 0 0 10px rgba(172, 255, 47, 0.7); } } - /* Media queries for responsiveness */ @media (max-width: 768px) { section#pinner-modal { diff --git a/templates/add_pin.html b/templates/add_pin.html index a4f581d..a8d4fa0 100644 --- a/templates/add_pin.html +++ b/templates/add_pin.html @@ -1,6 +1,6 @@
- +{% if form %} {{ form.hidden_tag() }} + @@ -46,34 +47,7 @@ - + {% include 'nav.html' %} {% with messages = get_flashed_messages() %} {% if messages %} @@ -84,23 +58,23 @@ {% endif %} {% endwith %} -
+
-{% block content %} + {% block content %} -{% endblock %} - - {% else %} -
-

Seguramente quieres hacer login

-
- - {% endif %} + {% endblock %} + + {% else %} +
+

Seguramente quieres hacer login

+
+ + {% endif %} -
+
- + diff --git a/templates/dashboard.html b/templates/dashboard.html index 29a0673..d0bce47 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -7,11 +7,11 @@ overflow-y: scroll; } -
+

Hola {{current_user.username}}

Aquí puedes ver los pines que has agregado y consultar tu enlace/QR de invitación. Cada vez que recargas esta página, tu enlace de invitacón cambia y el anterior se vuelve inválido.

-
+
diff --git a/templates/leaderboard.html b/templates/leaderboard.html index 67d3304..a503039 100644 --- a/templates/leaderboard.html +++ b/templates/leaderboard.html @@ -1,29 +1,44 @@ {% extends 'secondbase.html' %} {% block content %} -
-

Aquí puedes consultar quiénes están contribuyendo. Por cuestiones de privacidad, los nombres están modificados, pero si sabes, sabes

-
-
- - - - - - - - - {% for leader in leaders %} - - - - - {% endfor %} - -
MapistaMarcador
{{leader.username}}{{leader.count}}
-
-

Porcentaje de usuarios activos

-
- +
+ +
+

¡Hazte mapista y pon tu granito de fotoevidencia!

+

Cada contribución cuenta. Mira lo que estamos logrando y sé parte del cambio.

+
+ + +
+ +
+
+ + + + + + + + + {% for leader in leaders %} + + + + + {% endfor %} + +
MapistaMarcador
{{leader.username}}{{leader.count}}
+
+
+ + +
+

Porcentaje de usuarios activos

+
+ +
+
+