Skip to content

Commit

Permalink
use named var instead of implicit context
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMightyGit committed Aug 26, 2024
1 parent 9a1388b commit bbe4336
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions internal/rssole/templates/items.go.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@

<div class="accordion accordion-flush" id="itemsAccordion">
{{range $idx, $item := .Items}}
<div class="accordion-item">
<div class="accordion-item">
<h2 class="accordion-header">
<div class="p-2 accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapse{{$idx}}" aria-expanded="true" aria-controls="collapse{{$idx}}">
<div id="content{{.ID}}" class="w-100">
<div id="content{{$item.ID}}" class="w-100">
{{template "components/itemline" $item}}
</div>
</div>
Expand All @@ -55,22 +55,22 @@ <h2 class="accordion-header">
<div id="collapse{{$idx}}" class="accordion-collapse collapse">
<div class="accordion-body m-0 p-2">
<div class="w-100 d-flex justify-content-between">
{{if .Link}}
{{if $item.Link}}
<div class="me-3">
<a href="{{.Link}}" class="icon-link mr-1 text-nowrap" target="_new" alt="go to story"><i class="bi-box-arrow-up-right"></i>&nbsp;link</a>
<a href="{{$item.Link}}" class="icon-link mr-1 text-nowrap" target="_new" alt="go to story"><i class="bi-box-arrow-up-right"></i>&nbsp;link</a>
</div>
{{end}}
{{if .Categories}}
{{if $item.Categories}}
<div>
<small>
{{range .Categories}}
{{range $item.Categories}}
<span class="badge rounded-pill text-bg-secondary">{{.}}</span>
{{end}}
</small>
</div>
{{end}}
<div class="ms-3">
<small>{{.PublishedParsed}}</small>
<small>{{$item.PublishedParsed}}</small>
</div>
</div>
<hr class="w-100" />
Expand Down

0 comments on commit bbe4336

Please sign in to comment.