mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 22:54:42 -04:00
Update toc styles to make toc menu always accessible without scrolling
This commit is contained in:
parent
8d24d9e97f
commit
e08152ed03
2 changed files with 9 additions and 2 deletions
|
@ -595,6 +595,7 @@ function generateToc(id) {
|
|||
});
|
||||
if (target.text() == 'undefined')
|
||||
target.html('');
|
||||
var tocMenu = $('<div class="toc-menu"></div');
|
||||
var toggle = $('<a class="expand-toggle" href="#">Expand all</a>');
|
||||
var backtotop = $('<a class="back-to-top" href="#">Back to top</a>');
|
||||
var gotobottom = $('<a class="go-to-bottom" href="#">Go to bottom</a>');
|
||||
|
@ -619,7 +620,8 @@ function generateToc(id) {
|
|||
scrollToBottom();
|
||||
removeHash();
|
||||
});
|
||||
target.append(toggle).append(backtotop).append(gotobottom);
|
||||
tocMenu.append(toggle).append(backtotop).append(gotobottom);
|
||||
target.append(tocMenu);
|
||||
}
|
||||
|
||||
//smooth all hash trigger scrolling
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue