content/static: update metadata page back link styles

Updates the styles on the "go to main page" link on
the metadata pages. Keeps header height consistent
between page navigation.

Change-Id: I1f1a5032df03d082db4b070d6ec035297c24fac5
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/261503
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
diff --git a/content/static/css/unit_header.css b/content/static/css/unit_header.css
index 8a9247c..32317bc 100644
--- a/content/static/css/unit_header.css
+++ b/content/static/css/unit_header.css
@@ -123,12 +123,14 @@
 a.UnitHeader-backLink {
   color: black;
   display: block;
-  font-size: 1.125rem;
-  line-height: 1.5rem;
-  margin: 0.5rem 0;
+  font-size: 1rem;
 }
 .UnitHeader-backLink img {
+  height: 0.8125rem;
   margin-right: 0.5rem;
+  position: relative;
+  top: -0.0625rem;
+  width: auto;
 }
 .UnitHeader-badge {
   border: 1px solid var(--gray-4);
diff --git a/content/static/html/helpers/_unit_header.tmpl b/content/static/html/helpers/_unit_header.tmpl
index 90f9a45..0805220 100644
--- a/content/static/html/helpers/_unit_header.tmpl
+++ b/content/static/html/helpers/_unit_header.tmpl
@@ -101,13 +101,17 @@
           {{end}}
         </div>
       {{else}}
-        <!-- Do not reformat the data attributes of the following div: the server uses a regexp to extract them. -->
-        <div style="display: none;" class="DetailsHeader-badge $$GODISCOVERY_LATESTMINORCLASS$$"
-            data-version="{{.LinkVersion}}" data-mpath="{{.Unit.ModulePath}}" data-ppath="{{.Unit.Path}}" data-pagetype="{{.PageType}}">
+        <div class="UnitHeader-detail">
+          <span class="UnitHeader-detailItem">
+          <!-- Do not reformat the data attributes of the following div: the server uses a regexp to extract them. -->
+          <div style="display: none;" class="DetailsHeader-badge $$GODISCOVERY_LATESTMINORCLASS$$"
+              data-version="{{.LinkVersion}}" data-mpath="{{.Unit.ModulePath}}" data-ppath="{{.Unit.Path}}" data-pagetype="{{.PageType}}">
+          </div>
+          <a class="UnitHeader-backLink" href="?">
+            <img height="16px" width="16px" src="/static/img/pkg-icon-arrowLeft_16x16.svg" alt=""> Go to main page
+          </a>
+          </span>
         </div>
-        <a class="UnitHeader-backLink" href="?">
-          <img height="16px" width="16px" src="/static/img/pkg-icon-arrowLeft_16x16.svg" alt=""> Go to main page
-        </a>
       {{end}}
     </div>
   </header>