Skip to content

Commit 0a3de43

Browse files
authored
Merge pull request #42 from nexB/40-add-gsod-2020-page
Add custom CSS #40
2 parents 5b5c4b5 + fe4a0a0 commit 0a3de43

3 files changed

Lines changed: 374 additions & 2 deletions

File tree

Lines changed: 363 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,363 @@
1+
body {
2+
color: #000000;
3+
/* this is the font-family used in the SPATS wiki */
4+
/* font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji; */
5+
}
6+
7+
p {
8+
margin-bottom: 10px;
9+
}
10+
11+
/* ul, ul.simple {
12+
margin-bottom: 10px;
13+
} */
14+
15+
.wy-plain-list-disc, .rst-content .section ul, .rst-content .toctree-wrapper ul, article ul {
16+
margin-bottom: 10px;
17+
}
18+
19+
h1, h2, h3, h4, h5, h6 {
20+
margin-bottom: 10px;
21+
}
22+
23+
h2, h3, h4, h5, h6 {
24+
margin-top: 20px;
25+
margin-top: 30px;
26+
}
27+
28+
h5 {
29+
font-size: 17px;
30+
font-size: 18px;
31+
color: #666666;
32+
color: #000000;
33+
font-style: italic;
34+
margin-bottom: 10px;
35+
}
36+
37+
h6 {
38+
font-size: 16px;
39+
color: #666666;
40+
color: #999999;
41+
color: #778899;
42+
color: #009999;
43+
color: #006666;
44+
color: #996633;
45+
color: #009933;
46+
color: #661aff;
47+
/* color: #666699; */
48+
49+
/* font-style: italic; */
50+
/* font-weight: normal; */
51+
margin-bottom: 10px;
52+
}
53+
54+
/* custom admonitions */
55+
/* success */
56+
.custom-admonition-success .admonition-title {
57+
color: #ffffff;
58+
color: #000000;
59+
background: #009900;
60+
background: #00b33c;
61+
background: #ccffcc;
62+
border-radius: 5px 5px 0px 0px;
63+
}
64+
div.custom-admonition-success.admonition {
65+
color: #000000;
66+
background: #f5f5f5;
67+
background: #ffffff;
68+
border: solid 1px #e8e8e8;
69+
border: solid 1px #cccccc;
70+
border-radius: 5px;
71+
/* box-shadow: 5px 5px 18px #d8d8d8; */
72+
box-shadow: 1px 1px 5px 3px #d8d8d8;
73+
margin: 20px 0px 30px 0px;
74+
}
75+
76+
/* important */
77+
.custom-admonition-important .admonition-title {
78+
color: #ffffff;
79+
color: #000000;
80+
background: #009900;
81+
background: #00b33c;
82+
background: #ccffcc;
83+
border-radius: 5px 5px 0px 0px;
84+
}
85+
div.custom-admonition-important.admonition {
86+
color: #000000;
87+
background: #f5f5f5;
88+
background: #ffffff;
89+
border: solid 1px #e8e8e8;
90+
border: solid 1px #cccccc;
91+
border-radius: 5px;
92+
/* box-shadow: 5px 5px 18px #d8d8d8; */
93+
box-shadow: 1px 1px 5px 3px #d8d8d8;
94+
margin: 20px 0px 30px 0px;
95+
}
96+
97+
/* caution */
98+
.custom-admonition-caution .admonition-title {
99+
color: #000000;
100+
background: #ffff66;
101+
background: #ffff99;
102+
border-radius: 5px 5px 0px 0px;
103+
border-bottom: solid 1px #e8e8e8;
104+
}
105+
div.custom-admonition-caution.admonition {
106+
color: #000000;
107+
background: #f5f5f5;
108+
background: #ffffff;
109+
border: solid 1px #e8e8e8;
110+
border: solid 1px #cccccc;
111+
border-radius: 5px;
112+
/* box-shadow: 5px 5px 18px #d8d8d8; */
113+
box-shadow: 1px 1px 5px 3px #d8d8d8;
114+
margin: 20px 0px 30px 0px;
115+
}
116+
117+
/* note */
118+
.custom-admonition-note .admonition-title {
119+
color: #ffffff;
120+
background: #3399ff;
121+
background: #006bb3;
122+
border-radius: 5px 5px 0px 0px;
123+
}
124+
div.custom-admonition-note.admonition {
125+
color: #000000;
126+
background: #f5f5f5;
127+
background: #ffffff;
128+
border: solid 1px #e8e8e8;
129+
border: solid 1px #cccccc;
130+
border-radius: 5px;
131+
/* box-shadow: 5px 5px 18px #d8d8d8; */
132+
box-shadow: 1px 1px 5px 3px #d8d8d8;
133+
margin: 20px 0px 30px 0px;
134+
}
135+
136+
/* todo */
137+
.custom-admonition-todo .admonition-title {
138+
color: #000000;
139+
background: #cce6ff;
140+
border-radius: 5px 5px 0px 0px;
141+
border-bottom: solid 1px #99ccff;
142+
}
143+
div.custom-admonition-todo.admonition {
144+
color: #000000;
145+
background: #f5f5f5;
146+
background: #ffffff;
147+
border: solid 1px #e8e8e8;
148+
border: solid 1px #cccccc;
149+
border: solid 1px #99ccff;
150+
border-radius: 5px;
151+
/* box-shadow: 5px 5px 18px #d8d8d8; */
152+
box-shadow: 1px 1px 5px 3px #d8d8d8;
153+
margin: 20px 0px 30px 0px;
154+
}
155+
156+
/* examples */
157+
.custom-admonition-examples .admonition-title {
158+
color: #000000;
159+
/* color: #ffffff; */
160+
background: #f5f5f5;
161+
background: #e8e8e8;
162+
background: #ffe6cc;
163+
/* background: #606060; */
164+
border-radius: 5px 5px 0px 0px;
165+
border-bottom: solid 1px #d8d8d8;
166+
}
167+
div.custom-admonition-examples.admonition {
168+
color: #000000;
169+
background: #f5f5f5;
170+
background: #ffffff;
171+
border: solid 1px #cccccc;
172+
border-radius: 5px;
173+
/* box-shadow: 5px 5px 18px #d8d8d8; */
174+
box-shadow: 1px 1px 5px 3px #d8d8d8;
175+
margin: 20px 0px 30px 0px;
176+
}
177+
178+
.wy-nav-content {
179+
/* max-width: 800px; */
180+
/* max-width: 1200px; */
181+
max-width: 100%;
182+
padding-right: 100px;
183+
padding-left: 100px;
184+
background-color: #f2f2f2;
185+
}
186+
187+
div.rst-content {
188+
background-color: #ffffff;
189+
border: solid 1px #e5e5e5;
190+
padding: 20px;
191+
padding: 20px 40px 20px 40px;
192+
}
193+
194+
.rst-content .guilabel {
195+
/* border: 1px solid #7fbbe3; */
196+
/* border: 1px solid #e7f2fa; */
197+
border: 1px solid #ffff99;
198+
/* border: 1px solid #ccffcc; */
199+
/* border: 1px solid #f2f2f2; */
200+
/* border: 1px solid #e6f2ff; */
201+
202+
/* background: #e7f2fa; */
203+
/* background: #e6ffff; */
204+
background: #ffff99;
205+
/* background: #ccffcc; */
206+
/* background-color: #f2f2f2; */
207+
/* background: #e6f2ff; */
208+
209+
/* font-size: 80%; */
210+
font-size: 100%;
211+
/* font-size: 12px; */
212+
/* font-size: 14px; */
213+
/* font-size: 16px; */
214+
font-weight: 700;
215+
font-weight: normal;
216+
border-radius: 4px;
217+
padding: 2.4px 6px;
218+
padding: 4px 6px;
219+
padding: 2px 0px;
220+
margin: auto 2px;
221+
222+
vertical-align: middle;
223+
}
224+
225+
.rst-content kbd {
226+
font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace;
227+
border: solid 1px #d8d8d8;
228+
background-color: #f5f5f5;
229+
padding: 0px 3px;
230+
border-radius: 3px;
231+
}
232+
233+
.wy-nav-content-wrap a {
234+
color: #0066cc;
235+
text-decoration: none;
236+
}
237+
.wy-nav-content-wrap a:hover {
238+
color: #0099cc;
239+
text-decoration: underline;
240+
}
241+
242+
.wy-nav-top a {
243+
color: #ffffff;
244+
}
245+
246+
/* Based on numerous similar approaches e.g., https://github.com/readthedocs/sphinx_rtd_theme/issues/117 and https://rackerlabs.github.io/docs-rackspace/tools/rtd-tables.html -- but remove form-factor limits to enable table wrap on full-size and smallest-size form factors */
247+
.wy-table-responsive table td {
248+
white-space: normal !important;
249+
}
250+
/* .wy-table-responsive {
251+
overflow: visible !important;
252+
} */
253+
254+
.rst-content table.docutils td,
255+
.rst-content table.docutils th {
256+
padding: 5px;
257+
padding: 5px 10px 5px 10px;
258+
}
259+
.rst-content table.docutils td p,
260+
.rst-content table.docutils th p {
261+
font-size: 14px;
262+
margin-bottom: 0px;
263+
}
264+
.rst-content table.docutils td p cite,
265+
.rst-content table.docutils th p cite {
266+
font-size: 14px;
267+
background-color: transparent;
268+
}
269+
270+
.colwidths-given th {
271+
/* border: solid 1px #e8e8e8 !important; */
272+
border: solid 1px #d8d8d8 !important;
273+
}
274+
.colwidths-given td {
275+
/* border: solid 1px #e8e8e8 !important; */
276+
border: solid 1px #d8d8d8 !important;
277+
}
278+
279+
/*handles single-tick inline code*/
280+
.wy-body-for-nav cite {
281+
color: #000000;
282+
background-color: transparent;
283+
font-style: normal;
284+
font-family: "Courier New";
285+
font-size: 12px;
286+
font-size: 13px;
287+
padding: 3px 3px 3px 3px;
288+
}
289+
290+
.rst-content pre.literal-block, .rst-content div[class^="highlight"] pre, .rst-content .linenodiv pre {
291+
font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace;
292+
font-size: 13px;
293+
/* line-height: 1.5; */
294+
overflow: visible;
295+
white-space: pre-wrap;
296+
/* color: #e74c3c; */
297+
}
298+
299+
.rst-content pre.literal-block, .rst-content div[class^='highlight'] {
300+
border: 1px solid #e1e4e5;
301+
border: 0;
302+
background-color: #f6f8fa;
303+
background-color: #f8f8f8;
304+
/* background-color: #f2f2f2; */
305+
border: solid 1px #e5e5e5;
306+
border: solid 1px #e8e8e8;
307+
}
308+
309+
/* This enables inline code to wrap. */
310+
code, .rst-content tt, .rst-content code {
311+
white-space: pre-wrap;
312+
padding: 2px 3px 1px;
313+
border-radius: 3px;
314+
font-size: 13px;
315+
background-color: #f8f8f8;
316+
}
317+
318+
/* use this added class for code blocks attached to bulleted list items */
319+
.highlight-top-margin {
320+
margin-top: 20px !important;
321+
}
322+
323+
/* change color of inline code block */
324+
/* span.pre {
325+
color: #e74c3c;
326+
color: #e01e5a;
327+
} */
328+
329+
.wy-body-for-nav blockquote {
330+
margin: 1em 0;
331+
padding-left: 1em;
332+
border-left: 4px solid #ddd;
333+
color: #6a6a6a;
334+
color: #000000;
335+
}
336+
337+
/* Fix the unwanted top and bottom padding inside a nested bulleted/numbered list */
338+
.rst-content .section ol p, .rst-content .section ul p {
339+
margin-bottom: 0px;
340+
}
341+
342+
/* add spacing between bullets for legibility */
343+
.rst-content .section ol li, .rst-content .section ul li {
344+
margin-bottom: 5px;
345+
}
346+
347+
.rst-content .section ol li:first-child, .rst-content .section ul li:first-child {
348+
margin-top: 5px;
349+
}
350+
351+
/* but exclude the toctree bullets */
352+
.rst-content .toctree-wrapper ul li, .rst-content .toctree-wrapper ul li:first-child {
353+
margin-top: 0px;
354+
margin-bottom: 0px;
355+
}
356+
357+
/* remove extra space at bottom of multine list-table cell */
358+
.rst-content .line-block {
359+
margin-left: 0px;
360+
margin-bottom: 24px;
361+
margin-bottom: 0px;
362+
line-height: 24px;
363+
}

docs/source/aboutcode-docs/gsod-2020.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
Google Season of Docs 2020
44
===========================
55

6-
.. warning:: This is a clone of the 2019 doc -- not yet updated for 2020.
6+
.. admonition:: Caution
7+
:class: custom-admonition-caution
8+
9+
This is a clone of the 2019 doc -- not yet updated for 2020.
710

811
AboutCode has been accepted as a participant in the Google Season of Documents in 2019 as a
912
mentoring org, and is looking for people with technical writing skills. This page contains

docs/source/conf.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@
6565
# relative to this directory. They are copied after the builtin static files,
6666
# so a file named "default.css" will overwrite the builtin "default.css".
6767

68-
#html_static_path = ['_static']
68+
html_static_path = ['_static']
69+
70+
html_context = {
71+
'css_files': [
72+
'_static/theme_overrides.css', # override wide tables in RTD theme
73+
],
74+
}
6975

7076
master_doc = 'index'

0 commit comments

Comments
 (0)