diff --git a/docs/_static/css/main.css b/docs/_static/css/main.css
index feea31d98b6a..674948469063 100755
--- a/docs/_static/css/main.css
+++ b/docs/_static/css/main.css
@@ -745,6 +745,18 @@ h2 .headerlink:hover {
opacity: 0.3;
}
+#file-issue {
+ position: absolute;
+ right: 20px;
+ top: 20px;
+ display: none;
+}
+
+#file-issue-secondary {
+ margin-top: 1em;
+ display: inline-block;
+}
+
.v-list {
color: rgba(0,0,0,0.2);
}
@@ -1022,26 +1034,6 @@ h2 .headerlink:hover {
}
-@media only screen and (min-width: 45em) {
-
- /*
- Docs Header
- */
-
- .versions {
- position: absolute;
- top: 6em;
- right: 2em;
- margin: 0;
- }
-
- .v-btn {
- font-size: 0.7em;
- line-height: normal;
- }
-
-}
-
@media only screen and (min-width: 50em) {
/*
@@ -1062,6 +1054,14 @@ h2 .headerlink:hover {
line-height: 70px;
}
+ #file-issue {
+ display: inline;
+ }
+
+ #file-issue-secondary {
+ display: none;
+ }
+
/*
Logo
*/
@@ -1133,7 +1133,15 @@ h2 .headerlink:hover {
}
.versions {
- top: 7em;
+ position: absolute;
+ top: 6em;
+ right: 2em;
+ margin: 0;
+ }
+
+ .v-btn {
+ font-size: 0.7em;
+ line-height: normal;
}
/*
diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html
index 6a7b5ff78c51..edc1c8652d87 100644
--- a/docs/_templates/layout.html
+++ b/docs/_templates/layout.html
@@ -81,6 +81,13 @@
+ {%- if show_source and has_source and pagename %}
+ {%- set issue_uri = issue_uri_template.format(pagename|urlencode, release|urlencode) %}
+ {%- endif %}
+
+
+ Report an Issue
+
{% endblock %}
@@ -101,6 +108,12 @@ Python
Version History ({{ release|e }})
+
diff --git a/docs/conf.py b/docs/conf.py
index 364eeab570c1..3e007d256e20 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -13,6 +13,7 @@
from pkg_resources import get_distribution
import sys, os
+import urllib
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@@ -179,6 +180,8 @@
# Output file base name for HTML help builder.
htmlhelp_basename = 'gclouddoc'
+html_context = {}
+
# -- Options for LaTeX output --------------------------------------------------
@@ -257,3 +260,14 @@
# This pulls class descriptions from the class docstring,
# and parameter definitions from the __init__ docstring.
autoclass_content = 'both'
+
+issue_uri = ('https://github.com/GoogleCloudPlatform/gcloud-python/issues/'
+ 'new?' + urllib.urlencode({'title': '[Documentation Issue] '}))
+issue_uri_template = (
+ issue_uri + '&' + urllib.urlencode({'body': 'Page Name: '}) + '{0}' +
+ urllib.quote('\nRelease: ') + '{1}')
+
+html_context.update(
+ issue_uri=issue_uri,
+ issue_uri_template=issue_uri_template,
+)