0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-02 14:24:19 +01:00
Bootstrap/site/layouts/shortcodes/list-versions.html
2019-08-04 08:23:25 +03:00

21 lines
881 B
HTML

<div class="row">
{{- range $release := (index $.Site.Data "docs-versions") }}
<div class="col-md">
<h2>{{ $release.group }}</h2>
<p>{{ $release.description }}</p>
{{- $versions := sort $release.versions "v" "desc" -}}
{{- range $i, $version := $versions }}
{{- $len := len $versions -}}
{{ if (eq $i 0) }}<div class="list-group">{{ end }}
<a class="list-group-item list-group-item-action py-2 text-primary{{ if (eq $version.v $.Site.Params.docs_version) }} d-flex justify-content-between align-items-center{{ end }}" href="{{ $release.baseurl }}/{{ $version.v }}/">
{{ $version.v }}
{{ if (eq $version.v $.Site.Params.docs_version) -}}
<span class="badge bg-primary">Latest</span>
{{- end }}
</a>
{{ if (eq (add $i 1) $len) }}</div>{{ end }}
{{ end -}}
</div>
{{ end -}}
</div>