Skip to content

Commit

Permalink
Fix snapshot download table
Browse files Browse the repository at this point in the history
  • Loading branch information
rcaelers committed Aug 24, 2024
1 parent 5fc958d commit a2a889b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions themes/workrave/layouts/snapshots/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</div>
<ul class="nav nav-pills nav-fill shadow-sm mb-2" id="snapshot-tabs" role="tablist">
{{ range $section_index, $section := where (where .Site.Pages "Section" .Page.Section) ".Params.branch" "!=" nil }}
{{ $id := index (last 1 (split (delimit (split .Permalink "/") "," "") ",")) 0 }}
{{ $id := index (last 1 (split $section.Path "/")) 0 }}
<li class="nav-item border bg-white font-weight-bold">
<a class="nav-link{{ if not $section_index }} active{{ end }}" id="{{ $id }}-tab" data-toggle="tab" href="#{{ $id }}" aria-controls="{{ $id }}" aria-selected="true">
{{ safeHTML $section.Params.iconhtml }} {{ $section.Title }}
Expand All @@ -17,12 +17,12 @@
<div class="tab-content" id="snapshots-tab-content">
{{ $top := . }}
{{ range $section_index, $section := where (where .Site.Pages "Section" .Page.Section) ".Params.branch" "!=" nil }}
{{ $section_id := index (last 1 (split (delimit (split .Permalink "/") "," "") ",")) 0 }}
{{ $section_id := index (last 1 (split $section.Path "/")) 0 }}

{{ $base := "https://snapshots.workrave.org/" }}
{{ $catalog := getJSON (print "https://snapshots.workrave.org/snapshots/" $section.Params.branch "/catalog.json") }}

<div class="tab-pane{{ if not $section_index }} show active{{ end }} fade py-4" id="{{ $section_id }}" role="tabpanel" aria-labelledby="{{ $section_id }}-tab}">
<div class="tab-pane{{ if not $section_index }} show active{{ end }} fade py-4" id="{{ $section_id }}" role="tabpanel" aria-labelledby="{{ $section_id }}-tab">
<div class="markdown">
{{ $section.Content }}
</div>
Expand Down

0 comments on commit a2a889b

Please sign in to comment.