Lots of changes

This commit is contained in:
2025-07-14 13:53:50 -04:00
parent e09d399c98
commit 7c13b1f209
16 changed files with 135 additions and 122 deletions

View File

@ -0,0 +1,25 @@
{{ template "header" . }}
<div class="row">
<h2>Create a test</h2>
<form class="twelve columns" action="/test/create" method="POST">
<div class="row">
<label for="test_name">
Test name:
<input id="test_name" class="u-full-width" type="text" name="test_name" placeholder="My hardware benchmarking test">
</label>
</div>
<div class="row">
<label for="test_description">
Test description:
<textarea id="test_description" class="twelve columns" cols="30" rows="10" name="test_description"></textarea>
</label>
</div>
<input class="button-primary u-full-width" type="submit" value="Submit">
</form>
</div>
{{ template "footer" . }}

27
templates/test/list.tmpl Normal file
View File

@ -0,0 +1,27 @@
{{ template "header" . }}
<div class="row">
<h2>Tests</h2>
<a href="/test/create">Create a new test</a>
<table class="twelve columns">
<thead>
<tr>
<td>Title</td>
<td>Created at</td>
<td>Last updated</td>
</tr>
</thead>
<tbody>
{{ range $p := .tests }}
<tr>
<td><a href="/test/{{ $p.ID }}">{{ $p.Name }}</a></td>
<td>{{ $p.CreatedAt.Format "01/02/2006 15:04am" }}</td>
<td>{{ $p.UpdatedAt.Format "01/02/2006 15:04am" }}</td>
</tr>
{{ end }}
</tbody>
</table>
</div>
{{ template "footer" . }}

13
templates/test/view.tmpl Normal file
View File

@ -0,0 +1,13 @@
{{ template "header" . }}
<div class="row">
<h2>{{ .test.Name }}</h2>
<p>{{ .test.Description }}</p>
<hr>
<p><a href="/test">Back</a></p>
</div>
{{ template "footer" . }}