blob: 974e45c20abe8f5638ccc403baadceb296d03d28 (
plain)
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
|
{{define "newtree"}}
<head>
{{template "header"}}
<style>
.jumbotron{
margin: 10px;
}
</style>
</head>
<body>
{{template "nav"}}
<div class="container">
<div class="tab-content" id="nav-tabContent">
<div class="tab-pane fade" id="nav-overview" role="tabpanel" aria-labelledby="nav-overview-tab">There will be an overview here!</div>
<div class="tab-pane fade" id="nav-new-tree" role="tabpanel" aria-labelledby="nav-new-tree-tab">add tree</div>
<div class="tab-pane fade" id="nav-add-stars" role="tabpanel" aria-labelledby="nav-add-stars-tab">Add some stars!</div>
<div class="tab-pane fade" id="nav-draw-tree" role="tabpanel" aria-labelledby="nav-draw-tree-tab">Draw one of the galaxies!</div>
</div>
</div>
<div class="container">
<div class="jumbotron">
<h1 class="display-4">New Tree</h1>
<p class="lead">This is the "Create your own tree" page! Fill out the form below to create a new (quad)tree storing a complete galaxy!</p>
<hr class="my-4">
<form action="/newtree" method="post">
<div class="form-group">
<label for="db-ip">The ip of the database</label>
<input type="text" class="form-control" id="x-pos" placeholder="db-ip" name="db-ip">
</div>
<div class="form-group">
<label for="x-pos">(Center) X Position</label>
<input type="text" class="form-control" id="x-pos" placeholder="x-pos" name="x">
</div>
<div class="form-group">
<label for="y-pos">(Center) Y Position</label>
<input type="text" class="form-control" id="y-pos" placeholder="y-pos" name="y">
</div>
<div class="form-group">
<label for="width">Width</label>
<input type="text" class="form-control" id="width" placeholder="width" name="w">
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
{{if .NewTree}}
<div class="alert alert-success alert-dismissible fade show" role="success">
<strong>Successfully created the tree!</strong> (x:{{.X}}, y:{{.Y}}), width: {{.W}}
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
{{end}}
</div>
{{template "javascript"}}
</body>
{{end}}
|