Skip to content

Commit cd9933f

Browse files
committed
Fix header levels for /project/smite/ bug table
1 parent 4f7ffc9 commit cd9933f

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

‎layouts/_partials/bug-table.html‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,21 @@
1010
*/ -}}
1111
{{- $bugs := .bugs -}}
1212
{{- $page := .page -}}
13+
{{/* Heading level for the per-implementation groups. /bugs/ puts them directly
14+
under the page h1, so h2; a project page nests them under its own
15+
"Findings" h2, so h3. */}}
16+
{{- $level := default 2 .level -}}
1317
{{- $targets := slice "lnd" "cln" "ldk" "eclair" "spec" -}}
1418
{{- $names := dict "lnd" "LND" "cln" "Core Lightning" "ldk" "LDK" "eclair" "Eclair" "spec" "BOLT spec" -}}
1519

1620
{{- range $target := $targets }}
1721
{{- $group := where $bugs "target" $target }}
1822
{{- with sort $group "reported" "desc" }}
1923
<section class="bug-group">
20-
<h2 class="bug-group-heading">
24+
<h{{ $level }} class="bug-group-heading">
2125
<span>{{ index $names $target }}</span>
2226
<span class="bug-group-count">{{ len . }} &middot; {{ len (where . "status" "fixed") }} fixed</span>
23-
</h2>
27+
</h{{ $level }}>
2428
<div class="table-wrap">
2529
<table class="data-table">
2630
<thead>

‎layouts/projects/single.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ <h1 class="page-title">{{ .Title }}</h1>
3030

3131
{{- with $bugs }}
3232
<section class="section-block">
33-
{{ partial "bug-table.html" (dict "bugs" . "page" $page) }}
33+
{{ partial "bug-table.html" (dict "bugs" . "page" $page "level" 3) }}
3434
<p class="more-link"><a href="{{ "bugs/" | relURL }}">All bugs</a></p>
3535
</section>
3636
{{- end }}

0 commit comments

Comments
 (0)