-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfooter.php
181 lines (138 loc) · 4.47 KB
/
footer.php
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<?php
/**
* Theme Footer Section for our theme.
*
* Displays all of the footer section and closing of the #page div.
*
* @package ThemeGrill
* @subpackage Masonic
* @since 1.0
*/
?>
</div><!-- #page -->
<footer class="footer-background">
<div class="footer-content wrapper clear">
<div class="clear">
<?php if (is_active_sidebar('footer-sidebar-one')) { ?>
<div class="tg-one-third">
<?php
dynamic_sidebar('footer-sidebar-one');
?>
</div>
<?php } ?>
<?php if (is_active_sidebar('footer-sidebar-two')) { ?>
<div class="tg-one-third">
<?php
dynamic_sidebar('footer-sidebar-two');
?>
</div>
<?php } ?>
<?php if (is_active_sidebar('footer-sidebar-three')) { ?>
<div class="tg-one-third last">
<?php
dynamic_sidebar('footer-sidebar-three');
?>
</div>
<?php } ?>
</div>
<div class="copyright clear">
<p class="license">Content on this site is licensed under a <a target="_blank" href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License <?php _e('© ', 'masonic');echo date('Y'); ?></a></p>
<?php masonic_footer_copyright(); ?>
</div>
</div>
<div class="angled-background"></div>
</footer>
<?php wp_footer(); ?>
<?php if (get_current_blog_id() == 3):?>
<div class="modal-bg"></div>
<div class="content-modal">
<div class="content-modal-inner">
<h2></h2>
<h3></h3>
<div class="text-content"></div>
</div>
<div class="content-modal-close">
<i class="fa fa-times" aria-hidden="true"></i>
</div>
</div>
<script>
jQuery(document).ready(function () {
var contentLoaded = false;
var abstracts = {};
var currentId = null;
function loadContent() {
// Call talk and workshop abstract pages
jQuery.when(jQuery.get("https://rse.ac.uk/conf2018/talk-abstracts/"), jQuery.get("https://rse.ac.uk/conf2018/workshop-abstracts/")).done(function (t, w) {
data = [t[0], w[0]]
data.forEach(function (d) {
var page = jQuery(d);
var article = page.find("article.type-page")
var talks = article.find("details")
talks.each(function (index, talk) {
var talkData = {
"title": "",
"author": "",
"affiliation": "",
"abstract": "",
"image": {}
}
talkData.title = jQuery(talk).find("summary strong").text().trim()
talkData.slug = jQuery(talk).attr("id")
talkData.author = jQuery(talk).find("summary em").html().trim()
talkData.image = jQuery(talk).find("img").length > 0 ? {
"src": jQuery(talk).find("img")[0].src,
"content": jQuery(talk).find("img")[0].outerHTML
} : null
talkData.affiliation = jQuery(talk).find("summary > em").length > 1 ? jQuery(talk).find("summary em").eq(1).html().trim() : "";
talkData.abstract = jQuery(talk).find("blockquote").html()
abstracts[talkData.slug] = talkData
})
})
if (currentId) {
$modalContent.html(abstracts[currentId].abstract)
showModal();
}
contentLoaded = true;
})
}
$modalBg = jQuery(".modal-bg");
$modal = jQuery(".content-modal");
$modal.find(".content-modal-close").add($modalBg).on("click", function () {
hideModal()
})
$modalInner = $modal.find(".content-modal-inner")
$modalTitle = $modal.find(".content-modal-inner h2")
$modalAuthors = $modal.find(".content-modal-inner h3")
$modalContent = $modal.find(".content-modal-inner .text-content")
hideModal = function () {
jQuery("html").removeClass("abstract-modal-open");
$modal.hide()
$modalBg.hide()
}
showModal = function () {
jQuery("html").addClass("abstract-modal-open");
$modal.show()
$modalBg.show()
$modalInner.scrollTop(0);
}
$talkLinks = jQuery("[href^='/conf2018/talk-abstracts']");
$workshopLinks = jQuery("[href^='/conf2018/workshop-abstracts']");
$talkLinks.add($workshopLinks).on("click", function (e) {
e.preventDefault();
currentId = e.target.href.split("#")[1];
if (contentLoaded !== true) {
$modalTitle.text(jQuery(e.target).text())
$modalContent.html("Loading...")
showModal();
loadContent();
} else {
$modalTitle.text(jQuery(e.target).text())
$modalContent.html(abstracts[currentId].abstract)
showModal();
}
})
})
</script>
<?php endif; ?>
</body>
</html>