From 1bb15a8bf26a662812d99ed4699888222cb659c0 Mon Sep 17 00:00:00 2001 From: Tyler Allen Date: Fri, 29 Aug 2025 22:47:11 -0400 Subject: [PATCH 1/2] Zoom photo --- packet/static/js/active-packets.js | 36 ++++++++++++++++++++++++++++ packet/templates/active_packets.html | 1 + 2 files changed, 37 insertions(+) create mode 100644 packet/static/js/active-packets.js diff --git a/packet/static/js/active-packets.js b/packet/static/js/active-packets.js new file mode 100644 index 0000000..3e80b5f --- /dev/null +++ b/packet/static/js/active-packets.js @@ -0,0 +1,36 @@ +$(document).ready(function () { + let photos = Array.from(document.querySelectorAll('.eval-user-img')) + + top.onclick = function (e) { + let tsib = e.target.previousElementSibling + if (tsib != null) { + if (tsib.classList.contains('eval-user-img')) { + return; + } + } + if (e.target.classList.contains('eval-user-img')) { + return; + } + document.querySelector('#zoom-photo').remove() + } + + photos.forEach((photo) => { + photo.addEventListener('click', (e) => { + let other = document.querySelector('#zoom-photo') + if (other != null) { + other.remove() + } + photo.insertAdjacentHTML('afterend', ` +
+ ${photo.alt} +
+ `) + e.preventDefault(); + }) + }) + +}) \ No newline at end of file diff --git a/packet/templates/active_packets.html b/packet/templates/active_packets.html index 3fa6564..62f7fe8 100644 --- a/packet/templates/active_packets.html +++ b/packet/templates/active_packets.html @@ -111,6 +111,7 @@

Active Packets

{% block scripts %} {{ super() }} + {% if info.realm == "csh" %} {% endif %} From f42f65382539d4b45f940d9d25a4c2596b086abf Mon Sep 17 00:00:00 2001 From: Tyler Allen Date: Fri, 29 Aug 2025 23:03:21 -0400 Subject: [PATCH 2/2] add to packets too --- packet/static/js/{active-packets.js => pfp-zoom.js} | 0 packet/templates/active_packets.html | 2 +- packet/templates/packet.html | 4 ++++ 3 files changed, 5 insertions(+), 1 deletion(-) rename packet/static/js/{active-packets.js => pfp-zoom.js} (100%) diff --git a/packet/static/js/active-packets.js b/packet/static/js/pfp-zoom.js similarity index 100% rename from packet/static/js/active-packets.js rename to packet/static/js/pfp-zoom.js diff --git a/packet/templates/active_packets.html b/packet/templates/active_packets.html index 62f7fe8..d2c95e2 100644 --- a/packet/templates/active_packets.html +++ b/packet/templates/active_packets.html @@ -111,7 +111,7 @@

Active Packets

{% block scripts %} {{ super() }} - + {% if info.realm == "csh" %} {% endif %} diff --git a/packet/templates/packet.html b/packet/templates/packet.html index 5445f10..2d5a7a4 100644 --- a/packet/templates/packet.html +++ b/packet/templates/packet.html @@ -192,3 +192,7 @@
Upperclassmen Score - {{ '%0.2f' % upper_score }}%
{% endblock %} +{% block scripts %} + {{ super() }} + +{% endblock %} \ No newline at end of file