Skip to content

Commit

Permalink
Added images to the problem index page (fitbenchmarking#1381)
Browse files Browse the repository at this point in the history
  • Loading branch information
RabiyaF authored Nov 18, 2024
1 parent 6ddfa4e commit 470c13b
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 13 deletions.
23 changes: 23 additions & 0 deletions fitbenchmarking/templates/css/custom_style.css
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,27 @@ a {
color: #333;
max-width: 800px;
margin: 20px auto;
}

.table-row {
display: flex;
flex-wrap: wrap;
align-items: center;
margin: 20px 0;
}

.left-column {
flex: 0 0 85%;
padding-right: 10px;
}

.right-column {
flex: 0 0 15%;
display: flex;
justify-content: center;
}

.right-column form button img {
width: auto;
height: 110px;
}
Binary file added fitbenchmarking/templates/images/accuracy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fitbenchmarking/templates/images/compare.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fitbenchmarking/templates/images/energy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fitbenchmarking/templates/images/local_min.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fitbenchmarking/templates/images/runtime.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 25 additions & 13 deletions fitbenchmarking/templates/problem_index_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,32 @@ <h1 class="title">FitBenchmarking results: {{ group_name }}</h1>
<h4>Table formats</h4>
{{ index }}
<hr>
<div class="row">
<div class="table-row">
{% for type, link, description in zip(table_type, links, description) %}
<h3>
<a href="{{ link }}"><code>{{ type }}</code> table</a>
</h3>
<p>{{ description }}</p>
<h3>
<form>
<button class="btn default" type="submit" formaction="{{ link }}">
<i class="fa fa-table"></i>
</button>
</form>
</h3>
<hr>
<div class="left-column">
<h3>
<a href="{{ link }}"><code>{{ type }}</code> table</a>
</h3>
<p>{{ description }}</p>
</div>
<div class="right-column">
<form>
<button class="btn default" type="submit" formaction="{{ link }}">
{% if type == "compare" %}
<img src="../images/compare.png" alt="compare icon">
{% elif type == "acc" %}
<img src="../images/accuracy.png" alt="accuracy icon">
{% elif type == "runtime" %}
<img src="../images/runtime.png" alt="runtime icon">
{% elif type == "local_min" %}
<img src="../images/local_min.png" alt="local min icon">
{% else %}
<img src="../images/energy.png" alt="energy icon">
{% endif %}
</button>
</form>
</div>
<hr style="width: 100%;">
{% endfor %}
</div>
<center>
Expand Down

0 comments on commit 470c13b

Please sign in to comment.