default.html 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <!doctype html>
  2. <html>
  3. <head>
  4. {% include head.html %}
  5. </head>
  6. <body>
  7. {% include navigation.html %}
  8. {{ content }}
  9. {% include footer.html %}
  10. <script>
  11. (function ($) {
  12. 'use strict';
  13. $(function () {
  14. var $window = $(window);
  15. var $body = $(document.body);
  16. var $sidebar = $('.s2-docs-sidebar');
  17. $body.scrollspy({
  18. target: '.s2-docs-sidebar',
  19. offset: 40
  20. });
  21. $window.on('load', function () {
  22. $body.scrollspy('refresh');
  23. });
  24. $sidebar.affix({
  25. offset: {
  26. top: function () {
  27. var offsetTop = $sidebar.offset().top;
  28. var navOuterHeight = $('.s2-docs-nav').height();
  29. return (this.top = offsetTop - navOuterHeight);
  30. },
  31. bottom: function () {
  32. return (this.bottom = $('.s2-docs-footer').outerHeight(true));
  33. }
  34. }
  35. });
  36. });
  37. })(jQuery);
  38. (function () {
  39. 'use strict';
  40. addAnchors('.s2-docs-container h1, .s2-docs-container h2, .s2-docs-container h3, .s2-docs-container h4, .s2-docs-container h5');
  41. })();
  42. </script>
  43. {% include ga.html %}
  44. </body>
  45. </html>