File tree Expand file tree Collapse file tree 3 files changed +56
-21
lines changed Expand file tree Collapse file tree 3 files changed +56
-21
lines changed Original file line number Diff line number Diff line change @@ -745,6 +745,18 @@ h2 .headerlink:hover {
745
745
opacity : 0.3 ;
746
746
}
747
747
748
+ # file-issue {
749
+ position : absolute;
750
+ right : 20px ;
751
+ top : 20px ;
752
+ display : none;
753
+ }
754
+
755
+ # file-issue-secondary {
756
+ margin-top : 1em ;
757
+ display : inline-block;
758
+ }
759
+
748
760
.v-list {
749
761
color : rgba (0 , 0 , 0 , 0.2 );
750
762
}
@@ -1022,26 +1034,6 @@ h2 .headerlink:hover {
1022
1034
1023
1035
}
1024
1036
1025
- @media only screen and (min-width : 45em ) {
1026
-
1027
- /*
1028
- Docs Header
1029
- */
1030
-
1031
- .versions {
1032
- position : absolute;
1033
- top : 6em ;
1034
- right : 2em ;
1035
- margin : 0 ;
1036
- }
1037
-
1038
- .v-btn {
1039
- font-size : 0.7em ;
1040
- line-height : normal;
1041
- }
1042
-
1043
- }
1044
-
1045
1037
@media only screen and (min-width : 50em ) {
1046
1038
1047
1039
/*
@@ -1062,6 +1054,14 @@ h2 .headerlink:hover {
1062
1054
line-height : 70px ;
1063
1055
}
1064
1056
1057
+ # file-issue {
1058
+ display : inline;
1059
+ }
1060
+
1061
+ # file-issue-secondary {
1062
+ display : none;
1063
+ }
1064
+
1065
1065
/*
1066
1066
Logo
1067
1067
*/
@@ -1133,7 +1133,15 @@ h2 .headerlink:hover {
1133
1133
}
1134
1134
1135
1135
.versions {
1136
- top : 7em ;
1136
+ position : absolute;
1137
+ top : 6em ;
1138
+ right : 2em ;
1139
+ margin : 0 ;
1140
+ }
1141
+
1142
+ .v-btn {
1143
+ font-size : 0.7em ;
1144
+ line-height : normal;
1137
1145
}
1138
1146
1139
1147
/*
Original file line number Diff line number Diff line change @@ -81,6 +81,13 @@ <h1 class="logo">
81
81
</ li >
82
82
</ ul >
83
83
</ nav > <!-- end of .main-nav -->
84
+ {%- if show_source and has_source and pagename %}
85
+ {%- set issue_uri = issue_uri_template.format(pagename|urlencode, release|urlencode) %}
86
+ {%- endif %}
87
+ < a href ="{{ issue_uri }} " target ="_blank " class ="v-btn " id ="file-issue ">
88
+ < img src ="_static/images/icon-link-github.svg " />
89
+ Report an Issue
90
+ </ a >
84
91
</ header > <!-- end of .page-header -->
85
92
{% endblock %}
86
93
@@ -101,6 +108,12 @@ <h1 class="page-title">Python</h1>
101
108
Version History ({{ release|e }})
102
109
</ a >
103
110
</ div > <!-- end of .versions -->
111
+ < div >
112
+ < a href ="{{ issue_uri }} " target ="_blank " class ="v-btn " id ="file-issue-secondary ">
113
+ < img src ="_static/images/icon-link-github.svg " />
114
+ Report an Issue
115
+ </ a >
116
+ </ div >
104
117
</ header >
105
118
106
119
< section class ="content ">
Original file line number Diff line number Diff line change 13
13
14
14
from pkg_resources import get_distribution
15
15
import sys , os
16
+ import urllib
16
17
17
18
# If extensions (or modules to document with autodoc) are in another directory,
18
19
# add these directories to sys.path here. If the directory is relative to the
179
180
# Output file base name for HTML help builder.
180
181
htmlhelp_basename = 'gclouddoc'
181
182
183
+ html_context = {}
184
+
182
185
183
186
# -- Options for LaTeX output --------------------------------------------------
184
187
257
260
# This pulls class descriptions from the class docstring,
258
261
# and parameter definitions from the __init__ docstring.
259
262
autoclass_content = 'both'
263
+
264
+ issue_uri = ('https://github.com/GoogleCloudPlatform/gcloud-python/issues/'
265
+ 'new?' + urllib .urlencode ({'title' : '[Documentation Issue] ' }))
266
+ issue_uri_template = (
267
+ issue_uri + '&' + urllib .urlencode ({'body' : 'Page Name: ' }) + '{0}' +
268
+ urllib .quote ('\n Release: ' ) + '{1}' )
269
+
270
+ html_context .update (
271
+ issue_uri = issue_uri ,
272
+ issue_uri_template = issue_uri_template ,
273
+ )
You can’t perform that action at this time.
0 commit comments