Skip to content

Commit

Permalink
Merge pull request #1 from jade-hpc-gpu/dev-RTDJadeTheme
Browse files Browse the repository at this point in the history
Changed to RDM theme and added JADE theme extension
  • Loading branch information
mondus committed Aug 18, 2017
2 parents d3e3915 + afc300c commit 3bf2553
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 85 deletions.
5 changes: 2 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Once you have the git repository locally on your computer, you will need to inst

::

pip install sphinx_bootstrap_theme
pip install sphinx_rtd_theme

Once you have made your changes and updated your Fork on GitHub you will need to `Open a Pull Request <https://help.github.com/articles/using-pull-requests/>`_. All changes to the repository should be made through Pull Requests, including those made by the people with direct push access.

Expand Down Expand Up @@ -76,5 +76,4 @@ If there are any errors in your changes the build will fail and the documentatio
Submitting Changes and Making Contributions
-------------------------------------------

Contributions should be made by forking the documentation site repo (this repo) and submitting a pull request. Pull requests will be merged by an Admin after review.

Contributions should be made by forking the documentation site repo (this repo) and submitting a pull request. Pull requests will be merged by an Admin after review.
92 changes: 12 additions & 80 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
extensions = []

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

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
Expand All @@ -45,8 +45,8 @@

# General information about the project.
project = u'JADE'
copyright = u'2017, Mozhgan K. Chimeh'
author = u'Mozhgan K. Chimeh'
copyright = u'2017, JADE Tier 2 Centre'
author = u'JADE Tier 2'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -78,92 +78,24 @@

# -- Options for HTML output ----------------------------------------------

import sphinx_bootstrap_theme
import sphinx_rtd_theme
#html_theme = "sphinx_rtd_theme"
#html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

# Activate the theme.
html_theme = 'bootstrap'
html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
# (Optional) Logo. Should be small enough to fit the navbar (ideally 24x24).
# Path should be relative to the ``_static`` files directory.
#html_logo = "my_logo.png"


# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# Theme options are theme-specific and customize the look and feel of a
# theme further.
html_theme_options = {
# Navigation bar title. (Default: ``project`` value)
'navbar_title': "JADE User Guide",

# Tab name for entire site. (Default: "Site")
'navbar_site_name': "Home",

# A list of tuples containing pages or urls to link to.
# Valid tuples should be in the following forms:
# (name, page) # a link to a page
# (name, "/aa/bb", 1) # a link to an arbitrary relative url
# (name, "http://example.com", True) # arbitrary absolute url
# Note the "1" or "True" value above as the third argument to indicate
# an arbitrary url.
'navbar_links': [
("About", "https://mozhgan-kch.github.io/JADE/consortium/", True),
("News", "https://mozhgan-kch.github.io/JADE/news", True),
#("User Guide", "jade/index.html", True),
],

# Render the next and previous page links in navbar. (Default: true)
'navbar_sidebarrel': False,

# Render the current pages TOC in the navbar. (Default: true)
'navbar_pagenav': False,

# Tab name for the current pages TOC. (Default: "Page")
'navbar_pagenav_name': "TOC",

# Global TOC depth for "site" navbar tab. (Default: 1)
# Switching to -1 shows all levels.
'globaltoc_depth': -1,

# Include hidden TOCs in Site navbar?
#
# Note: If this is "false", you cannot have mixed ``:hidden:`` and
# non-hidden ``toctree`` directives in the same page, or else the build
# will break.
#
# Values: "true" (default) or "false"
'globaltoc_includehidden': "true",
html_theme = 'jade'

# HTML navbar class (Default: "navbar") to attach to <div> element.
# For black navbar, do "navbar navbar-inverse"
'navbar_class': "navbar navbar-inverse",
html_theme_path = ['themes'] + [sphinx_rtd_theme.get_html_theme_path()]

# Fix navigation bar to top of page?
# Values: "true" (default) or "false"
'navbar_fixed_top': "true",

# Location of link to source.
# Options are "nav" (default), "footer" or anything else to exclude.
'source_link_position': "",

# Bootswatch (http://bootswatch.com/) theme.
#
# Options are nothing (default) or the name of a valid theme
# such as "cosmo" or "sandstone".
'bootswatch_theme': "sandstone",

# Choose Bootstrap version.
# Values: "3" (default) or "2" (in quotes)
'bootstrap_version': "3",
}
# (Optional) Logo. Should be small enough to fit the navbar (ideally 24x24).
# Path should be relative to the ``_static`` files directory.
html_logo = 'images/jade_logo_small.png'


# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# html_static_path = ['_static']

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand Down
Binary file added images/jade_logo_small.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
sphinx==1.5.3 # should be same version as currently used by ReadTheDocs
sphinx-bootstrap-theme>=0.4.7,<0.5.0
sphinx_rtd_theme>=0.2.4

6 changes: 5 additions & 1 deletion _templates/layout.html → themes/jade/layout.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{# Import the theme's layout. #}
{% extends "!layout.html" %}
{% extends "sphinx_rtd_theme/layout.html" %}

{% set css_files = css_files + ['_static/customtheme.css'] %}


{% block sidebar1 %}<h3><a href="{{ pathto(master_doc) }}">{{ _('Table Of Contents') }}</a></h3>
{{ toctree(includehidden=True) }}<hr>{{ super() }}{% endblock %}

Expand Down
11 changes: 11 additions & 0 deletions themes/jade/static/customtheme.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.wy-side-nav-search {
background-color: #ffffff;
}

.wy-side-nav-search>a, .wy-side-nav-search .wy-dropdown>a {
color: #000;
}

.wy-side-nav-search input[type=text]{
border-color: #343131;
}
3 changes: 3 additions & 0 deletions themes/jade/theme.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[theme]
inherit=sphinx_rtd_theme
pygments_style=tango

0 comments on commit 3bf2553

Please sign in to comment.