Skip to content

Commit 5ea4274

Browse files
committed
Move 'Last available' column to left.
When it was on the right, it made it seem like the table should be read right-to-left, i.e. the column on the right is the newest. When in reality the column on the left is the newest and most important.
1 parent dc6890b commit 5ea4274

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

template.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,28 +33,28 @@ <h1 class="text-center">{{ current_target }}</h1>
3333
<table class="table table-hover table-bordered table-responsive-lg table-sm">
3434
<thead>
3535
<tr>
36-
{{#each title as |t|}}
36+
<th scope="col" class="text-center"></th>
37+
{{#each title as |t|}}
3738
<th scope="col" class="text-center">{{t}}</th>
38-
{{/each}}
39-
<th scope="col" class="text-center">Last available</th>
39+
{{/each}}
4040
</tr>
4141
</thead>
4242
<tbody>
4343
{{#each packages_availability as |row|}}
4444
<tr>
4545
<th scope="row">{{row.package_name}}</th>
46+
{{#if row.last_available}}
47+
<td class="text-center">{{row.last_available}}</td>
48+
{{else}}
49+
<td class="text-center">N/A</td>
50+
{{/if}}
4651
{{#each row.availability_list as |status|}}
4752
{{#if status}}
4853
<td class="table-primary text-center">present</td>
4954
{{else}}
5055
<td class="table-warning text-center">missing</td>
5156
{{/if}}
5257
{{/each}}
53-
{{#if row.last_available}}
54-
<td class="text-center">{{row.last_available}}</td>
55-
{{else}}
56-
<td class="text-center">N/A</td>
57-
{{/if}}
5858
</tr>
5959
{{/each}}
6060
</tbody>

web/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ fn generate_html(
9090
.with_context(|| format!("Can't create file [{}]", output_path))?;
9191

9292
let table = Table::builder(&data, target)
93+
.first_cell(&"Last available")
9394
.dates(dates)
9495
.additional(&additional)
9596
.build();

0 commit comments

Comments
 (0)