fixed moving subtitle if subtitle doesn’t exist

This commit is contained in:
Lucien Cartier-Tilet 2020-05-02 19:23:06 +02:00
parent e8e18d6084
commit b012489340
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA

View File

@ -187,8 +187,11 @@ Future<void> reorganizeHtml() async {
await makeNavbar().then((navbar) {
querySelector('body').insertAdjacentElement('afterBegin', navbar);
querySelector('nav').insertAdjacentElement('afterEnd', makeHeader());
querySelector('.title')
.insertAdjacentElement('afterEnd', querySelector('.subtitle'));
final subtitle = querySelector('.subtitle');
if (subtitle != null) {
querySelector('header').append(subtitle);
}
querySelector('.title br').remove();
querySelector('#toc-drop')
.append(querySelector('#table-of-contents')..classes.add('dropdown'));
});