Skip to content

Commit 08c069f

Browse files
Kadee80astaff
authored andcommitted
20161115 updating documentation templates (#120)
* added font fallback for firefox * removal for merge * removed tracking of build on master branch * added line break to title, custom styles, custom syntax highlight * added script template for intercom integration * link to custom css via template * cleaned up docs build output, added make clean html * overwrite default mobile styles * changed docs build branch to master
1 parent 86b3a7f commit 08c069f

File tree

10 files changed

+266
-22
lines changed

10 files changed

+266
-22
lines changed

.gitignore

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ __pycache__/
1414
.Python
1515
env/
1616
build/
17-
!build/
18-
build/*
19-
!build/html/
20-
build/html/*
21-
!build/html/_static/
17+
#!build/
18+
#build/*
19+
#!build/html/
20+
#build/html/*
21+
#!build/html/_static/
2222

2323
develop-eggs/
2424
dist/

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ install:
1010
script:
1111
- nosetests --with-coverage
1212
- pylama
13-
- cd docs && make html && make doctest && cd ..
13+
- cd docs && make clean html && make doctest && cd ..
1414
- cd scripts && ./doc-deploy.sh && cd ..
1515
deploy:
1616
provider: script

docs/source/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
]
4444

4545
# Add any paths that contain templates here, relative to this directory.
46-
templates_path = ['_templates']
46+
templates_path = ['templates']
4747

4848
# The suffix(es) of source filenames.
4949
# You can specify multiple suffix as a list of string:
@@ -140,7 +140,7 @@
140140
'travis_button': 'True',
141141
'font_size': '14px',
142142
'font_family': 'Open Sans',
143-
'head_font_family': 'AkkoPro-Regular',
143+
'head_font_family': "'AkkoPro-Regular', 'Open Sans'",
144144
'sidebar_collapse': 'True',
145145
'logo': 'logo.png',
146146
'fixed_sidebar': 'True',
@@ -181,7 +181,7 @@
181181
# Add any paths that contain custom static files (such as style sheets) here,
182182
# relative to this directory. They are copied after the builtin static files,
183183
# so a file named "default.css" will overwrite the builtin "default.css".
184-
# html_static_path = ['../static']
184+
html_static_path = ['static']
185185

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

docs/source/getting_started.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ There are a few basic commands that you can string together in order to transfer
166166

167167

168168
Pick Up and Drop Tip
169-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
169+
^^^^^^^^^^^^^^^^^^^^
170170

171171
Before you can start moving liquid around, you need to pick up a tip! You can pick up any tip in a tip rack.
172172

@@ -221,7 +221,7 @@ You can link multiple aspirates together in order to pick up liquid from multipl
221221

222222

223223
Dispense
224-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
224+
^^^^^^^^
225225

226226
Once you pick up liquid, you need to tell the robot where to dispense it.
227227

@@ -243,7 +243,7 @@ If you want to deposit all of the liquid you just aspirated, there is no need to
243243

244244

245245
Mix
246-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
246+
^^^
247247

248248
While you can call multiple aspirate and dispense commands to the same location, the mix command makes it easier to do.
249249

@@ -314,7 +314,7 @@ You can blow out liquid immediately after a dispense command in the same locatio
314314
If the trash container is given a "point" labware name, instead of another container (like "trough-12row"), there is no need to call a position within the container.
315315

316316
Delay
317-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
317+
^^^^^
318318

319319
Delay commands can be called between any movement commands, so you have complete control of exactly where you want the robot to pause.
320320

@@ -407,6 +407,6 @@ First, you can use the print command (a basic python command) to print well loca
407407
This is useful when trying to determine if the location you're calling is actually the location you want, or if something is iterating properly (more on iteration later)
408408

409409
Getting Robot Commands
410-
^^^^^^^^^^^^^^^^
410+
^^^^^^^^^^^^^^^^^^^^^^
411411

412412
Another useful tool is robot.commands(), which will print out the list of actions the virtual robot just performed.

docs/source/img/logo.png

1.81 KB
Loading

docs/source/index.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
from opentrons import robot
3838
robot.reset()
3939

40-
Opentrons API: Simple Biology Lab Protocol Coding
40+
Opentrons API:|br| Simple Biology Lab Protocol Coding
4141
===========================================================
4242

4343
Introduction
@@ -160,4 +160,8 @@ Indices and tables
160160

161161
* :ref:`genindex`
162162
* :ref:`modindex`
163-
* :ref:`search`
163+
* :ref:`search`
164+
165+
.. |br| raw:: html
166+
167+
<br />

docs/source/static/custom.css

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
/* This file intentionally left blank. */
2+
div.body p{
3+
line-height: 20pt;
4+
}
5+
6+
div.body h1 {
7+
margin-top: 0;
8+
margin-bottom: 0;
9+
padding-top: 0;
10+
font-size: 2.4em;
11+
min-height: 78px;
12+
13+
}
14+
15+
div.body h1 + p{
16+
padding-top: 24px;
17+
}
18+
19+
div.sphinxsidebar h2,
20+
div.sphinxsidebar h3,
21+
div.sphinxsidebar h4,
22+
div.sphinxsidebar h5,
23+
div.sphinxsidebar h6,
24+
div.body h2,
25+
div.body h3,
26+
div.body h4,
27+
div.body h5 {
28+
font-family: Open Sans;
29+
}
30+
31+
div.sphinxsidebar h3 a,
32+
div.sphinxsidebar h3 a:hover,
33+
div.body h2{
34+
font-size: 22px;
35+
}
36+
37+
@media screen and (max-width: 875px) {
38+
39+
body {
40+
margin: 0;
41+
padding: 20px 30px;
42+
}
43+
44+
div.documentwrapper {
45+
float: none;
46+
background: #fff;
47+
text-align: center;
48+
}
49+
50+
div.sphinxsidebar {
51+
display: block;
52+
float: none;
53+
width: 102.5%;
54+
margin: -20px -30px 20px -30px;
55+
padding: 10px 20px;
56+
background: #FFF;
57+
color: #111;
58+
}
59+
60+
div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p,
61+
div.sphinxsidebar h3 a {
62+
color: #111;
63+
}
64+
65+
div.sphinxsidebar a {
66+
color: #111;
67+
}
68+
69+
div.sphinxsidebar p.logo {
70+
display: inline-block;
71+
}
72+
73+
div.document {
74+
width: 100%;
75+
margin: 0;
76+
}
77+
78+
div.footer {
79+
display: none;
80+
}
81+
82+
div.bodywrapper {
83+
margin: 0;
84+
}
85+
86+
div.body {
87+
min-height: 0;
88+
padding: 0;
89+
}
90+
91+
.rtd_doc_footer {
92+
display: none;
93+
}
94+
95+
.document {
96+
width: auto;
97+
}
98+
99+
.footer {
100+
width: auto;
101+
}
102+
103+
.footer {
104+
width: auto;
105+
}
106+
107+
.github {
108+
display: none;
109+
}
110+
}

docs/source/static/pygments.css

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
table {
2+
display: table;
3+
border-collapse: separate;
4+
border-spacing: 0px;
5+
border-color: grey;
6+
background-color: #f0f0f0;
7+
padding-top: 20px;
8+
padding-bottom: 20px;
9+
border-left: 10px solid #006FFF;
10+
width: 65vw;
11+
}
12+
13+
td.linenos {
14+
padding-right: 10px;
15+
padding-left: 10px;
16+
border-right: 2px solid #CCC;
17+
}
18+
19+
span.lineno {
20+
padding: 0 5px 0 5px;
21+
}
22+
23+
td.code {
24+
padding-left: 20px;
25+
width:100%;
26+
}
27+
28+
pre {
29+
line-height: 125%;
30+
}
31+
32+
/* JSON Protocol Specific */
33+
.nt { color: #111111; font-weight: bold } /* Name.Tag */
34+
35+
.s1 { color: #006FFF } /* Literal.String.Single */
36+
.s2 { color: #006FFF } /* Literal.String.Double */
37+
38+
.mb { color: #05C1B3 } /* Literal.Number.Bin */
39+
.mf { color: #05C1B3 } /* Literal.Number.Float */
40+
.mh { color: #05C1B3 } /* Literal.Number.Hex */
41+
.mi { color: #05C1B3 } /* Literal.Number.Integer */
42+
.mo { color: #05C1B3 } /* Literal.Number.Oct */
43+
/* Bools and Constants */
44+
.kc { color: #05C1B3 ; font-weight: bold } /* Keyword.Constant */
45+
/* Highlighted Text */
46+
.hll { background-color: #FFD252; font-style: italic; }
47+
48+
49+
50+
51+
/* Comments */
52+
.c { color: #666666; font-style: italic } /* Comment */
53+
.c1 { color: #666666; font-style: italic }
54+
.ch { color: #666666; font-style: italic } /* Comment.Hashbang */
55+
.cm { color: #666666; font-style: italic } /* Comment.Multiline */
56+
.cp { color: #666666} /* Comment.Preproc */
57+
.cpf { color: #666666; font-style: italic } /* Comment.PreprocFile */
58+
.c1 { color: #666666; font-style: italic } /* Comment.Single */
59+
.cs { color: #666666; font-style: italic } /* Comment.Special */
60+
61+
62+
/* Not Currently In Use */
63+
/* .err { border: 1px solid #FF0000 } /* Error */
64+
.k { color: #111111; font-weight: bold } /* Keyword */
65+
.o { color: #333333 } /* Operator */
66+
67+
.gd { color: #A00000 } /* Generic.Deleted */
68+
.ge { font-style: italic } /* Generic.Emph */
69+
.gr { color: #FF0000 } /* Generic.Error */
70+
.gh { color: #000080; font-weight: bold } /* Generic.Heading */
71+
.gi { color: #00A000 } /* Generic.Inserted */
72+
.go { color: #888888 } /* Generic.Output */
73+
.gp { color: #000080; font-weight: bold } /* Generic.Prompt */
74+
.gs { font-weight: bold } /* Generic.Strong */
75+
.gu { color: #800080; font-weight: bold } /* Generic.Subheading */
76+
.gt { color: #0044DD } /* Generic.Traceback */
77+
78+
.kd { color: #111111; font-weight: bold } /* Keyword.Declaration */
79+
.kn { color: #111111; font-weight: bold } /* Keyword.Namespace */
80+
.kp { color: #111111 } /* Keyword.Pseudo */
81+
.kr { color: #111111; font-weight: bold } /* Keyword.Reserved */
82+
.kt { color: #B00040 } /* Keyword.Type */
83+
.m { color: #333333 } /* Literal.Number */
84+
.s { color: #006FFF } /* Literal.String */
85+
86+
.na { color: #7D9029 } /* Name.Attribute */
87+
.nb { color: #111111 } /* Name.Builtin */
88+
.nc { color: #0000FF; font-weight: bold } /* Name.Class */
89+
.no { color: #880000 } /* Name.Constant */
90+
.nd { color: #AA22FF } /* Name.Decorator */
91+
.ni { color: #999999; font-weight: bold } /* Name.Entity */
92+
.ne { color: #D2413A; font-weight: bold } /* Name.Exception */
93+
.nf { color: #0000FF } /* Name.Function */
94+
.nl { color: #A0A000 } /* Name.Label */
95+
.nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
96+
97+
98+
.nv { color: #19177C } /* Name.Variable */
99+
.ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
100+
101+
.w { color: #bbbbbb } /* Text.Whitespace */
102+
103+
104+
.sb { color: #006FFF } /* Literal.String.Backtick */
105+
.sc { color: #006FFF } /* Literal.String.Char */
106+
.sd { color: #006FFF; font-style: italic } /* Literal.String.Doc */
107+
.s2 { color: #006FFF } /* Literal.String.Double */
108+
.se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
109+
.sh { color: #006FFF } /* Literal.String.Heredoc */
110+
.si { color: #FFD252; font-weight: bold } /* Literal.String.Interpol */
111+
.sx { color: #111111 } /* Literal.String.Other */
112+
.sr { color: #FFD252 } /* Literal.String.Regex */
113+
.ss { color: #19177C } /* Literal.String.Symbol */
114+
115+
.bp { color: #111111 } /* Name.Builtin.Pseudo */
116+
.vc { color: #19177C } /* Name.Variable.Class */
117+
.vg { color: #19177C } /* Name.Variable.Global */
118+
.vi { color: #19177C } /* Name.Variable.Instance */
119+
.il { color: #333333 } /* Literal.Number.Integer.Long */

docs/source/templates/layout.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{% extends "!layout.html" %}
2+
3+
{% set css_files = css_files + ['_static/custom.css'] %}
4+
5+
{%- block extrahead %}
6+
<script>
7+
window.intercomSettings = {
8+
app_id: "ukpodv2l"
9+
};
10+
</script>
11+
<script>(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',intercomSettings);}else{var d=document;var i=function(){i.c(arguments)};i.q=[];i.c=function(args){i.q.push(args)};w.Intercom=i;function l(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/ukpodv2l';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);}if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})()</script>
12+
{% endblock %}

scripts/doc-deploy.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,11 @@ git config user.email "$COMMIT_AUTHOR_EMAIL"
3636

3737
git add CNAME
3838

39-
# TODO revisit bash script for checking of there are changes to commit
40-
# # If there are no changes to the compiled out (e.g. this is a README update) then just bail.
41-
# if [ -z $(git diff) ]; then
42-
# echo "No changes to the output on this push; exiting."
43-
# exit 0
44-
# fi
39+
# If there are no changes to the compiled out (e.g. this is a README update) then just bail.
40+
if [[ -z $(git diff) ]]; then
41+
echo "No changes to the output on this push; exiting."
42+
exit 0
43+
fi
4544

4645
# Commit the "changes", i.e. the new version.
4746
# The delta will show diffs between new and old versions.

0 commit comments

Comments
 (0)