[doc] Minor fixes (styling mostly)

Don't show edit buttons for generated pages
This commit is contained in:
Andreas Dangel
2022-03-24 12:13:01 +01:00
parent c082649dda
commit af9547af7d
8 changed files with 24 additions and 36 deletions

View File

@ -35,15 +35,16 @@ $(document).ready(function () {
anchors.add('h2,h3,h4,h5');
// Add an "Edit on GitHub" button to each header (except h1)
let url = $('div.post-content').attr('data-github-edit-url');
$('div.post-content')
.find(':header:not(h1)')
.append(
' <a class="edit-header" target="_blank" href=' +
url +
' role="button">✏️️</a>'
);
let url = $('div.post-content').data('githubEditUrl');
if ( url !== undefined ) {
$('div.post-content')
.find(':header:not(h1)')
.append(
' <a class="edit-header" target="_blank" href=' +
url +
' role="button">✏️️</a>'
);
}
// Check if TOC needs to be moved on page load
moveToc();