| 1 | {{- $repo := .repo -}} |
| 2 | {{- $description := .description | default "Featured GitHub repository from this report." -}} |
| 3 | {{- $language := .language -}} |
| 4 | {{- $stars := .stars -}} |
| 5 | {{- $forks := .forks -}} |
| 6 | {{- $variant := .variant | default "featured" -}} |
| 7 | {{- if $repo -}} |
| 8 | <article class="repo-card repo-card--{{ $variant }}" aria-label="Featured repository {{ $repo }}"> |
| 9 | <div class="repo-card__main"> |
| 10 | <div class="repo-card__heading"> |
| 11 | <a class="repo-card__title" href="https://github.com/{{ $repo }}" aria-label="Open GitHub repository {{ $repo }}">{{ $repo }}</a> |
| 12 | {{- with $language }}<span class="repo-card__language">{{ . }}</span>{{- end }} |
| 13 | </div> |
| 14 | <p class="repo-card__description">{{ $description }}</p> |
| 15 | </div> |
| 16 | <div class="repo-card__footer"> |
| 17 | <p class="repo-card__stats"> |
| 18 | {{- if $stars }}<span>{{ $stars }} stars</span>{{- end -}} |
| 19 | {{- if and $stars $forks }}<span aria-hidden="true">·</span>{{- end -}} |
| 20 | {{- if $forks }}<span>{{ $forks }} forks</span>{{- end -}} |
| 21 | {{- if not (or $stars $forks) }}<span>GitHub repository</span>{{- end -}} |
| 22 | </p> |
| 23 | <a class="repo-card__button" href="https://github.com/{{ $repo }}" aria-label="View {{ $repo }} on GitHub">GitHub →</a> |
| 24 | </div> |
| 25 | </article> |
| 26 | {{- end -}} |