content: fix deprecation bug

In the new versions page, the deprecation badge is always shown. It is
now only shown when the module is actually deprecated.

Change-Id: I21bb99f553a9161ee02ad329e137d823cd08722b
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/309829
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
diff --git a/content/static/html/helpers/_versions.tmpl b/content/static/html/helpers/_versions.tmpl
index 28aed9e..8c9081f 100644
--- a/content/static/html/helpers/_versions.tmpl
+++ b/content/static/html/helpers/_versions.tmpl
@@ -37,8 +37,8 @@
       {{range $i, $v := $major.Versions}}
         <div class="Version-major">
           {{if and (eq $i 0) (not $major.Incompatible)}}
-            <strong>{{$major.Major}}</strong>       
-            {{if true}}<span class="Version-badge">deprecated</span>{{end}}
+            <strong>{{$major.Major}}</strong>
+            {{if $major.Deprecated}}<span class="Version-badge">deprecated</span>{{end}}
           {{end}}
         </div>
         <div class="Version-tag">