diff --git a/doc/themes/nekui/layout/layout.ejs b/doc/themes/nekui/layout/layout.ejs index f720ba41..8de2b7ce 100644 --- a/doc/themes/nekui/layout/layout.ejs +++ b/doc/themes/nekui/layout/layout.ejs @@ -78,9 +78,16 @@ + diff --git a/doc/themes/nekui/source/js/scrollIntoView.min.js b/doc/themes/nekui/source/js/scrollIntoView.min.js new file mode 100644 index 00000000..8411b7be --- /dev/null +++ b/doc/themes/nekui/source/js/scrollIntoView.min.js @@ -0,0 +1,7 @@ +(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;oe.time+20)return setElementScroll(t,n.x,n.y),t._scrollSettings=null,e.end(COMPLETE);var o=1-e.ease(l);setElementScroll(t,n.x-n.differenceX*o,n.y-n.differenceY*o),animate(t)}})}function transitionScrollTo(t,e,n,i){function l(t){e._scrollSettings=null,e.parentElement&&e.parentElement._scrollSettings&&e.parentElement._scrollSettings.end(t),i(t),e.removeEventListener("touchstart",o)}var o,r=!e._scrollSettings,a=e._scrollSettings,f=Date.now();a&&a.end(CANCELED),e._scrollSettings={startTime:a?a.startTime:Date.now(),target:t,time:n.time+(a?f-a.startTime:0),ease:n.ease,align:n.align,end:l},o=l.bind(null,CANCELED),e.addEventListener("touchstart",o),r&&animate(e)}function defaultIsScrollable(t){return t===window||(t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth)&&"hidden"!==getComputedStyle(t).overflow}function defaultValidTarget(){return!0}var COMPLETE="complete",CANCELED="canceled";module.exports=function(t,e,n){if(t){"function"==typeof e&&(n=e,e=null),e||(e={}),e.time=isNaN(e.time)?1e3:e.time,e.ease=e.ease||function(t){return 1-Math.pow(1-t,t/2)};for(var i=t.parentElement,l=0,o=e.validTarget||defaultValidTarget,r=e.isScrollable;i;){if(o(i,l)&&(r?r(i,defaultIsScrollable):defaultIsScrollable(i))&&(l++,transitionScrollTo(t,i,e,function(t){--l||n&&n(t)})),!(i=i.parentElement))return;"BODY"===i.tagName&&(i=window)}}}; + +},{}],2:[function(require,module,exports){ + window.scrollIntoView=require("./scrollIntoView"); + +},{"./scrollIntoView":1}]},{},[2]); \ No newline at end of file