Skip to content

Commit 185f587

Browse files
authored
Cleanup docs and add i18n wrappers (#7354)
1 parent ef439eb commit 185f587

6 files changed

Lines changed: 49 additions & 328 deletions

File tree

docs/_static/custom.css

Lines changed: 8 additions & 172 deletions
Original file line numberDiff line numberDiff line change
@@ -1,177 +1,13 @@
1-
body > div.document > div.sphinxsidebar > div > form > table > tbody > tr:nth-child(2) > td > select {
2-
width: 100%!important;
3-
}
4-
5-
#python27 > a {
6-
color: white;
7-
}
8-
9-
/* Carbon by BuySellAds */
10-
#carbonads {
11-
display: block;
12-
overflow: hidden;
13-
margin: 1.5em 0 2em;
14-
padding: 1em;
15-
border: solid 1px #cccccc;
16-
border-radius: 2px;
17-
background-color: #eeeeee;
18-
text-align: center;
19-
line-height: 1.5;
20-
}
21-
22-
#carbonads a {
23-
border-bottom: 0;
24-
}
25-
26-
#carbonads span {
27-
display: block;
28-
overflow: hidden;
29-
}
30-
31-
.carbon-img {
32-
display: block;
33-
margin: 0 auto 1em;
34-
text-align: center;
35-
}
36-
37-
.carbon-text {
38-
display: block;
39-
margin-bottom: 1em;
40-
}
41-
42-
.carbon-poweredby {
43-
display: block;
44-
text-transform: uppercase;
45-
letter-spacing: 1px;
46-
font-size: 10px;
47-
line-height: 1;
48-
}
49-
50-
51-
/* Native CPC by BuySellAds */
52-
53-
#native-ribbon #_custom_ {
54-
position: fixed;
55-
right: 0;
56-
bottom: 0;
57-
left: 0;
58-
box-shadow: 0 -1px 4px 1px hsla(0, 0%, 0%, .15);
59-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu,
60-
Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;
61-
transition: all .25s ease-in-out;
62-
transform: translateY(calc(100% - 35px));
63-
64-
flex-flow: column nowrap;
65-
}
66-
67-
#native-ribbon #_custom_:hover {
68-
transform: translateY(0);
69-
}
70-
71-
.native-img {
72-
margin-right: 20px;
73-
max-height: 50px;
74-
border-radius: 3px;
75-
}
76-
77-
.native-sponsor {
78-
margin: 10px 20px;
79-
text-align: center;
80-
text-transform: uppercase;
81-
letter-spacing: .5px;
82-
font-size: 12px;
83-
transition: all .3s ease-in-out;
84-
transform-origin: left;
85-
}
86-
87-
#native-ribbon #_custom_:hover .native-sponsor {
88-
margin: 0 20px;
89-
opacity: 0;
90-
transform: scaleY(0);
91-
}
92-
93-
.native-flex {
94-
display: flex;
95-
padding: 10px 20px 25px;
96-
text-decoration: none;
97-
98-
flex-flow: row nowrap;
99-
justify-content: center;
100-
align-items: center;
101-
}
102-
103-
.native-main {
104-
display: flex;
105-
106-
flex-flow: row nowrap;
107-
align-items: center;
108-
}
109-
110-
.native-details {
111-
display: flex;
112-
margin-right: 30px;
113-
114-
flex-flow: column nowrap;
115-
}
116-
117-
.native-company {
118-
margin-bottom: 4px;
119-
text-transform: uppercase;
120-
letter-spacing: 2px;
121-
font-size: 10px;
122-
}
123-
124-
.native-desc {
125-
letter-spacing: 1px;
126-
font-weight: 300;
127-
font-size: 14px;
128-
line-height: 1.4;
129-
}
130-
131-
.native-cta {
132-
padding: 10px 14px;
133-
border-radius: 3px;
134-
box-shadow: 0 6px 13px 0 hsla(0, 0%, 0%, .15);
135-
text-transform: uppercase;
136-
white-space: nowrap;
137-
letter-spacing: 1px;
138-
font-weight: 400;
139-
font-size: 12px;
140-
transition: all .3s ease-in-out;
141-
transform: translateY(-1px);
142-
}
143-
144-
.native-cta:hover {
145-
box-shadow: none;
146-
transform: translateY(1px);
147-
}
148-
149-
@media only screen and (min-width: 320px) and (max-width: 759px) {
150-
.native-flex {
151-
padding: 5px 5px 15px;
152-
flex-direction: column;
153-
154-
flex-wrap: wrap;
155-
}
156-
157-
.native-img {
158-
margin: 0;
159-
display: none;
160-
}
1+
img.logo {margin-left: -20px!important;}
1612

162-
.native-details {
163-
margin: 0;
164-
}
3+
div#searchbox h3 {text-transform: capitalize;}
1654

166-
.native-main {
167-
flex-direction: column;
168-
text-align: left;
5+
div.document {width: 1008px;}
1696

170-
flex-wrap: wrap;
171-
align-content: center;
172-
}
7+
div.highlight pre {padding: 11px 14px;}
1738

174-
.native-cta {
175-
display: none;
176-
}
9+
@media screen and (max-width: 1008px) {
10+
div.sphinxsidebar {display: none;}
11+
div.document {width: 100%!important;}
12+
div.highlight pre {margin-right: -30px;}
17713
}

docs/_templates/hacks.html

Lines changed: 0 additions & 80 deletions
This file was deleted.

docs/_templates/sidebar.html

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<p class="logo">
2+
<a href="{{ pathto(root_doc) }}">
3+
<img class="logo" src="{{ pathto('_static/requests-sidebar.png', 1) }}" alt="{{ _('Requests logo') }}" />
4+
</a>
5+
</p>
6+
7+
<p>
8+
<iframe src="https://ghbtns.com/github-btn.html?user=psf&repo=requests&type=watch&count=true&size=large"
9+
allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
10+
</p>
11+
12+
<p>
13+
{{ _('Requests is an elegant and simple HTTP library for Python, built for human beings.') }}
14+
</p>
15+
16+
<h3>{{ _('Useful Links') }}</h3>
17+
<ul>
18+
<li><a href="{{ pathto('user/quickstart') }}">{{ _('Quickstart') }}</a></li>
19+
<li><a href="{{ pathto('user/advanced') }}">{{ _('Advanced Usage') }}</a></li>
20+
<li><a href="{{ pathto('api') }}">{{ _('API Reference') }}</a></li>
21+
<li><a href="{{ pathto('community/updates') + '#release-history' }}">{{ _('Release History') }}</a></li>
22+
<li><a href="{{ pathto('dev/contributing') }}">{{ _('Contributors Guide') }}</a></li>
23+
24+
<p></p>
25+
26+
<li><a href="{{ pathto('community/recommended') }}">{{ _('Recommended Packages and Extensions') }}</a></li>
27+
28+
<p></p>
29+
30+
<li><a href="https://github.com/psf/requests">{{ _('Requests @ GitHub') }}</a></li>
31+
<li><a href="https://pypi.org/project/requests/">{{ _('Requests @ PyPI') }}</a></li>
32+
<li><a href="https://github.com/psf/requests/issues">{{ _('Issue Tracker') }}</a></li>
33+
</ul>

docs/_templates/sidebarintro.html

Lines changed: 0 additions & 37 deletions
This file was deleted.

docs/_templates/sidebarlogo.html

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)