Skip to content

Commit e905a27

Browse files
authored
Merge pull request #385 from ComputerScienceHouse/develop
Update Packet Start Email, Zoom Photo, Alumni + Upperclassmen
2 parents 08cc65c + a3e9ead commit e905a27

File tree

5 files changed

+50
-10
lines changed

5 files changed

+50
-10
lines changed

packet/static/js/pfp-zoom.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
$(document).ready(function () {
2+
let photos = Array.from(document.querySelectorAll('.eval-user-img'))
3+
4+
top.onclick = function (e) {
5+
let tsib = e.target.previousElementSibling
6+
if (tsib != null) {
7+
if (tsib.classList.contains('eval-user-img')) {
8+
return;
9+
}
10+
}
11+
if (e.target.classList.contains('eval-user-img')) {
12+
return;
13+
}
14+
document.querySelector('#zoom-photo').remove()
15+
}
16+
17+
photos.forEach((photo) => {
18+
photo.addEventListener('click', (e) => {
19+
let other = document.querySelector('#zoom-photo')
20+
if (other != null) {
21+
other.remove()
22+
}
23+
photo.insertAdjacentHTML('afterend', `
24+
<div id="zoom-photo" style="position: fixed; z-index: 1050; display: block">
25+
<img class="eval-user-img"
26+
alt=${photo.alt}
27+
src=${photo.src}
28+
style="max-width: 200px; max-height: 200px; border: 1px solid #666"
29+
>
30+
</div>
31+
`)
32+
e.preventDefault();
33+
})
34+
})
35+
36+
})

packet/templates/active_packets.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ <h4 class="page-title">Active Packets</h4>
111111

112112
{% block scripts %}
113113
{{ super() }}
114+
<script src="{{ url_for('static', filename='js/pfp-zoom.min.js') }}"></script>
114115
{% if info.realm == "csh" %}
115116
<script src="{{ url_for('static', filename='js/tables.min.js') }}"></script>
116117
{% endif %}

packet/templates/mail/packet_start.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ <h2>Hello {{ packet.freshman.name }},</h2>
66
<h3>Welcome to Computer Science House!</h3>
77
<p>Soon you'll starting the introductory process for CSH, and the first part of that is Packet.</p>
88
<p>Your packet will start on <span class="badge">{{ packet.start.strftime('%A, %B %-d') }} at {{ packet.start.strftime('%-I:%M %p') }}</span></p>
9-
<p>You can view your packet at <a href="{{ config["PROTOCOL"] + config["PACKET_INTRO"] }}">{{ config["PACKET_INTRO"] }}</a> with
10-
the credentials you should have been sent.</p>
11-
<p>If you don't know your credentials, reach out to an <a href="mailto:[email protected]">RTP</a></p>
12-
<p>If you have any questions about Packet or the introductory process, email <a href="mailto:[email protected]">[email protected]</a></p>
13-
<p>If you have any questions about login credentials or any technical issues, email <a href="mailto:[email protected]">[email protected]</a></p>
9+
<p>You can view your packet at <a href="{{ config["PROTOCOL"] + config["PACKET_INTRO"] }}">{{ config["PACKET_INTRO"] }}</a> once you receive credentials.</p>
10+
<p>If it is <b>past the start date</b> and you have still not received credentials, please reach out to an <a href="mailto:[email protected]">RTP</a></p>
11+
<p>If it is <b>past the start date</b> and you have any questions about Packet or the introductory process, email <a href="mailto:[email protected]">[email protected]</a></p>
12+
<p>If it is <b>past the start date</b> and you have any questions about login credentials or any technical issues, email <a href="mailto:[email protected]">[email protected]</a></p>
1413
</div>
1514
{% endblock %}

packet/templates/mail/packet_start.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ Soon you'll starting the introductory process for CSH, and the first part of tha
66

77
Your packet will start on {{ packet.start.strftime('%A, %B %-d') }} at {{ packet.start.strftime('%-I:%M %p') }}
88

9-
You can view your packet at {{ config["PROTOCOL"] + config["PACKET_INTRO"] }} with the credentials you should have been sent.
10-
If you don't know your credentials, reach out to an RTP
9+
You can view your packet at {{ config["PROTOCOL"] + config["PACKET_INTRO"] }} once you receive credentials.
10+
If it is past the start date and you don't know your credentials, reach out to an RTP
1111

12-
If you have any questions about Packet or the introductory process, email [email protected]
12+
If it is past the start date and you have any questions about Packet or the introductory process, email [email protected]
1313

14-
If you have any questions about login credentials or any technical issues, email [email protected]
14+
If it is past the start date and you have any questions about login credentials or any technical issues, email [email protected]

packet/templates/packet.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ <h5>Total Score - {{ '%0.2f' % total_score }}%</h5>
5050
aria-valuemax="100" style="width: {{ total_score }}%"></div>
5151
</div>
5252
{% set upper_score = received.member_total / required.member_total * 100 %}
53-
<h5>Upperclassmen Score - {{ '%0.2f' % upper_score }}%</h5>
53+
<h5>Upperclassmen + Alumni Score - {{ '%0.2f' % upper_score }}%</h5>
5454
<div class="progress">
5555
<div class="progress-bar bg-warning progress-bar-striped progress-bar-animated"
5656
role="progressbar" aria-valuenow="{{ upper_score }}" aria-valuemin="0"
@@ -192,3 +192,7 @@ <h5>Upperclassmen Score - {{ '%0.2f' % upper_score }}%</h5>
192192
</div>
193193
</div>
194194
{% endblock %}
195+
{% block scripts %}
196+
{{ super() }}
197+
<script src="{{ url_for('static', filename='js/pfp-zoom.min.js') }}"></script>
198+
{% endblock %}

0 commit comments

Comments
 (0)