This repository has been archived by the owner on Oct 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alexander Matyushentsev
authored and
Alexander Matyushentsev
committed
Jan 2, 2021
1 parent
024b3b3
commit 3397d9f
Showing
3 changed files
with
45 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
.rst-other-versions { | ||
text-align: right; | ||
} | ||
|
||
.rst-other-versions > dl, .rst-other-versions dt, .rst-other-versions small { | ||
display: none; | ||
} | ||
|
||
.rst-other-versions > dl:first-child { | ||
display: block; | ||
} | ||
|
||
.rst-versions.shift-up .rst-other-versions { | ||
display: block; | ||
} | ||
|
||
.rst-versions .rst-other-versions { | ||
display: none; | ||
} |
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,22 @@ | ||
function callback(response) { | ||
const div = document.createElement('div'); | ||
div.innerHTML = response.html; | ||
document.body.appendChild(div); | ||
const container = div.querySelector('.rst-versions'); | ||
div.querySelector('.rst-current-version').addEventListener('click', function() { | ||
const classes = container.className.split(' '); | ||
const index = classes.indexOf('shift-up'); | ||
if (index === -1) { | ||
classes.push('shift-up'); | ||
} else { | ||
classes.splice(index, 1); | ||
} | ||
container.className = classes.join(' '); | ||
}); | ||
} | ||
|
||
var script = document.createElement('script'); | ||
script.src = 'https://argocd-notifications.readthedocs.io/_/api/v2/footer_html/?'+ | ||
'callback=callback&project=argocd-notifications&page=&theme=mkdocs&format=jsonp&docroot=docs&source_suffix=.md&version=' + (window['READTHEDOCS_DATA'] || { version: 'latest' }).version; | ||
|
||
document.getElementsByTagName('head')[0].appendChild(script); |
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