Switched CSS framework to Bootstrap

This commit is contained in:
Gregory Ballantine
2025-06-26 15:34:02 -04:00
parent e59d606f8c
commit de9e082961
17 changed files with 320 additions and 310 deletions

View File

@ -4,58 +4,50 @@
{% block content %}
<div class="row">
<div class="twelve columns">
<div class="row mb-4">
<div class="col-12">
<h1>Add new test</h1>
</div>
</div>
<div class="row">
<div class="twelve columns">
<form action="{{ url_for('test.add') }}" method="POST" class="u-full-width">
<div class="row">
<div class="six columns">
<label>
Test title:
<input class="u-full-width" type="text" name="test_title" placeholder="My new test">
</label>
<div class="col-12">
<form action="{{ url_for('test.add') }}" method="POST">
<div class="row mb-3">
<div class="col-6">
<label class="form-label" for="test_title">Test title:</label>
<input id="test_title" class="form-control" type="text" name="test_title" placeholder="My new test">
</div>
<div class="six columns">
<label>
Hardware component:
<select class="u-full-width" name="test_component">
{% for c in components %}
<option value="{{ c.id }}">{{ c.name }}</option>
{% endfor %}
</select>
</label>
<div class="col-6">
<label class="form-label" for="test_component">Hardware component:</label>
<select id="test_component" class="form-select" name="test_component">
{% for c in components %}
<option value="{{ c.id }}">{{ c.name }}</option>
{% endfor %}
</select>
</div>
</div>
<div class="row">
<div class="twelve columns">
<label>
Benchmarks:
<select id="benchmark-selector" class="u-full-width" name="test_benchmarks[]" multiple>
{% for b in benchmarks %}
<option value="{{ b.id }}">{{ b.name }}</option>
{% endfor %}
</select>
</label>
<div class="col-12 mb-3">
<label class="form-label" for="test_benchmarks">Benchmarks:</label>
<select id="test_benchmarks" class="form-select" name="test_benchmarks[]" multiple>
{% for b in benchmarks %}
<option value="{{ b.id }}">{{ b.name }}</option>
{% endfor %}
</select>
</div>
</div>
<div class="row">
<div class="twelve columns">
<label>
Test description:
<textarea class="u-full-width" name="test_description" rows="8"></textarea>
</label>
<div class="row mb-3">
<div class="col-12">
<label class="form-label" for="test_description">Test description:</label>
<textarea id="test_description" class="form-control" name="test_description" rows="8"></textarea>
</div>
</div>
<input class="button button-primary u-full-width" type="submit" value="Submit">
<input class="btn btn-primary" type="submit" value="Create Test">
</form>
</div>
</div>

View File

@ -6,8 +6,8 @@
<p><a href="{{ url_for('test.add') }}">Create new test</a></p>
{% if tests | length > 0 %}
<table class="u-full-width">
<thead>
<table class="table table-hover table-responsive">
<thead class="table-light">
<tr>
<th>Test title</th>
<th>Hardware</th>

View File

@ -3,39 +3,39 @@
{% block title %}Test: {{ test.title }}{% endblock %}
{% block content %}
<div class="row">
<div class="twelve columns">
<div class="row mb-3">
<div class="col-12">
<h1>{{ test.title }}</h1>
<p>{{ test.description }}</p>
</div>
</div>
<hr>
<hr class="mb-4">
<div class="row">
<div class="twelve columns">
<form id="result-form" class="u-full-width" action="{{ url_for('api.resultAdd') }}" method="POST">
<div class="row mb-4">
<div class="col-12">
<form id="result-form" action="{{ url_for('api.resultAdd') }}" method="POST">
<div class="row">
<div class="four columns">
<select class="u-full-width" name="result_benchmark">
<div class="col-4">
<select class="form-select" name="result_benchmark">
{% for b in test.benchmarks %}
<option value="{{ b.id }}">{{ b.name }}</option>
{% endfor %}
</select>
</div>
<div class="two columns">
<input class="u-full-width" type="number" step="0.01" name="result_avg" placeholder="0.0">
<div class="col-2">
<input class="form-control" type="number" step="0.01" name="result_avg" placeholder="0.0">
</div>
<div class="two columns">
<input class="u-full-width" type="number" step="0.01" name="result_min" placeholder="0.0">
<div class="col-2">
<input class="form-control" type="number" step="0.01" name="result_min" placeholder="0.0">
</div>
<div class="two columns">
<input class="u-full-width" type="number" step="0.01" name="result_max" placeholder="0.0">
<div class="col-2">
<input class="form-control" type="number" step="0.01" name="result_max" placeholder="0.0">
</div>
<div class="two columns">
<button class="button-primary u-full-width" type="submit" name="button">Submit</button>
<div class="col-2">
<button class="btn btn-primary w-100" type="submit" name="button">Submit Result</button>
</div>
</div>
@ -45,14 +45,14 @@
</div>
</div>
<hr>
<hr class="mb-4">
<div class="row">
<div class="twelve columns">
<h3>Benchmark results:</h3>
<div class="col-12">
<h3 class="mb-3">Benchmark results:</h3>
<table id="results-table" class="u-full-width" data-test-id="{{ test.id }}">
<thead>
<table id="results-table" class="table table-hover table-responsive" data-test-id="{{ test.id }}">
<thead class="table-light">
<tr>
<th>Benchmark</th>
<th>Scoring</th>