-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.php
93 lines (92 loc) · 2.09 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" name="viewport">
<?php
$debug = $_GET["debug"];
#$debug = true;
$styles = array(
"css/jquery-ui.css",
"css/liquid-space.css"
);
$scripts = array(
"js/jquery-1.12.4.min.js",
"js/jquery-ui.js",
"js/jquery.ui.touch-punch.min.js",
"js/hammer.min.js",
"js/lqs/core.js",
"js/lqs/point.js",
"js/lqs/line.js",
"js/lqs/node.js",
"js/lqs/link.js",
"js/lqs/viewspec.js",
"js/lqs/node-text.js",
"js/lqs/node-html.js",
"js/lqs/node-error.js",
"js/lqs/node-graph.js",
"js/lqs/node-embed.js",
"js/lqs/node-cited.js"
);
if( $debug ) {
foreach( $scripts as $script ) {
print "<script src='$script'></script>";
}
} else {
print "<script id='all_js'>\n";
foreach( $scripts as $script ) {
readfile( $script );
}
print "</script>\n";
}
?>
<?php
if( $debug ) {
foreach( $styles as $style ) {
print "<link rel='stylesheet' href='$style' />";
}
} else {
print "<style id='all_css'>";
foreach( $styles as $style ) {
readfile( $style );
}
print "</style>";
}
?>
</head>
<body></body>
<script>
$(document).ready(function(){
var lqs = new LQS();
lqs.setLayout( {
inspectorProxy: 'https://www.southampton.ac.uk/~totl/lqs-inspector-v1/',
nodes: [
{
id: 'a',
pos: { x: 400, y: 100 },
size: { width: 200, height: 200 },
title: '',
type: 'text',
text: 'Try pasting URLs from media sites. Try double clicking on the background. Use the spanner to save state (to a text string for now). Drag nodes to touch to make a link.',
},
{
id: 'welcome',
pos: { x: 0, y: 0 },
size: { width: 200, height: 200 },
title: 'Welcome',
type: 'html',
html: '<p>Welcome to Liquid Space.</p><p>To get started, for now all we have is an <a href="https://jrnl.global/2018/10/30/webleau-progress/">Introduction blog post</a></p>',
}
],
links: [
{
label: "",
id: 'welcomelink',
subject: { node: 'a' },
object: { node: 'welcome' }
}
]
});
});
</script>
</html>