content/static: add source code link HTML

The HTML for the source code link is added. The style is set to
display:none, and will be styled in a future CL.

There are no user facing changes in this CL.

For golang/go#40939
For golang/go#42486

Change-Id: I01ba3ead6b2d0a9ea7dc1488d3b9f5eadb33d472
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/278434
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Trust: Julie Qiu <julie@golang.org>
diff --git a/content/static/css/stylesheet.css b/content/static/css/stylesheet.css
index abb4e10..1a48612 100644
--- a/content/static/css/stylesheet.css
+++ b/content/static/css/stylesheet.css
@@ -1280,6 +1280,9 @@
   padding-top: 1.5rem;
   text-align: right;
 }
+.Documentation-declarationLink {
+  display: none;
+}
 .Documentation-exampleButtonsContainer {
   align-items: center;
   display: flex;
diff --git a/content/static/html/doc/declaration.tmpl b/content/static/html/doc/declaration.tmpl
index 00bed16..8d0d7fe 100644
--- a/content/static/html/doc/declaration.tmpl
+++ b/content/static/html/doc/declaration.tmpl
@@ -7,7 +7,10 @@
 {{- define "declaration" -}}
   {{- $out := render_decl .Doc .Decl -}}
   {{if $out.Decl}}
-    <pre>{{- $out.Decl -}}</pre>
+    <div class="Documentation-declaration">
+      <span class="Documentation-declarationLink">{{source_link "View Source" .Decl}}</span>
+      <pre>{{- $out.Decl -}}</pre>
+    </div>
   {{end}}
   {{- $out.Doc -}}
   {{"\n"}}