Skip to content

Commit

Permalink
Merge branch 'production' into 47-create-staging-server
Browse files Browse the repository at this point in the history
  • Loading branch information
Ipstenu committed Aug 30, 2024
2 parents 4770926 + 01f9c14 commit c1ab408
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions layouts/shortcodes/recapcount.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{{ if .Get "show" }}
{{ $show := .Get "show" }}
{{- $icon := .Get "icon" -}}

{{ $recaps := (where .Site.RegularPages "Layout" "recaps" ) }}
{{ $showRecaps := (where .Site.Pages "Params.showslug" $show ) }}
{{ $filtered := $recaps | intersect $showRecaps }}
{{ $postCount := len $filtered }}

<div class="alert alert-light" role="alert">
{{ partial "assets/icon.html" (dict "icon" $icon "spacing" false) }}
<a href="/library/recaps/{{ $show }}" class="alert-link"><strong>{{ .Get "title" }}</strong>
{{ partial "assets/icon.html" (dict "icon" $icon "spacing" true) }}
<a href="/library/recaps/{{ $show }}/" class="alert-link"><strong>{{ .Get "title" }}</strong></a>&nbsp;
{{ if eq $postCount 0 }}
<span class="badge rounded-pill bg-secondary">Coming Soon</span>
{{ else }}
<span class="badge rounded-pill bg-success-subtle"><a href="/library/recaps/{{ $show }}/">{{ $postCount }} recap{{ if ne $postCount 1 }}s{{ end }}</a></span>
<span class="badge rounded-pill bg-info"><a href="/library/recaps/{{ $show }}/">{{ $postCount }} recap{{ if ne $postCount 1 }}s{{ end }}</a></span>
{{ end }}
</div>
{{ end }}

0 comments on commit c1ab408

Please sign in to comment.