add latest version on top of single spec page

Signed-off-by: Toshaan Bharvani <toshaan@vantosh.com>
archetype-theme-transition
Toshaan Bharvani 4 years ago
parent ac9b4fc7f5
commit 73c67c0d66

@ -2,6 +2,9 @@

{{ partial "navbar.html" . }}

{{ $filename := .File.BaseFileName }}
{{ $datafile := index $.Site.Data.specifications $filename }}

<main id="main">

<section id="page" class="section-bg">
@ -11,6 +14,19 @@
<p class="section-description"></p>
<span class="section-divider"></span>
</div>
<div class="row">
<div class="col-lg-2">&nbsp;</div>
<div class="col-lg-4">
{{ if $datafile.versions }}
{{ range last 1 $datafile.versions }}
Latest version {{ .number }}
{{ end }}
{{ end }}
</div>
<div class="col-lg-4">
</div>
<div class="col-lg-2">&nbsp;</div>
</div>
<div class="row">
<div class="col-lg-2">&nbsp;</div>
<div class="col-lg-8 content wow fadeInTop">
@ -25,8 +41,7 @@
{{ end }}
</div>
</div>
{{ $filename := .File.BaseFileName }}
{{ $datafile := index $.Site.Data.specifications $filename }}

{{ if $datafile.versions }}
<div class="row">
<div class="col-lg-12">

Loading…
Cancel
Save