Added benchmarks routes and views
This commit is contained in:
38
templates/benchmark/create.tmpl
Normal file
38
templates/benchmark/create.tmpl
Normal file
@ -0,0 +1,38 @@
|
||||
{{ template "header" . }}
|
||||
|
||||
<div class="row">
|
||||
<h2>Add new benchmark</h2>
|
||||
|
||||
<form class="twelve columns" action="/benchmark/create" method="POST">
|
||||
<div class="row">
|
||||
<div class="nine columns">
|
||||
<label for="benchmark_name">
|
||||
Benchmark name:
|
||||
<input id="benchmark_name" class="u-full-width" type="text" name="benchmark_name" placeholder="Unigine Heaven">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="three columns">
|
||||
<label for="benchmark_scoring">
|
||||
Benchmark type:
|
||||
<select id="benchmark_scoring" class="u-full-width" name="benchmark_scoring">
|
||||
<option value="fps">Frames per second</option>
|
||||
<option value="ms">Frame time</option>
|
||||
<option value="pts">Total points</option>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label for="benchmark_description">
|
||||
Benchmark description:
|
||||
<textarea id="benchmark_description" class="twelve columns" cols="30" rows="10" name="benchmark_description"></textarea>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<input class="button-primary u-full-width" type="submit" value="Submit">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{{ template "footer" . }}
|
27
templates/benchmark/list.tmpl
Normal file
27
templates/benchmark/list.tmpl
Normal file
@ -0,0 +1,27 @@
|
||||
{{ template "header" . }}
|
||||
|
||||
<div class="row">
|
||||
<h2>Benchmark</h2>
|
||||
<a href="/benchmark/create">Add new benchmark</a>
|
||||
|
||||
<table class="twelve columns">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Name</td>
|
||||
<td>Created at</td>
|
||||
<td>Last updated</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ range $h := .benchmark }}
|
||||
<tr>
|
||||
<td><a href="/benchmark/{{ $h.ID }}">{{ $h.Name }}</a></td>
|
||||
<td>{{ $h.CreatedAt.Format "01/02/2006 15:04am" }}</td>
|
||||
<td>{{ $h.UpdatedAt.Format "01/02/2006 15:04am" }}</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{ template "footer" . }}
|
19
templates/benchmark/view.tmpl
Normal file
19
templates/benchmark/view.tmpl
Normal file
@ -0,0 +1,19 @@
|
||||
{{ template "header" . }}
|
||||
|
||||
<div class="row">
|
||||
<h2>{{ .benchmark.Name }}</h2>
|
||||
|
||||
<p>{{ .benchmark.ScoringType }}</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<h4>Latest Benchmark Results:</h4>
|
||||
|
||||
<p>There are currently no results recorded using this benchmark.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<p><a href="/benchmark">Back</a></p>
|
||||
</div>
|
||||
|
||||
{{ template "footer" . }}
|
Reference in New Issue
Block a user