Skip to content

Commit 5726656

Browse files
pelsonDPeterK
authored andcommitted
Updated the branding and execution of Iris docs (#3050)
* Updated the branding and execution of Iris This includes: * removing the "easy-to-use" statement in Iris' strapline. Let's let users be the judge of that. * improved the styling of the homepage, including re-instating the search bar. * Added a what's new for #3010. * Added a extlinks section for convenient linking to github issues with :issue:`number` and :pr:`number`. * Added a favicon for the docs. * Improve strapline style, content (#27) * Further improvements to Iris docs * Improved font (noto-sans) * Removed old CSS * Fixed a few what's new entries
1 parent 5fa15f1 commit 5726656

File tree

9 files changed

+105
-62
lines changed

9 files changed

+105
-62
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</h1>
66

77
<h4 align="center">
8-
Iris is a powerful, easy to use, and community-driven Python library for
8+
Iris is a powerful, format-agnostic, and community-driven Python library for
99
analysing and visualising Earth science data
1010
</h4>
1111

846 Bytes
Loading
1.72 KB
Loading

docs/iris/src/_static/style.css

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
body {
2+
font-family: 'Noto Sans', sans-serif;
3+
}
4+
15
.sidebar { z-index: 10; }
26

37
.highlight { background: none; }
@@ -29,4 +33,67 @@ p.hr_p:after {
2933
left: 0.5em;
3034
margin-right: -50%;
3135
}
32-
36+
37+
.header-content {
38+
background-color: white;
39+
text-align: left;
40+
padding: 0px;
41+
height: 149px;
42+
}
43+
44+
.header-content img {
45+
height: 100px;
46+
vertical-align: middle;
47+
float: left;
48+
margin: 20px 2em 0.8em 4%;
49+
padding: 0px;
50+
}
51+
52+
.header-content .strapline {
53+
display: inline-block;
54+
width: calc(100% - 110px - 2em - 4%);
55+
}
56+
57+
.strapline p {
58+
font-size: medium;
59+
font-family: 'Alike', serif;
60+
font-weight: bold;
61+
color: #444444;
62+
max-width: 52ch;
63+
margin-top: 0.25em;
64+
}
65+
66+
.header-content h1 {
67+
font-size: 3.5rem;
68+
font-family: 'Alike', serif;
69+
margin-top: 40px;
70+
padding: 0px;
71+
color: #323232;
72+
padding-bottom: 0.2em;
73+
}
74+
75+
.header-content h1 span.version {
76+
font-size: 1.5rem;
77+
}
78+
79+
.github-forkme {
80+
position: absolute;
81+
top: 0;
82+
right: 80px;
83+
border: 0;
84+
}
85+
86+
/* Take into account the resizing effect of the page (which has a minimum */
87+
/* width of 740px + 80px margins). */
88+
@media screen and (max-width: calc(740px + 80px + 80px)) {
89+
.github-forkme {
90+
right: calc(100% - 740px - 80px);
91+
}
92+
}
93+
94+
@media screen and (max-width: calc(740px + 80px)) {
95+
.github-forkme {
96+
left: calc(740px + 80px - 149px);
97+
right: 0px;
98+
}
99+
}

docs/iris/src/_templates/index.html

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{{ super() }}
55

66
<script type="text/javascript" src="{{ pathto("_static/jquery.cycle.all.latest.js", 1) }}"></script>
7-
<script type="text/javascript" src="{{ pathto("_static/random_image.js", 1) }}"></script>
7+
<script type="text/javascript" src="{{ pathto("_static/random_image.js", 1) }}" async></script>
88

99
<style type="text/css">
1010
#slideshow { width: 400px; }
@@ -13,15 +13,6 @@
1313
#sliderNav div { display: inline-block; height: 8px; width: 8px; margin: 0 2px;
1414
border: #ccc medium solid; border-radius: 50%; box-shadow: 0 0 2px 0 #ccc;}
1515
#sliderNav div.activeSlide { border-color: #777; background-color: #ccc; }
16-
17-
18-
.bodywrapper {
19-
width: 100%;
20-
}
21-
.sphinxsidebarwrapper {
22-
display: none
23-
}
24-
2516
</style>
2617

2718
<script type="text/javascript">

docs/iris/src/_templates/layout.html

Lines changed: 17 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
<link rel="stylesheet" href="{{ pathto('_static/style.css', 1) }}" type="text/css" />
99
<script type="text/javascript" src="http://docs.python.org/2/_static/copybutton.js"></script>
1010

11-
<!-- Nice fonts... -->
12-
<link href="https://fonts.googleapis.com/css?family=Alike" rel="stylesheet">
11+
<link rel="icon" type="image/png" sizes="32x32" href="{{ pathto('_static/favicon-32x32.png', 1) }}">
12+
<link rel="icon" type="image/png" sizes="16x16" href="{{ pathto('_static/favicon-16x16.png', 1) }}">
13+
14+
<link href="https://fonts.googleapis.com/css?family=Alike|Noto+Sans" rel="stylesheet">
1315
{% endblock %}
1416

1517

@@ -23,49 +25,24 @@
2325

2426
{% block relbar1 %}
2527

26-
27-
28-
29-
<style>
30-
.github-img {
31-
position: absolute;
32-
top: 0;
33-
right: 80px;
34-
border: 0;
35-
}
36-
37-
/* Take into account the resizing effect of the page (which has a minimum */
38-
/* width of 740px + 80px margins). */
39-
@media screen and (max-width: calc(740px + 80px + 80px)) {
40-
.github-img {
41-
right: calc(100% - 740px - 80px);
42-
}
43-
}
44-
45-
@media screen and (max-width: calc(740px + 80px)) {
46-
.github-img {
47-
left: calc(740px + 80px - 149px);
48-
right: 0px;
49-
}
50-
}
51-
</style>
52-
<a href="https://github.com/you">
53-
<img class="github-img" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub">
28+
<a href="https://github.com/SciTools/iris">
29+
<img class="github-forkme" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"
30+
alt="Fork Iris on GitHub" />
5431
</a>
5532

5633

57-
<div style="background-color: white; text-align: left; padding: 0px; height: 149px;">
34+
<div class="header-content">
5835
<a href="{{ pathto("index") }}">
59-
<img src="{{ pathto("_static/Iris7_1_trim_100.png", 1) }}" border="0" style="height: 100px; vertical-align: middle; float: left; margin: 20px 2em 0.8em 4%; padding: 0px;" alt="Logo" />
36+
<img src="{{ pathto("_static/Iris7_1_trim_100.png", 1) }}" alt="Iris logo" />
6037
</a>
61-
<div style="display: inline-block; width: calc(100% - 110px - 2em - 4%);">
62-
<h1 style="font-size: 3.5rem; font-family: 'Alike', serif; margin-top: 40px; padding: 0px; color: #323232; padding-bottom: 0.2em;">
63-
Iris <span style="font-size: 1.5rem;">v2.1</span>
38+
<div class="strapline">
39+
<h1>
40+
Iris <span class="version">v2.1</span>
6441
</h1>
65-
<h4 style="padding: 0px; max-width: 60ch; margin-top: 0px; margin-bottom: 0px;">
66-
a powerful, easy to use, community-driven Python library for analysing and
67-
visualising Earth science data
68-
</h4>
42+
<p>
43+
A powerful, format-agnostic, and community-driven Python library for analysing and
44+
visualising Earth science data.
45+
</p>
6946
</div>
7047
</div>
7148

@@ -90,5 +67,5 @@ <h4 style="padding: 0px; max-width: 60ch; margin-top: 0px; margin-bottom: 0px;">
9067
</div>
9168

9269
<!-- Include a version switcher to easily move between the documentation of different versions -->
93-
<script type=text/javascript src=/iris/docs/version_switch.js></script>
70+
<script type=text/javascript src="/iris/docs/version_switch.js" async></script>
9471
{% endblock %}

docs/iris/src/conf.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,13 @@
5656
# Add any Sphinx extension module names here, as strings. They can be extensions
5757
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
5858
extensions = ['sphinx.ext.autodoc',
59-
'sphinx.ext.coverage',
60-
'sphinx.ext.imgmath',
6159
'sphinx.ext.autosummary',
60+
'sphinx.ext.coverage',
61+
'sphinx.ext.doctest',
62+
'sphinx.ext.extlinks',
6263
'sphinx.ext.graphviz',
64+
'sphinx.ext.imgmath',
6365
'sphinx.ext.intersphinx',
64-
'sphinx.ext.doctest',
6566
'matplotlib.sphinxext.mathmpl',
6667
'matplotlib.sphinxext.only_directives',
6768
'matplotlib.sphinxext.plot_directive',
@@ -163,6 +164,12 @@
163164
'scipy': ('http://docs.scipy.org/doc/scipy/reference/', None),
164165
}
165166

167+
# -- Extlinks extension -------------------------------------------------------
168+
169+
extlinks = {'issue': ('https://github.com/SciTools/iris/issues/%s',
170+
'Issue #'),
171+
'pull': ('https://github.com/SciTools/iris/pull/%s', 'PR #'),
172+
}
166173

167174
# -- Doctest ------------------------------------------------------------------
168175

docs/iris/src/whatsnew/2.1.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,24 +52,25 @@ Iris 2.1 Features
5252
if the originals were.
5353
* Added :meth:`iris.analysis.trajectory.interpolate` that allows you to
5454
interpolate to find values along a trajectory.
55-
* It is now possible to add an attribute of ``missing_value`` to a cube.
56-
https://github.com/SciTools/iris/issues/1588
55+
* It is now possible to add an attribute of ``missing_value`` to a cube
56+
(:issue:`1588`).
5757
* Iris can now represent data on the Albers Equal Area Projection,
58-
and the NetCDF loader and saver were updated to handle this.
59-
https://github.com/SciTools/iris/issues/2943
58+
and the NetCDF loader and saver were updated to handle this. (:issue:`2943`)
6059
* The :class:`~iris.coord_systems.Mercator` projection has been updated to accept
61-
the ``standard_parallel`` keyword argument.
60+
the ``standard_parallel`` keyword argument (:pull:`3041`).
6261

6362
Bugs Fixed
6463
==========
6564

6665
* All var names being written to NetCDF are now CF compliant.
6766
Non alpha-numeric characters are replaced with '_', and var names now always
68-
have a leading letter. https://github.com/SciTools/iris/pull/2930
67+
have a leading letter (:pull:`2930`).
6968
* A cube resulting from a regrid operation using the `iris.analysis.AreaWeighted`
7069
regridding scheme will now have the smallest floating point data type
7170
to which the source cube's data type can be safely converted using NumPy's
7271
type promotion rules.
72+
* :mod:`iris.quickplot` labels now honour the axes being drawn to when using the
73+
``axes`` keyword (:pull:`3010`).
7374

7475
Incompatible Changes
7576
====================

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def extract_version():
239239
url='http://scitools.org.uk/iris/',
240240
author='UK Met Office',
241241
author_email='scitools-iris-dev@googlegroups.com',
242-
description="A powerful, easy to use, and community-driven Python "
242+
description="A powerful, format-agnostic, and community-driven Python "
243243
"library for analysing and visualising Earth science data",
244244
long_description=description,
245245
long_description_content_type='text/markdown',

0 commit comments

Comments
 (0)