content/static: html template and styles for docs section

Creates the html template for the documentation section of the unit page.

Change-Id: I2d87a1d577b785829441f9e3621a021c442fd01a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/255022
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.css b/content/static/css/unit.css
index e682cf3..6f37702 100644
--- a/content/static/css/unit.css
+++ b/content/static/css/unit.css
@@ -6,6 +6,7 @@
 
 @import './unit_header.css';
 @import './unit_readme.css';
+@import './unit_docs.css';
 
 .UnitContent {
   max-width: 60rem;
diff --git a/content/static/css/unit_docs.css b/content/static/css/unit_docs.css
new file mode 100644
index 0000000..39a58df
--- /dev/null
+++ b/content/static/css/unit_docs.css
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2020 The Go Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style
+ * license that can be found in the LICENSE file.
+ */
+
+.Documentation {
+  display: block;
+}
+.DocNav {
+  display: none;
+}
+.UnitDocs {
+  margin: 2rem 0;
+}
+.UnitDocs::before {
+  content: '';
+  display: block;
+  position: relative;
+  width: 0;
+  height: 5em;
+  margin-top: -5em;
+}
+.UnitDocs-title {
+  border-bottom: 0.0625rem solid var(--gray-8);
+  display: flex;
+  font-size: 1.375rem;
+  margin: 1rem 0 0 0;
+  padding-bottom: 1rem;
+}
+.UnitDocs-title img {
+  height: 1rem;
+  margin: auto 1rem auto 0;
+  width: auto;
+}
diff --git a/content/static/css/unit_header.css b/content/static/css/unit_header.css
index 23afa85..ab05cdd 100644
--- a/content/static/css/unit_header.css
+++ b/content/static/css/unit_header.css
@@ -37,7 +37,6 @@
 .UnitHeader-detail {
   align-items: center;
   display: flex;
-  overflow: scroll;
   white-space: nowrap;
 }
 .UnitHeader-detailItem {
diff --git a/content/static/css/unit_readme.css b/content/static/css/unit_readme.css
index ec11e51..ab05ab7 100644
--- a/content/static/css/unit_readme.css
+++ b/content/static/css/unit_readme.css
@@ -5,7 +5,7 @@
  */
 
 .UnitReadme {
-  margin-top: 2rem;
+  margin: 2rem 0;
 }
 .UnitReadme::before {
   content: '';
diff --git a/content/static/html/helpers/_unit_docs.tmpl b/content/static/html/helpers/_unit_docs.tmpl
new file mode 100644
index 0000000..8172556
--- /dev/null
+++ b/content/static/html/helpers/_unit_docs.tmpl
@@ -0,0 +1,18 @@
+<!--
+  Copyright 2020 The Go Authors. All rights reserved.
+  Use of this source code is governed by a BSD-style
+  license that can be found in the LICENSE file.
+-->
+
+{{define "unit_docs"}}
+  {{if .Unit.Documentation }}
+    <div class="UnitDocs">
+      <h2 class="UnitDocs-title">
+        <img height="25px" width="20px" src="/static/img/pkg-icon-docs_20x12.svg">Documentation
+      </h2>
+      <div class="Documentation">
+        {{.Unit.Documentation.HTML}}
+      </div>
+    </div>
+  {{end}}
+{{end}}
\ No newline at end of file
diff --git a/content/static/html/pages/unit_details.tmpl b/content/static/html/pages/unit_details.tmpl
index d215a79..be5b790 100644
--- a/content/static/html/pages/unit_details.tmpl
+++ b/content/static/html/pages/unit_details.tmpl
@@ -6,4 +6,5 @@
 
 {{define "unit_content"}}
   {{block "unit_readme" .}}{{end}}
+  {{block "unit_docs" .}}{{end}}
 {{end}}
diff --git a/content/static/img/pkg-icon-docs_20x12.svg b/content/static/img/pkg-icon-docs_20x12.svg
new file mode 100644
index 0000000..e2a056c
--- /dev/null
+++ b/content/static/img/pkg-icon-docs_20x12.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20" height="12"><defs><path id="a" d="M16 6l-1.41 1.41L19.17 12l-4.58 4.59L16 18l6-6-6-6zM8 18l1.41-1.41L4.83 12l4.58-4.59L8 6l-6 6 6 6z"/></defs><g fill="none" fill-rule="evenodd" transform="translate(-2 -6)"><mask id="b" fill="#fff"><use xlink:href="#a"/></mask><g fill="#7627BB" mask="url(#b)"><path d="M0 0h24v24H0z"/></g></g></svg>
\ No newline at end of file