-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
71 lines (60 loc) · 2.01 KB
/
index.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
<!doctype html>
<html>
<head>
<title>CX to JS in a webpage</title>
<!--
Import the cx2js converter and Cytoscape.js packages from unpkg
-->
<script src="https://unpkg.com/[email protected]/build/bundle.js"></script>
<script src="https://unpkg.com/[email protected]/dist/cytoscape.min.js"></script>
<!--
Import our own code. This contains a fetchJSON function we have
written that fetches, converts and displays our default CX data.
-->
<script src="./script.js"></script>
</head>
<style>
/*
Default styling for the Cytoscape.js component.
*/
#cy {
background-color: white;
width: 100%;
height: 480px;
top: 0px;
left: 0px;
z-index: 0;
letter-spacing: 1px;
}
#title {
display: flex;
align-items: center;
}
#logos {
margin-left: auto
}
</style>
<body>
<div id="title">
<div>
<h1>Welcome to My ITCR-funded Web Tool</h1>
</div>
<div id="logos">
<a href="https://ndexbio.org"><img src="./poweredbyNDEx.png" height=48px></a>
<a href="https://cytoscape.org"><img src="./cytoscape3-logo-small.png" height=48px></a>
</div>
</div>
<!--
This is the Cytoscape.js component. The id "cy" is used to get this
component from the HTML document and pass it programatically to Cytoscape.js
-->
<div id="cy"></div>
<div style='text-align:center'>
Click on a button to select and display a network. <br>
<!-- Each button below calls the fetchJSON function to fetch, convert and display CX data in the "cy component". -->
<button onClick='fetchJSON("./ITCR Connectivity Map.cx", "cy")'>Network 1</button>
<button onClick='fetchJSON("./Expert-identified drugs and reagents that modulate SARS-CoV-2 interactors (ST4).cx", "cy")'>Network 2</button>
<button onClick='fetchJSON("./EV_network.cx", "cy")'>Network 3</button>
</div>
</body>
</html>