-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
77 lines (53 loc) · 2.89 KB
/
script.js
File metadata and controls
77 lines (53 loc) · 2.89 KB
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
$(document).ready(function() {
var embed_content = { "p1" : '<embed src="https://drive.google.com/viewerng/viewer?embedded=true&url=https://arxiv.org/pdf/1610.00805" class="pdf">',
"p2" : '<embed src="https://drive.google.com/viewerng/viewer?embedded=true&url=https://arxiv.org/pdf/1711.11497" class="pdf">',
"p3" : '<embed src="https://drive.google.com/viewerng/viewer?embedded=true&url=https://arxiv.org/pdf/1610.00209" class="pdf">',
"p4" : '<embed src="https://drive.google.com/viewerng/viewer?embedded=true&url=https://arxiv.org/pdf/1712.02499" class="pdf">',
"p5" : '<embed src="https://drive.google.com/viewerng/viewer?embedded=true&url=https://arxiv.org/pdf/1801.00843" class="pdf">',
"p6" : '<embed src="https://drive.google.com/viewerng/viewer?embedded=true&url=https://arxiv.org/pdf/1509.08323" class="pdf">',
"p7" : '<embed src="https://drive.google.com/viewerng/viewer?embedded=true&url=https://arxiv.org/pdf/1712.02499" class="pdf">',
"p8" : '<embed src="https://drive.google.com/viewerng/viewer?embedded=true&url=https://arxiv.org/pdf/1811.06382" class="pdf">',
"t1" : '<iframe src="https://fast.wistia.net/embed/iframe/minvaxedxd" class="pdf" allowfullscreen></iframe>',
"t2" : '<iframe src="https://www.youtube.com/embed/tSNo5E2yRjA" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen class="pdf"></iframe>',
"t3" : '<iframe src="https://www.youtube.com/embed/L5Y65QuZXAs" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen class="pdf"></iframe>'
}
var content_visible = false;
var description_box = $('div[id=p1][class=intro]')
var content_box = $('div[class=content]')[0]
var menu_box = $('div[class=menu]')[0]
var arrow = $('[class=menu-arrow]')
$(".menu li a").click(function(){
description_box.hide();
var id = this.getAttribute("id");
console.log(id);
description_box = $('div[id='+id+'][class=intro]')
description_box.show();
content_box.innerHTML = embed_content[id]
if(!content_visible){ show_content() }
resize_content();
$(".menu").css("float", "left");
});
function resize_content(){
content_box.setAttribute("style",'height:' + (menu_box.clientHeight - description_box[0].clientHeight) + 'px');
console.log(menu_box.clientHeight)
console.log(description_box[0].clientHeight)
console.log(description_box[0])
console.log('"' + (menu_box.clientHeight - description_box[0].clientHeight) + 'px"')
}
arrow.click(function(){
hide_content();
$(".menu").css("float", "right");
});
function show_content() {
content_visible = true;
$(".content-container").show();
//$(".content-container").setAttribute("display", "table");
arrow.show();
}
function hide_content() {
content_visible = false;
$(".content-container").hide();
//$(".content-container").setAttribute("display","none");
arrow.hide();
}
});