Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

Commit 1fe4105

Browse files
authored
docs: add python 2 sunset banner to documentation (#9036)
1 parent 0df6206 commit 1fe4105

File tree

3 files changed

+54
-1
lines changed

3 files changed

+54
-1
lines changed

docs/_static/custom.css

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
div#python2-eol {
2+
border-color: red;
3+
border-width: medium;
4+
}

docs/_templates/layout.html

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{% extends "!layout.html" %}
2+
{%- block content %}
3+
{%- if theme_fixed_sidebar|lower == 'true' %}
4+
<div class="document">
5+
{{ sidebar() }}
6+
{%- block document %}
7+
<div class="documentwrapper">
8+
{%- if render_sidebar %}
9+
<div class="bodywrapper">
10+
{%- endif %}
11+
12+
{%- block relbar_top %}
13+
{%- if theme_show_relbar_top|tobool %}
14+
<div class="related top">
15+
&nbsp;
16+
{{- rellink_markup () }}
17+
</div>
18+
{%- endif %}
19+
{% endblock %}
20+
21+
<div class="body" role="main">
22+
<div class="admonition" id="python2-eol">
23+
On January 1, 2020 this library will no longer support Python 2 on the latest released version.
24+
Previously released library versions will continue to be available. For more information please
25+
visit <a href="https://cloud.google.com/python/docs/python2-sunset/">Python 2 support on Google Cloud</a>.
26+
</div>
27+
{% block body %} {% endblock %}
28+
</div>
29+
30+
{%- block relbar_bottom %}
31+
{%- if theme_show_relbar_bottom|tobool %}
32+
<div class="related bottom">
33+
&nbsp;
34+
{{- rellink_markup () }}
35+
</div>
36+
{%- endif %}
37+
{% endblock %}
38+
39+
{%- if render_sidebar %}
40+
</div>
41+
{%- endif %}
42+
</div>
43+
{%- endblock %}
44+
<div class="clearer"></div>
45+
</div>
46+
{%- else %}
47+
{{ super() }}
48+
{%- endif %}
49+
{%- endblock %}

docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
# Add any paths that contain custom static files (such as style sheets) here,
164164
# relative to this directory. They are copied after the builtin static files,
165165
# so a file named "default.css" will overwrite the builtin "default.css".
166-
# html_static_path = []
166+
html_static_path = ["_static"]
167167

168168
# Add any extra paths that contain custom files (such as robots.txt or
169169
# .htaccess) here, relative to this directory. These files are copied

0 commit comments

Comments
 (0)