-
Notifications
You must be signed in to change notification settings - Fork 1
/
education.html
77 lines (69 loc) · 3.07 KB
/
education.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
---
layout: detailpage
permalink: /education/
title: "Education"
description: Looking for which classes I'm taking, I've taken, and I plan on taking? Look no further! Click on any of the classes below to learn more.
---
{% for degree in site.data.classes %}
<h1>{{ degree.degree }}</h1>
{% for term in degree.terms %}
<div class="block">
<h3>{{ term.term }}</h3>
<div class="class_list transition">
{% for class in term.classes %}
<div id="{{ class.number | replace: ' ', '-' }}" class="class transition {{ class.dept }}">
<div class="upper transition">
<span class="number">{{ class.number }}</span>
<span class="name">{{ class.name }}</span>
</div>
<div class="lower transition">
<div>
<span class="number">{{ class.number }}</span>
<span class="name">{{ class.name }}</span>
</div>
<div class="metadata">
{{ class.dept }}{% if class.type %} | {{ class.type }}{% endif %} | {% if class.units %} {{ class.units }} {% else %} 12 {% endif %} units
</div>
</div>
</div>
{% endfor %}
</div>
</div>
{% endfor %}
{% endfor %}
<div id="class_overlay" class="overlay" style="display: none;">
{% for degree in site.data.classes %}
{% for term in degree.terms %}
{% for class in term.classes %}
<div id="{{ class.number | replace: ' ', '-' }}_overlay" class="class_popup" style="display: none;">
<div class="title">
<span class="number">{{ class.number }}: </span>
<span class="name">{{ class.name }}</span>
</div>
<div class="metadata">
{{ class.dept }}{% if class.type %} | {{ class.type }}{% endif %} | {% if class.units %} {{ class.units }} {% else %} 12 {% endif %} units
</div>
<div class="description">
{{ class.description }}
</div>
<div style="text-align: center; margin-top: 12px">
<div class="button inline transition gray">close</div>
</div>
</div>
{% endfor %}
{% endfor %}
{% endfor %}
</div>
<script>
var open_thing = '';
$(".class").click(function() {
$("#class_overlay").css("display", "block");
console.log("#" + $(this).attr('id') + "_overlay");
open_selector = "#" + $(this).attr('id').replace('\.', '\\\.') + "_overlay";
$(open_selector).css("display", "block");
});
$("#class_overlay").click(function() {
$("#class_overlay").css("display", "none");
$(open_selector).css("display", "none");
});
</script>