default.html 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. anchors.options.placement = 'left';
  41. anchors.add('.s2-docs-container h1, .s2-docs-container h2, .s2-docs-container h3, .s2-docs-container h4, .s2-docs-container h5');
  42. })();
  43. </script>
  44. {% include ga.html %}
  45. </body>
  46. </html>