about summary refs log tree commit diff
path: root/tmpl/addstars.html
blob: cffc31ee7c543bd8156f0b1ea075bfe900447654 (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
{{define "addstars"}}
    <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">Add Stars</h1>
            <p class="lead">This is the "Add your star to a tree" page! Fill out the form below for adding one of your stars into one of the trees!</p>
            <form action="/addstars" method="post">

                <hr class="my-4">
                <div class="form-group">
                    <input type="text" class="form-control" id="dbip" placeholder="db-ip" name="dbip">
                </div>
                <div class="form-group">
                    <input type="text" class="form-control" id="tree" placeholder="tree index" name="tree">
                </div>
                <hr class="my-4">

                <div class="form-group">
                    <input type="text" class="form-control" id="x" placeholder="x" name="x">
                </div>
                <div class="form-group">
                    <input type="text" class="form-control" id="y" placeholder="y" name="y">
                </div>
                <div class="form-group">
                    <input type="text" class="form-control" id="vx" placeholder="vx" name="vx">
                </div>
                <div class="form-group">
                    <input type="text" class="form-control" id="vy" placeholder="vy" name="vy">
                </div>
                <div class="form-group">
                    <input type="text" class="form-control" id="m" placeholder="mass" name="mass">
                </div>
                <button type="submit" class="btn btn-primary">Submit</button>
            </form>
        </div>
    </div>

    <div class="container">
        <div class="jumbotron">
            <p class="lead">Optionally: select a .csv:</p>
            <div class="input-group">
                <div class="input-group-prepend">
                    <span class="input-group-text" id="inputGroupFileAddon01">Upload</span>
                </div>
                <div class="custom-file">
                    <input type="file" class="custom-file-input" id="inputGroupFile01" aria-describedby="inputGroupFileAddon01">
                    <label class="custom-file-label" for="inputGroupFile01">Choose file</label>
                </div>
            </div>
        </div>
    </div>

    <div class="container">
        <div class="jumbotron">
            <form enctype="multipart/form-data" action="http://127.0.0.1:9090/upload" method="post">
                <input type="file" name="uploadfile" />
                <input type="hidden" name="token" value="{{.}}"/>
                <input type="submit" value="upload" />
            </form>
        </div>
    </div>

    {{template "javascript"}}
    </body>
{{end}}