-
Notifications
You must be signed in to change notification settings - Fork 302
/
Copy pathhead_custom.html
56 lines (48 loc) · 1.99 KB
/
head_custom.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
{% assign math = page.math | default: layout.math | default: site.math %}
{% case math %}
{% when "mathjax" %}
{% include mathjax.html %}
{% endcase %}
<script>
function toggleScript() {
const button = document.getElementById('toggle-script');
const script = document.getElementById('script');
if (script.style.display === 'none') {
script.style.display = 'block';
button.innerHTML = 'Hide Script';
} else {
script.style.display = 'none';
button.innerHTML = 'Show Script';
}
}
function expand() {
const container = document.querySelector('.tabcontainer');
const button = document.querySelector('.expand');
const expandedHeight = "auto";
if (container.style.height === expandedHeight) {
container.style.height = "250px";
button.innerHTML = 'Show full evalscript <span class="chevron bottom"></span>';
document.documentElement.style.setProperty("--fade-height", "100px");
} else {
container.style.height = expandedHeight;
button.innerHTML = 'Collapse evalscript <span class="chevron up"></span>';
document.documentElement.style.setProperty("--fade-height", "60px");
}
}
function openTab(evt, tabName) {
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tablinks");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
document.getElementById(tabName).style.display = "block";
evt.currentTarget.className += " active";
}
</script>
{% if jekyll.environment == "production" %}
<script src="https://cdn.usefathom.com/script.js" data-site="YGILKQEA" defer></script>
{% endif %}