newegg-hdd/templates/index.html

37 lines
1 KiB
HTML
Raw Permalink Normal View History

2023-10-06 18:32:20 +01:00
{% extends "page.html" %}
{% block title %}Price per TB{% endblock %}
{% block content %}
<h1>{{self.title()}}</h1>
List of hard drives available for sale from <a href="http://newegg.com/">Newegg.com</a>, sorted by the price per TB.<p>
Built by <a href="http://edwardbetts.com">Edward Betts</a>.
Comments welcome: edward@4angle.com
<p>Last updated: {{ today.strftime('%d %B %Y') }}.<p>
<table>
{% for cat in best %}
<tr><td colspan="4"><h2>{{ cat.label }}</h2></td></tr>
<tr>
<th align="right">Price<br>per TB</th>
<th align="right">Price</th>
<th align="right">Size</th>
<th align="left">Drive</th>
</tr>
{% for hdd in cat['items'][:16] %}
<tr>
<td align="right">${{ '%.2f' | format(hdd.price_per_tb) }}</td>
<td align="right">${{ hdd.price }}</td>
<td align="right">{{ hdd.size }}</td>
<td><a href="https://www.newegg.com/Product/Product.aspx?Item={{ hdd.number }}">{{ hdd.title }}</a></td>
</tr>
{% endfor %}
<tr><td colspan="4"><a href="{{ cat.name }}/index.html">more</a></td></tr>
{% endfor %}
</table>
{% endblock %}