Merge branch 'fix/doc/rel-prev-next' of https://github.com/vincentbernat/rust into rollup_central
This commit is contained in:
commit
3ba0b3c722
1 changed files with 2 additions and 0 deletions
|
|
@ -57,11 +57,13 @@ document.addEventListener("DOMContentLoaded", function(event) {
|
|||
if (i > 0) {
|
||||
var prevNode = toc[i-1].cloneNode(true);
|
||||
prevNode.className = 'left';
|
||||
prevNode.setAttribute('rel', 'prev');
|
||||
nav.appendChild(prevNode);
|
||||
}
|
||||
if (i < toc.length - 1) {
|
||||
var nextNode = toc[i+1].cloneNode(true);
|
||||
nextNode.className = 'right';
|
||||
nextNode.setAttribute('rel', 'next');
|
||||
nav.appendChild(nextNode);
|
||||
}
|
||||
document.getElementById('page').appendChild(nav);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue