Skip to content

Commit

Permalink
feat: using slighly nicer rendering of comparison listing from home p…
Browse files Browse the repository at this point in the history
…age instead of legacy listing in browse
  • Loading branch information
dorpvom committed Dec 13, 2024
1 parent 2aa83a0 commit 7e76ad3
Showing 1 changed file with 22 additions and 20 deletions.
42 changes: 22 additions & 20 deletions src/web_interface/templates/database/compare_browse.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,28 @@ <h3 class="mb-3">Browse Firmware Comparisons</h3>
</div>

<div class="row justify-content-center">
<div class="col-xl-6 col-lg-8 col-md-10 mt-4">

<table class="table table-sm table-hover">
{% for id, hids, submission_date in compare_list %}
<tr>
{% if pagination is defined %}
<th>{{ loop.index + (page - 1) * per_page }}</th>
{% endif %}
<td class="clickable" onclick="location.href='/compare/{{ id }}'">
{% for uid in hids %}
<span class="mb-1">{{ hids[uid] }}</span><br />
<span style="font-family: monospace; font-size:11px">{{ uid }}</span><br />
{% endfor %}
</td>
</tr>
{% else %}
<h4>No comparisons found in database!</h4>
{% endfor %}
</table>

<div class="mt-4 col-xl-6 col-lg-8 col-md-10">
<div class="card-body p-3">
<ul class="list-group list-group-flush px-0">
{% for id, hids, submission_date in compare_list %}
<li class="list-group-item bg-light p-2 clickable li-hover" onclick="location.href='/compare/{{ id }}'">
<a href="/compare/{{ id }}">
<div class="p-1" style="width: 100%; height: 100%; font-size: 14px;">
{% for uid in hids %}
{{ hids[uid] }}
<div class="footnote">{{ uid }}</div>
{% endfor %}
<span class="footnote text-muted">
{{ submission_date | int | nice_unix_time }}
</span>
</div>
</a>
</li>
{% else %}
<h4>No comparisons found in database!</h4>
{% endfor %}
</ul>
</div>
</div>
</div>

Expand Down

0 comments on commit 7e76ad3

Please sign in to comment.