diff options
Diffstat (limited to 'tmpl/newtree.html')
-rw-r--r-- | tmpl/newtree.html | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/tmpl/newtree.html b/tmpl/newtree.html new file mode 100644 index 0000000..974e45c --- /dev/null +++ b/tmpl/newtree.html @@ -0,0 +1,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}} |