Skip to content

Commit

Permalink
Merge pull request #651 from tripal/650-theme_rtd
Browse files Browse the repository at this point in the history
Brand ReadtheDocs
  • Loading branch information
spficklin committed Sep 15, 2018
2 parents 6e6bce5 + ffd12f7 commit 386a887
Show file tree
Hide file tree
Showing 4 changed files with 136 additions and 8 deletions.
Binary file added docs/_static/hexagon_pattern.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/small_logoonly.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
132 changes: 130 additions & 2 deletions docs/_static/theme_overrides.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,140 @@ See: https://rackerlabs.github.io/docs-rackspace/tools/rtd-tables.html
@media screen and (min-width: 767px) {

.wy-table-responsive table td {
/* !important prevents the common CSS stylesheets from overriding
this as on RTD they are loaded after this stylesheet */
white-space: normal !important;
}

.wy-table-responsive {
overflow: visible !important;
}
}


/**
* BRANDING
*/

/* Sidebar Title */
.wy-side-nav-search {
background: none !important;
}
.wy-side-nav-search input[type="text"] {
border-color: black;
}
.wy-nav-side {
color: #CCCCCC !important;
background: #2D2D34 !important;
background-image: url("hexagon_pattern.png") !important;
background-repeat: repeat !important;
background: -webkit-linear-gradient(left, $light-grey , $gray-base) !important;
background: linear-gradient(to right, $light-grey , $gray-base) !important;
}
/* Logo */
.fa-home::before, .icon-home::before {
content: url('small_logoonly.png')
}
/* Sidebar TOC */
.wy-menu-vertical li.current {
color: #CCCCCC;
border-color: black;
background: rgba(0,0,0,0.5);
}
.wy-menu-vertical li.toctree-l1.current > a {
color: black;
border-color: whitesmoke;
background-color: whitesmoke;
}
.wy-menu-vertical li.toctree-l2.current > a,
.wy-menu-vertical li.toctree-l2.current li.toctree-l3 > a,
.wy-menu-vertical li.toctree-l3.current li.toctree-l4 > a {
color: #CCCCCC;
border-color: black;
background-color: rgba(0,0,0,0.05);
}
.wy-menu-vertical li.current a:hover,
.wy-menu-vertical li.toctree-l1.current > a:hover,
.wy-menu-vertical li.toctree-l2.current > a:hover,
.wy-menu-vertical li.toctree-l2.current li.toctree-l3 > a:hover,
.wy-menu-vertical li.toctree-l3.current li.toctree-l4 > a:hover {
color: white;
border-color: black;
font-weight: bold;
background-color: rgba(0,0,0);
}
.wy-menu-vertical li.toctree-l1 a,
.wy-menu-vertical li.toctree-l2 a,
.wy-menu-vertical li.toctree-l3 a,
.wy-menu-vertical li.toctree-l4 a {
color: #CCCCCC;
border-color: black;
}
/* Main Content */
.wy-nav-content-wrap {
background: whitesmoke;
}
a, a:hover {
color: #990000;
}
a:visited {
color: #cc0000;
}
a.icon-home:visited {
color: #ffffff;
}
/* Code blocks */
.highlight {
background: #e1f0db;
}
/* Default Notes */
.wy-alert.wy-alert-info,
.rst-content .note,
.rst-content .wy-alert-info.attention,
.rst-content .wy-alert-info.caution,
.rst-content .wy-alert-info.danger,
.rst-content .wy-alert-info.error,
.rst-content .wy-alert-info.hint,
.rst-content .wy-alert-info.important,
.rst-content .wy-alert-info.tip,
.rst-content .wy-alert-info.warning,
.rst-content .seealso, .rst-content
.wy-alert-info.admonition-todo,
.rst-content .wy-alert-info.admonition {
background: #d9d9d9;
}
.wy-alert.wy-alert-info
.wy-alert-title,
.rst-content .note .wy-alert-title,
.rst-content .wy-alert-info.attention .wy-alert-title,
.rst-content .wy-alert-info.caution .wy-alert-title,
.rst-content .wy-alert-info.danger .wy-alert-title,
.rst-content .wy-alert-info.error .wy-alert-title,
.rst-content .wy-alert-info.hint .wy-alert-title,
.rst-content .wy-alert-info.important .wy-alert-title,
.rst-content .wy-alert-info.tip .wy-alert-title,
.rst-content .wy-alert-info.warning .wy-alert-title,
.rst-content .seealso .wy-alert-title,
.rst-content .wy-alert-info.admonition-todo .wy-alert-title,
.rst-content .wy-alert-info.admonition .wy-alert-title,
.wy-alert.wy-alert-info .rst-content .admonition-title,
.rst-content .wy-alert.wy-alert-info .admonition-title,
.rst-content .note .admonition-title,
.rst-content .wy-alert-info.attention .admonition-title,
.rst-content .wy-alert-info.caution .admonition-title,
.rst-content .wy-alert-info.danger .admonition-title,
.rst-content .wy-alert-info.error .admonition-title,
.rst-content .wy-alert-info.hint .admonition-title,
.rst-content .wy-alert-info.important .admonition-title,
.rst-content .wy-alert-info.tip .admonition-title,
.rst-content .wy-alert-info.warning .admonition-title,
.rst-content .seealso .admonition-title, .rst-content
.wy-alert-info.admonition-todo .admonition-title,
.rst-content .wy-alert-info.admonition .admonition-title {
background: #737373;
}
/* Note Warnings */
.wy-alert.wy-alert-warning .wy-alert-title, .rst-content .wy-alert-warning.note .wy-alert-title, .rst-content .attention .wy-alert-title, .rst-content .caution .wy-alert-title, .rst-content .wy-alert-warning.danger .wy-alert-title, .rst-content .wy-alert-warning.error .wy-alert-title, .rst-content .wy-alert-warning.hint .wy-alert-title, .rst-content .wy-alert-warning.important .wy-alert-title, .rst-content .wy-alert-warning.tip .wy-alert-title, .rst-content .warning .wy-alert-title, .rst-content .wy-alert-warning.seealso .wy-alert-title, .rst-content .admonition-todo .wy-alert-title, .rst-content .wy-alert-warning.admonition .wy-alert-title, .wy-alert.wy-alert-warning .rst-content .admonition-title, .rst-content .wy-alert.wy-alert-warning .admonition-title, .rst-content .wy-alert-warning.note .admonition-title, .rst-content .attention .admonition-title, .rst-content .caution .admonition-title, .rst-content .wy-alert-warning.danger .admonition-title, .rst-content .wy-alert-warning.error .admonition-title, .rst-content .wy-alert-warning.hint .admonition-title, .rst-content .wy-alert-warning.important .admonition-title, .rst-content .wy-alert-warning.tip .admonition-title, .rst-content .warning .admonition-title, .rst-content .wy-alert-warning.seealso .admonition-title, .rst-content .admonition-todo .admonition-title, .rst-content .wy-alert-warning.admonition .admonition-title {
background: #e6b800;
}
.wy-alert.wy-alert-warning, .rst-content .wy-alert-warning.note, .rst-content .attention, .rst-content .caution, .rst-content .wy-alert-warning.danger, .rst-content .wy-alert-warning.error, .rst-content .wy-alert-warning.hint, .rst-content .wy-alert-warning.important, .rst-content .wy-alert-warning.tip, .rst-content .warning, .rst-content .wy-alert-warning.seealso, .rst-content .admonition-todo, .rst-content .wy-alert-warning.admonition {
background: #FcFde6;
}
12 changes: 6 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

html_context = {
'css_files': [
'_static/theme_overrides.css', # override wide tables in RTD theme
],
}

# Override the base theme.
# We add the stylesheet this way so that it's loaded after the default.css
# See https://docs.readthedocs.io/en/latest/guides/adding-custom-css.html
def setup(app):
app.add_stylesheet('theme_overrides.css');
# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
Expand Down

0 comments on commit 386a887

Please sign in to comment.