default.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. {% if page.path == "index.html" %}
  5. <title>{{ page.title }}</title>
  6. {% elsif page.title.size > 25 %}
  7. <title>{{ page.title }} - Quill</title>
  8. {% else %}
  9. <title>{{ page.title }} - Quill Rich Text Editor</title>
  10. {% endif %}
  11. {% include meta.html %}
  12. <link rel="stylesheet" href="/assets/css/base.css">
  13. {% assign sections = content | split: '<!-- head -->' %}
  14. {% for section in sections %}
  15. {% assign mod = forloop.index | modulo: 2 %}
  16. {% if mod == 0 %}
  17. {{ section | strip }}
  18. {% endif %}
  19. {% endfor %}
  20. <link rel="stylesheet" href="/assets/css/styles.css">
  21. {% include analytics.html %}
  22. </head>
  23. <body{% if page.bodyClass != null %} class="{{ page.bodyClass }}"{% endif %}>
  24. {% include header.html %}
  25. {% assign heads = content | split: '<!-- head -->' %}
  26. {% for head in heads %}
  27. {% if forloop.last != true %}
  28. {% assign headMod = forloop.index | modulo: 2 %}
  29. {% if headMod == 1 %}
  30. {{ head | strip }}
  31. {% endif %}
  32. {% else %}
  33. {% assign scripts = head | split: '<!-- script -->' %}
  34. {% for script in scripts %}
  35. {% assign scriptMod = forloop.index | modulo: 2 %}
  36. {% if scriptMod == 1 %}
  37. {{ script | strip }}
  38. {% endif %}
  39. {% endfor %}
  40. {% endif %}
  41. {% endfor %}
  42. {% include footer.html %}
  43. <script src="//ajax.googleapis.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
  44. {% assign sections = content | split: '<!-- script -->' %}
  45. {% for section in sections %}
  46. {% assign mod = forloop.index | modulo: 2 %}
  47. {% if mod == 0 %}
  48. {{ section | strip }}
  49. {% endif %}
  50. {% endfor %}
  51. <script>
  52. $(document).ready(function() {
  53. $('.navbar-open').click(function() {
  54. $('.navbar-drop').addClass('active');
  55. });
  56. $('.navbar-close').click(function() {
  57. $('.navbar-drop').removeClass('active');
  58. });
  59. var counts = $('.github-count');
  60. if (counts.length > 0) {
  61. $.getJSON('https://api.github.com/search/repositories?q=quill+user:quilljs+repo:quill&sort=stars&order=desc', function(data) {
  62. if (data.items && data.items[0].full_name === 'quilljs/quill') {
  63. counts.text(data.items[0].stargazers_count.toLocaleString());
  64. }
  65. });
  66. }
  67. });
  68. </script>
  69. </body>
  70. </html>