-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
87 lines (73 loc) · 2.56 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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
<script src="x/svg.min.js"></script>
<script src="x/tree.js"></script>
<script>
<?php
$args = Array(
'mod' => ''
, 'debug' => false
, 'redraw' => false
);
foreach ($_GET as $arg => $val) {
$arg = strtolower($arg);
switch ($arg)
{
case "mod":
$args["mod"] = (is_array($val)) ? $val : Array($val);
break;
case "debug":
$args["debug"] = true;
break;
case "redraw":
$args["redraw"] = true;
break;
}
}
foreach ($args as $arg => $val) {
echo "\tvar g_args = " . JSON_encode($args) . ";\n";
}
?>
</script>
<link href="./ui/tree.css" rel="stylesheet"></link>
<link href="./ui/biolinum/biolinum.css" rel="stylesheet"></link>
<link href="./ui/mfgicon/mfglabs_iconset.css" rel="stylesheet"></link>
</head>
<body onload="init()">
<div id="selectDiv">
<select id="civSelect" onChange="selectCiv(event.target.value);" onclick="toggleDivs('')"></select>
<span class="ico mfgicon icon-settings" onclick="toggleDivs('mod')"></span>
<span class="ico mfgicon icon-white_question" onclick="toggleDivs('attr')"></span>
</div>
<div id="modDiv">
<fieldset id="modSelect">
<legend><b>Available Mods</b></legend>
</fieldset>
<input type="button" value="Show" onclick="selectMod()" />
<input type="button" value="Clear" onclick="clearModSelect()" />
</div>
<div id="attrDiv">
<fieldset>
<legend><b>Description</b></legend>
<p>These are generated-on-the-fly diagrams showing the current technology tree of civilisations in <a href="http://play0ad.com/" target="_new">0AD : Empires Ascendant</a>.</p>
<p>The source code can be found at <a href="https://github.com/s0600204/0ad-techtree-v2" target="_new">GitHub</a>.</p>
</fieldset>
<fieldset id="modURLs">
<legend><b>Mods</b></legend>
<p>Links to individual mods' webpages or repositories:<p>
</fieldset>
<fieldset>
<legend><b>Attribution</b></legend>
<p>The font used is <b>Biolinum</b> by the <a href="http://www.linuxlibertine.org/" target="_new">Libertine Open Fonts Project</a>.</p>
<p>The Iconset used in the UI is by <a href="http://mfglabs.github.io/mfglabs-iconset/" target="_new">MFG Labs</a>.</p>
</fieldset>
<a rel="license" id="license" href="http://creativecommons.org/licenses/by-sa/3.0/" target="_new">
<img alt="Creative Commons License" src="./ui/cc-by-sa_80x15.png" />
</a>
</div>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" id="svg_canvas"></svg>
<div id="renderBanner">If you see this, it may mean something has gone wrong...</div>
</body>
</html>