{%- endif %}
diff --git a/alabaster/static/alabaster.css_t b/alabaster/static/alabaster.css_t
index 3964f98..dfbda89 100644
--- a/alabaster/static/alabaster.css_t
+++ b/alabaster/static/alabaster.css_t
@@ -1,53 +1,55 @@
-{% set theme_body_bg = theme_body_bg or theme_base_bg %}
-{% set theme_code_highlight_bg = theme_code_highlight_bg or theme_body_bg %}
-{% set theme_sidebar_header = theme_sidebar_header or theme_gray_1 %}
-{% set theme_sidebar_link = theme_sidebar_link or theme_gray_1 %}
-{% set theme_anchor_hover_fg = theme_anchor_hover_fg or theme_gray_1 %}
+{%- set theme_body_bg = theme_body_bg or theme_base_bg %}
+{%- set theme_code_highlight_bg = theme_code_highlight_bg or theme_body_bg %}
+{%- set theme_sidebar_header = theme_sidebar_header or theme_gray_1 %}
+{%- set theme_sidebar_link = theme_sidebar_link or theme_gray_1 %}
+{%- set theme_anchor_hover_fg = theme_anchor_hover_fg or theme_gray_1 %}
-{% set theme_footnote_border = theme_footnote_border or theme_gray_2 %}
-{% set theme_pre_bg = theme_pre_bg or theme_gray_2 %}
+{%- set theme_footnote_border = theme_footnote_border or theme_gray_2 %}
+{%- set theme_pre_bg = theme_pre_bg or theme_gray_2 %}
-{# set up admonition styling #}
-{# - basic level #}
-{% set theme_admonition_xref_bg = theme_admonition_xref_bg or theme_xref_bg %}
-{% set theme_admonition_bg = theme_admonition_bg or theme_gray_2 %}
-{% set theme_note_bg = theme_note_bg or theme_gray_2 %}
-{% set theme_seealso_bg = theme_seealso_bg or theme_gray_2 %}
+{#- set up admonition styling #}
+{#- - basic level #}
+{%- set theme_admonition_xref_bg = theme_admonition_xref_bg or theme_xref_bg %}
+{%- set theme_admonition_bg = theme_admonition_bg or theme_gray_2 %}
+{%- set theme_note_bg = theme_note_bg or theme_gray_2 %}
+{%- set theme_seealso_bg = theme_seealso_bg or theme_gray_2 %}
-{# - critical level #}
-{% set theme_danger_bg = theme_danger_bg or theme_pink_1 %}
-{% set theme_danger_border = theme_danger_border or theme_pink_2 %}
-{% set theme_danger_shadow = theme_danger_shadow or theme_pink_3 %}
+{#- - critical level #}
+{%- set theme_danger_bg = theme_danger_bg or theme_pink_1 %}
+{%- set theme_danger_border = theme_danger_border or theme_pink_2 %}
+{%- set theme_danger_shadow = theme_danger_shadow or theme_pink_3 %}
-{% set theme_error_bg = theme_error_bg or theme_pink_1 %}
-{% set theme_error_border = theme_error_border or theme_pink_2 %}
-{% set theme_error_shadow = theme_error_shadow or theme_pink_3 %}
+{%- set theme_error_bg = theme_error_bg or theme_pink_1 %}
+{%- set theme_error_border = theme_error_border or theme_pink_2 %}
+{%- set theme_error_shadow = theme_error_shadow or theme_pink_3 %}
-{# - warning level #}
-{% set theme_caution_bg = theme_caution_bg or theme_pink_1 %}
-{% set theme_caution_border = theme_caution_border or theme_pink_2 %}
+{#- - warning level #}
+{%- set theme_caution_bg = theme_caution_bg or theme_pink_1 %}
+{%- set theme_caution_border = theme_caution_border or theme_pink_2 %}
-{% set theme_attention_bg = theme_attention_bg or theme_pink_1 %}
-{% set theme_attention_border = theme_attention_border or theme_pink_2 %}
+{%- set theme_attention_bg = theme_attention_bg or theme_pink_1 %}
+{%- set theme_attention_border = theme_attention_border or theme_pink_2 %}
-{% set theme_warn_bg = theme_warn_bg or theme_pink_1 %}
-{% set theme_warn_border = theme_warn_border or theme_pink_2 %}
+{%- set theme_warn_bg = theme_warn_bg or theme_pink_1 %}
+{%- set theme_warn_border = theme_warn_border or theme_pink_2 %}
-{# - normal level #}
-{% set theme_important_bg = theme_important_bg or theme_gray_2 %}
-{% set theme_tip_bg = theme_tip_bg or theme_gray_2 %}
-{% set theme_hint_bg = theme_hint_bg or theme_gray_2 %}
+{#- - normal level #}
+{%- set theme_important_bg = theme_important_bg or theme_gray_2 %}
+{%- set theme_tip_bg = theme_tip_bg or theme_gray_2 %}
+{%- set theme_hint_bg = theme_hint_bg or theme_gray_2 %}
-{# /set up admonition styling #}
+{#- /set up admonition styling #}
-{% set theme_shadow = theme_shadow or theme_gray_2 %}
+{%- set theme_shadow = theme_shadow or theme_gray_2 %}
-{% set theme_topic_bg = theme_topic_bg or theme_gray_2 %}
+{%- set theme_topic_bg = theme_topic_bg or theme_gray_2 %}
-{% set theme_narrow_sidebar_link = theme_narrow_sidebar_link or theme_gray_3 %}
-{% set theme_sidebar_hr = theme_sidebar_hr or theme_gray_3 %}
+{%- set theme_narrow_sidebar_link = theme_narrow_sidebar_link or theme_gray_3 %}
+{%- set theme_sidebar_hr = theme_sidebar_hr or theme_gray_3 %}
+
+{%- set theme_relbar_border = theme_relbar_border or theme_gray_2 -%}
@import url("basic.css");
@@ -704,3 +706,50 @@ table.docutils.citation, table.docutils.citation td, table.docutils.citation th
-webkit-box-shadow: none;
box-shadow: none;
}
+
+
+/* relbar */
+
+.related {
+ line-height: 30px;
+ width: 100%;
+ font-size: 0.9rem;
+}
+
+.related.top {
+ border-bottom: 1px solid {{ theme_relbar_border }};
+ margin-bottom: 20px;
+}
+
+.related.bottom {
+ border-top: 1px solid {{ theme_relbar_border }};
+}
+
+.related ul {
+ padding: 0;
+ margin: 0;
+ list-style: none;
+}
+
+.related li {
+ display: inline;
+}
+
+nav#rellinks {
+ float: right;
+}
+
+nav#rellinks li+li:before {
+ content: "|";
+}
+
+nav#breadcrumbs li+li:before {
+ content: "\00BB";
+}
+
+/* Hide certain items when printing */
+@media print {
+ div.related {
+ display: none;
+ }
+}
diff --git a/alabaster/theme.conf b/alabaster/theme.conf
index eead126..f21593a 100644
--- a/alabaster/theme.conf
+++ b/alabaster/theme.conf
@@ -27,6 +27,9 @@ sidebar_includehidden = true
sidebar_collapse = true
show_powered_by = true
show_related = false
+show_relbars = false
+show_relbar_top =
+show_relbar_bottom =
gray_1 = #444
gray_2 = #EEE
@@ -119,3 +122,4 @@ code_highlight = #FFC
page_width = 940px
sidebar_width = 220px
fixed_sidebar = false
+relbar_border =
diff --git a/docs/changelog.rst b/docs/changelog.rst
index 67b9716..2155ec1 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -2,6 +2,9 @@
Changelog
=========
+* :feature:`18` add optional *next* and *previous* links at the top and bottom
+ of page content. Use theme option ``show_relbars`` to enable these. Credit:
+ William Minchin.
* :release:`0.7.10 <2017-02-28>`
* :bug:`32` Update styling of various block-level elements such as admonitions
(``.. note::``, ``.. warning::``, etc) and code blocks (``.. code::``) so
diff --git a/docs/customization.rst b/docs/customization.rst
index 1d3d262..e4d44a9 100644
--- a/docs/customization.rst
+++ b/docs/customization.rst
@@ -158,6 +158,10 @@ Variables and feature toggles
main body of the page scrolls but the sidebar remains visible. (Applies only
to desktop window sizes; the mobile view is unaffected.) Defaults to
``false``.
+* ``show_relbars``: ``true`` or ``false`, defaults to ``false`` - used to
+ display *next* and *previous* links above and below the main page content. If
+ you only want to display one, this setting can be further overriden through
+ the ``show_relbar_top`` and ``show_relbar_bottom`` settings.
Style colors
------------
@@ -208,6 +212,8 @@ colorscheme. The more granular settings can be used to override as needed.
* ``narrow_sidebar_fg``: Text color of same.
* ``narrow_sidebar_link``: Link color of same. Defaults to ``gray_3``.
* ``code_highlight``: Color of highlight when using ``:emphasize-lines:`` in a code block.
+* ``relbar_border``: Color of border between bar holding *next* and *previous*
+ links, the rest of the page content. Defulats to ``gray_2``.
Fonts
-----