Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds OLCF logo to user docs #209

Merged
merged 1 commit into from
Feb 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions _static/css/theme_overrides.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,31 @@
.wy-side-nav-search, .wy-nav-top {
background: #007833;
}

.wy-nav-content {
max-width: 1200px;
}

/* Adds whitespace between OLCF logo and Docs Home link */
body > div > nav > div > div.wy-side-nav-search > a > img {
padding-bottom: 10px;
}

/* Clicking on the OLCF logo does nothing
(disable RTD theme's default <a> behavior) */
body > div > nav > div > div.wy-side-nav-search > a{
pointer-events: none;
cursor: default;
}

/* Supersede the above block, and allow the Docs Home link to be clickable */
body > div > nav > div > div.wy-side-nav-search > a > a{
pointer-events: auto !important;
cursor: pointer !important;
color: grey !important;
}

/* Don't let the color of the Docs Home link change. */
body > div > nav > div > div.wy-side-nav-search > a > a:visited{
color: grey !important;
}

/* override table width restrictions */
@media screen and (min-width: 767px) {

Expand Down
9 changes: 9 additions & 0 deletions _static/js/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,13 @@ $( document ).ready(function() {
aside.appendChild(separator);
aside.appendChild(olcf_link);

// Insert Project Name "OLCF User Documentation" below html_logo in sidebar navigation
var project_name_link = document.createElement("a");
var project_name_text = document.createTextNode(" OLCF User Documentation");
project_name_link.appendChild(project_name_text);
project_name_link.setAttribute("href", "https://docs.olcf.ornl.gov");
project_name_link.classList.add("icon");
project_name_link.classList.add("icon-home");
wysidenavsearch = document.querySelector("body > div > nav > div > div.wy-side-nav-search > a");
wysidenavsearch.appendChild(project_name_link);
});
4 changes: 4 additions & 0 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
'js/custom.js',
]

html_logo = 'images/olcf_logo.png'

html_favicon = 'images/favicon.ico'

html_context = {
Expand All @@ -92,6 +94,8 @@
'sticky_navigation': True,
'navigation_depth': 4,
'style_external_links': True,
'style_nav_header_background': '#efefef',
'logo_only': True,
}


Expand Down