diff options
author | VirtualTam <virtualtam@flibidi.net> | 2017-08-01 19:00:03 +0200 |
---|---|---|
committer | VirtualTam <virtualtam@flibidi.net> | 2017-08-02 14:48:41 +0200 |
commit | 9ff77362fe3c132ac390399e184424edcbfcf90a (patch) | |
tree | 8fa58c4a9cf32c80b766527b8792c6b277532a0b /doc/html/js/theme.js | |
parent | c71c7e2bd49be4123a79d0bf9a882ea516f07674 (diff) | |
download | Shaarli-9ff77362fe3c132ac390399e184424edcbfcf90a.tar.gz Shaarli-9ff77362fe3c132ac390399e184424edcbfcf90a.tar.zst Shaarli-9ff77362fe3c132ac390399e184424edcbfcf90a.zip |
documentation: remove generated HTML from SCM
Relates to https://github.com/shaarli/Shaarli/issues/908
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Diffstat (limited to 'doc/html/js/theme.js')
-rw-r--r-- | doc/html/js/theme.js | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/doc/html/js/theme.js b/doc/html/js/theme.js deleted file mode 100644 index 99b146ec..00000000 --- a/doc/html/js/theme.js +++ /dev/null | |||
@@ -1,82 +0,0 @@ | |||
1 | $( document ).ready(function() { | ||
2 | // Shift nav in mobile when clicking the menu. | ||
3 | $(document).on('click', "[data-toggle='wy-nav-top']", function() { | ||
4 | $("[data-toggle='wy-nav-shift']").toggleClass("shift"); | ||
5 | $("[data-toggle='rst-versions']").toggleClass("shift"); | ||
6 | }); | ||
7 | |||
8 | // Close menu when you click a link. | ||
9 | $(document).on('click', ".wy-menu-vertical .current ul li a", function() { | ||
10 | $("[data-toggle='wy-nav-shift']").removeClass("shift"); | ||
11 | $("[data-toggle='rst-versions']").toggleClass("shift"); | ||
12 | }); | ||
13 | |||
14 | $(document).on('click', "[data-toggle='rst-current-version']", function() { | ||
15 | $("[data-toggle='rst-versions']").toggleClass("shift-up"); | ||
16 | }); | ||
17 | |||
18 | // Make tables responsive | ||
19 | $("table.docutils:not(.field-list)").wrap("<div class='wy-table-responsive'></div>"); | ||
20 | |||
21 | hljs.initHighlightingOnLoad(); | ||
22 | |||
23 | $('table').addClass('docutils'); | ||
24 | }); | ||
25 | |||
26 | window.SphinxRtdTheme = (function (jquery) { | ||
27 | var stickyNav = (function () { | ||
28 | var navBar, | ||
29 | win, | ||
30 | stickyNavCssClass = 'stickynav', | ||
31 | applyStickNav = function () { | ||
32 | if (navBar.height() <= win.height()) { | ||
33 | navBar.addClass(stickyNavCssClass); | ||
34 | } else { | ||
35 | navBar.removeClass(stickyNavCssClass); | ||
36 | } | ||
37 | }, | ||
38 | enable = function () { | ||
39 | applyStickNav(); | ||
40 | win.on('resize', applyStickNav); | ||
41 | }, | ||
42 | init = function () { | ||
43 | navBar = jquery('nav.wy-nav-side:first'); | ||
44 | win = jquery(window); | ||
45 | }; | ||
46 | jquery(init); | ||
47 | return { | ||
48 | enable : enable | ||
49 | }; | ||
50 | }()); | ||
51 | return { | ||
52 | StickyNav : stickyNav | ||
53 | }; | ||
54 | }($)); | ||
55 | |||
56 | // The code below is a copy of @seanmadsen code posted Jan 10, 2017 on issue 803. | ||
57 | // https://github.com/mkdocs/mkdocs/issues/803 | ||
58 | // This just incorporates the auto scroll into the theme itself without | ||
59 | // the need for additional custom.js file. | ||
60 | // | ||
61 | $(function() { | ||
62 | $.fn.isFullyWithinViewport = function(){ | ||
63 | var viewport = {}; | ||
64 | viewport.top = $(window).scrollTop(); | ||
65 | viewport.bottom = viewport.top + $(window).height(); | ||
66 | var bounds = {}; | ||
67 | bounds.top = this.offset().top; | ||
68 | bounds.bottom = bounds.top + this.outerHeight(); | ||
69 | return ( ! ( | ||
70 | (bounds.top <= viewport.top) || | ||
71 | (bounds.bottom >= viewport.bottom) | ||
72 | ) ); | ||
73 | }; | ||
74 | if( $('li.toctree-l1.current').length && !$('li.toctree-l1.current').isFullyWithinViewport() ) { | ||
75 | $('.wy-nav-side') | ||
76 | .scrollTop( | ||
77 | $('li.toctree-l1.current').offset().top - | ||
78 | $('.wy-nav-side').offset().top - | ||
79 | 60 | ||
80 | ); | ||
81 | } | ||
82 | }); | ||