Skip to content

Commit f5f12a7

Browse files
lilyminiumorbeckst
authored andcommitted
switch doc to User Guide style (based on RTD)
- fix #43 - use RTD theme & update conf.py - update custom.css - update travis (install RTD theme and also build 3.6-3.8 and take the docs from the 3.8 build) - update CHANGELOG - add @lilyminium to AUTHORS and authors in conf.py
1 parent 264d733 commit f5f12a7

6 files changed

Lines changed: 289 additions & 559 deletions

File tree

.travis.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
version: ~> 1.0
12
language: python
23
cache: pip
3-
sudo: false
44

55
python:
6+
- "3.8"
7+
- "3.7"
68
- "3.6"
79
- "2.7"
810

@@ -11,17 +13,17 @@ branches:
1113
- master
1214

1315
install:
14-
- if [[ $TRAVIS_PYTHON_VERSION == "3.6" ]]; then pip install --upgrade sphinx sphinx-sitemap; fi
16+
- if [[ $TRAVIS_PYTHON_VERSION == "3.8" ]]; then pip install --upgrade sphinx sphinx-sitemap sphinx-rtd-theme; fi
1517
- pip install --upgrade pytest pytest-pep8 pytest-cov pytest-mock codecov
1618
- pip install -e .
1719

1820
script:
1921
- pytest -v --cov MDAnalysisData MDAnalysisData
2022

2123
after_success:
22-
# only need to build docs on 3.6 version
24+
# only need to build docs on latest version
2325
# touch .nojekyll else github-pages messes up theme
24-
- if [[ $TRAVIS_PYTHON_VERSION == "3.6" ]]; then python setup.py build_sphinx && touch ./build/sphinx/html/.nojekyll; fi
26+
- if [[ $TRAVIS_PYTHON_VERSION == "3.8" ]]; then python setup.py build_sphinx && touch ./build/sphinx/html/.nojekyll; fi
2527
- codecov
2628

2729
deploy:
@@ -32,6 +34,6 @@ deploy:
3234
github_token: $GITHUB_TOKEN
3335
on:
3436
branch: master
35-
python: "3.6"
37+
python: "3.8"
3638
local_dir: build/sphinx/html
3739
project_name: MDAnalysisData

AUTHORS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ addresses are all optional.
1010
- Shujie Fan @VOD555
1111
- Micaela Matta @micaela-matta
1212
- Richard J. Gowers @richardjgowers
13+
14+
2020
15+
- Lily Wang @lilyminium

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [0.8.1] - YYYY-MM-DD
8+
9+
### Changes
10+
- update online docs theme (#43)
11+
712
## [0.8.0] - 2019-08-13
813

914
### Added

docs/_static/custom.css

Lines changed: 137 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
/* override css for readable.css */
1+
/* custom MDAnalysis styling (User Guide theme) */
22

3-
/* styles/fonts to match http://mdanalysis.org (see public/css) */
3+
/* See https://github.com/MDAnalysis/mdanalysis/wiki/MDAnalysis-theme-colours */
44
/* MDAnalysis orange: #FF9200 */
55
/* MDAnalysis gray: #808080 */
66
/* MDAnalysis white: #FFFFFF */
77
/* MDAnalysis black: #000000 */
8-
9-
@import url('readable.css');
8+
/* Darker orange: e76900 */
9+
/* Even darker orange: #a24900 */
10+
/* RTD dark grey: #343131 */
11+
/* RTD light grey: #e6e6e6 */
1012

1113
/* -- page layout --------------------------------------------------------- */
1214

@@ -20,27 +22,53 @@ div.body {
2022
}
2123

2224
div.sphinxsidebar a:hover {
23-
color: #FF9200;
25+
text-decoration: none !important;
2426
}
2527

2628
div.sphinxsidebar p {
2729
color: #808080;
2830
}
2931

32+
/* Home MDAnalysis colour */
33+
.wy-side-nav-search > a {
34+
color: #343131;
35+
}
36+
37+
/* Side MDAnalysis version colour */
38+
.wy-side-nav-search > div.version {
39+
color: #808080;
40+
}
41+
42+
/* Menubar caption colour */
43+
div.wy-menu-vertical span.caption-text {
44+
color: #FF9200;
45+
}
46+
47+
/* Mobile layout menubar option */
48+
nav.wy-nav-top {
49+
background: #343131;
50+
}
51+
52+
/* Menu search bar outline (default blue) */
53+
.wy-side-nav-search input[type="text"] {
54+
border-color: #808080;
55+
}
56+
3057

3158
/* -- body styles --------------------------------------------------------- */
3259

33-
a {
60+
/* Different coloured links for sidebar vs body) */
61+
div.rst-content a {
3462
color: #FF9200;
3563
text-decoration: none;
3664
}
3765

38-
a:visited {
66+
div.rst-content a:visited {
3967
color: #FF9200;
4068
}
4169

4270
a:hover {
43-
color: #FF9200;
71+
color: #FF9200 !important;
4472
text-decoration: underline;
4573
}
4674

@@ -66,6 +94,7 @@ a.headerlink:hover {
6694
color: #fff;
6795
}
6896

97+
/* ------- admonition boxes ------- */
6998

7099
div.admonition {
71100
margin: 10px 0px;
@@ -75,4 +104,103 @@ div.admonition {
75104
div.admonition p.admonition-title {
76105
font-size: 100%;
77106
font-weight: bolder;
78-
}
107+
}
108+
109+
/* ----- Tables ----- */
110+
111+
/* override table width restrictions */
112+
/* wrap tables instead of scrolling */
113+
@media screen and (min-width: 767px) {
114+
115+
.wy-table-responsive table td, .wy-table-responsive table th {
116+
/* !important prevents the common CSS stylesheets from overriding
117+
this as on RTD they are loaded after this stylesheet */
118+
white-space: normal !important;
119+
}
120+
121+
.wy-table-responsive {
122+
overflow: visible !important;
123+
max-width: 100% !important;
124+
}
125+
}
126+
127+
/* ----- Field lists ------ */
128+
129+
.section > dl.field-list {
130+
display: flex;
131+
flex-wrap: wrap;
132+
margin: 0;
133+
padding: 0;
134+
}
135+
136+
dl.field-list > dt::after {
137+
content: ":";
138+
}
139+
140+
.rst-content dl:not(.docutils) dt {
141+
background: none;
142+
color: #000000;
143+
border-top: none;
144+
}
145+
146+
.section > dl.field-list dt {
147+
margin: 0;
148+
padding: 0;
149+
flex-basis: 20%;
150+
display: block;
151+
}
152+
153+
.section > dl.field-list > dd {
154+
flex-basis: 70%;
155+
margin: 0;
156+
}
157+
158+
.section > dl.field-list > dd p {
159+
margin: 0;
160+
}
161+
162+
/* ----- MDAnalysis coloured elements ------ */
163+
164+
.rst-content dl.class dt, .rst-content dl.function dt {
165+
color: #ca6500;
166+
background: #FFEBD0;
167+
border-top: solid 3px #FF9200;
168+
}
169+
170+
.rst-content .viewcode-link, .rst-content .viewcode-back {
171+
color: #808080;
172+
}
173+
174+
.rst-content .guilabel {
175+
background: #efefef;
176+
border: 1px solid #808080;
177+
}
178+
179+
180+
.rst-content .seealso p.admonition-title {
181+
background: #808080;
182+
}
183+
184+
.rst-content .seealso {
185+
background: #e3e3e3;
186+
}
187+
188+
.rst-content .error p.admonition-title, .rst-content .warning p.admonition-title {
189+
background: #F45F4B;
190+
}
191+
192+
.rst-content .error, .rst-content .warning {
193+
background: #FFEEED;
194+
}
195+
196+
.rst-content .caution p.admonition-title, .rst-content .note p.admonition-title, .rst-content .important p.admonition-title {
197+
background: #FF9200;
198+
}
199+
200+
.rst-content .caution, .rst-content .note, .rst-content .important {
201+
background: #FFEBD0;
202+
}
203+
204+
.rst-content code:not(.xref).literal {
205+
color: #ca6500;
206+
}

0 commit comments

Comments
 (0)