default.html 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. <script type="text/javascript">
  44. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  45. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  46. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  47. })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  48. ga('create', 'UA-57144786-2', 'auto');
  49. ga('send', 'pageview');
  50. </script>
  51. </body>
  52. </html>