From db06a51299e0888b07062cefd780d514d09ebd37 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sun, 9 Apr 2017 20:05:48 +0800 Subject: Load statusbar template by string-loader --- public/views/statusbar.html | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 public/views/statusbar.html (limited to 'public/views') diff --git a/public/views/statusbar.html b/public/views/statusbar.html deleted file mode 100644 index 24cbf6c2..00000000 --- a/public/views/statusbar.html +++ /dev/null @@ -1,41 +0,0 @@ -
-
-
- - -
-
-
-
-
- - -
-
Spaces:
-
4
- -
-
- -
-
- -
-
-
-- cgit v1.2.3 From be99350655ca33aaa14b99d7b44b529aba0c8773 Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Tue, 9 May 2017 22:11:57 +0800 Subject: Fix to implement toggle of TOC in HTML template --- public/views/html.hbs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'public/views') diff --git a/public/views/html.hbs b/public/views/html.hbs index 5ef51920..a300ddd5 100644 --- a/public/views/html.hbs +++ b/public/views/html.hbs @@ -160,6 +160,29 @@ removeHash(); }); + var toggle = $('.expand-toggle'); + var tocExpand = false; + + checkExpandToggle(); + toggle.click(function (e) { + e.preventDefault(); + e.stopPropagation(); + tocExpand = !tocExpand; + checkExpandToggle(); + }) + + function checkExpandToggle () { + var toc = $('.ui-toc-dropdown .toc'); + var toggle = $('.expand-toggle'); + if (!tocExpand) { + toc.removeClass('expand'); + toggle.text('Expand all'); + } else { + toc.addClass('expand'); + toggle.text('Collapse all'); + } + } + function scrollToTop() { $('body, html').stop(true, true).animate({ scrollTop: 0 -- cgit v1.2.3