forked from just-the-docs/just-the-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'v0.2.7-release' into mathjax
- Loading branch information
Showing
16 changed files
with
147 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
{{ site.title }} | ||
{% if site.logo %} | ||
<div class="site-logo"></div> | ||
{% else %} | ||
{{ site.title }} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// | ||
// Custom overrides from a user. | ||
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
document.addEventListener("DOMContentLoaded", function(){ | ||
|
||
const toggleDarkMode = document.querySelector('.js-toggle-dark-mode') | ||
const cssFile = document.querySelector('[rel="stylesheet"]') | ||
const originalCssRef = cssFile.getAttribute('href') | ||
const darkModeCssRef = originalCssRef.replace('just-the-docs.css', 'dark-mode-preview.css') | ||
const buttonCopy = ['Return to the light side', 'Preview dark color scheme'] | ||
const updateButtonText = function(toggleDarkMode) { | ||
toggleDarkMode.textContent === buttonCopy[0] ? | ||
toggleDarkMode.textContent = buttonCopy[1] : | ||
toggleDarkMode.textContent = buttonCopy[0] | ||
} | ||
|
||
addEvent(toggleDarkMode, 'click', function(){ | ||
if (cssFile.getAttribute('href') === originalCssRef) { | ||
cssFile.setAttribute('href', darkModeCssRef) | ||
updateButtonText(toggleDarkMode) | ||
} else { | ||
cssFile.setAttribute('href', originalCssRef) | ||
updateButtonText(toggleDarkMode) | ||
} | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
--- | ||
--- | ||
{ | ||
{% for page in site.html_pages %}{% if page.search_exclude != true %}"{{ forloop.index0 }}": { | ||
{% assign comma = false %} | ||
{% for page in site.html_pages %}{% if page.search_exclude != true %}{% if comma == true%},{% endif %}"{{ forloop.index0 }}": { | ||
"title": "{{ page.title | replace: '&', '&' }}", | ||
"content": "{{ page.content | markdownify | replace: '</h', ' . </h' | replace: '<hr', ' . <hr' | replace: '</p', ' . </p' | replace: '</ul', ' . </ul' | replace: '</tr', ' . </tr' | replace: '</li', ' | </li' | replace: '</td', ' | </td' | strip_html | escape_once | remove: 'Table of contents' | remove: '```' | remove: '---' | replace: '\', ' ' | replace: ' . . . ', ' . ' | replace: ' . . ', ' . ' | normalize_whitespace }}", | ||
"url": "{{ page.url | absolute_url }}", | ||
"relUrl": "{{ page.url }}" | ||
}{% unless forloop.last %},{% endunless %} | ||
}{% assign comma = true %} | ||
{% endif %}{% endfor %} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.