docs.html 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. ---
  2. layout: default
  3. ---
  4. <!-- head -->
  5. <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Inconsolata">
  6. <link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.css">
  7. <!-- head -->
  8. {% if page.permalink contains '/docs' %}
  9. {% assign items = site.data.docs %}
  10. {% assign category = "Documentation" %}
  11. {% else %}
  12. {% assign category = "Guides" %}
  13. {% assign items = site.data.guides %}
  14. {% endif %}
  15. {% assign flattenedItems = "" | split: "" %}
  16. {% assign parts = "" | split: "" %}
  17. {% for item in items %}
  18. {% assign flattenedItems = flattenedItems | push: item %}
  19. {% if item.children != null %}
  20. {% for child in item.children %}
  21. {% unless child.url contains '#' %}
  22. {% assign flattenedItems = flattenedItems | push: child %}
  23. {% if child.url == page.permalink %}
  24. {% assign parts = parts | push: item.title | push: child.title %}
  25. {% endif %}
  26. {% endunless %}
  27. {% endfor %}
  28. {% endif %}
  29. {% if item.url == page.permalink %}
  30. {% assign parts = parts | push: item.title %}
  31. {% endif %}
  32. {% endfor %}
  33. <div id="docs-wrapper" class="container">
  34. <div class="row">
  35. <div id="sidebar-container" class="three columns">
  36. <button class="sidebar-button">Document Navigation</button>
  37. <ul class="sidebar-list">
  38. <li class="search-item"><input type="text"></li>
  39. {% include sidebar.html items=items %}
  40. </ul>
  41. </div>
  42. <div id="docs-container" class="nine columns">
  43. <div class="row">
  44. <span class="breadcrumb">
  45. <span>{{ category }}:</span>
  46. <span>{{ parts | join: ' / ' }}</span>
  47. </span>
  48. <a class="edit-link" href="{{site.github}}/{{page.path}}" target="_blank" title="Edit on Github">
  49. {% include svg/octocat.svg %}
  50. <span>Edit on Github</span>
  51. </a>
  52. </div>
  53. <hr>
  54. <div id="content-container">
  55. {% if page.stability == "review" %}
  56. <div class="alert alert-warning">This page needs to be reviewed.</div>
  57. {% elsif page.stability == "incomplete" %}
  58. <div class="alert alert-warning">This page is incomplete.</div>
  59. {% endif %}
  60. <h1 id="{{ page.title | slugify }}">{{ page.title }}</h1>
  61. {{ content }}
  62. </div>
  63. <div class="row" id="pagination-container">
  64. {% for item in flattenedItems %}
  65. {% if page.permalink == item.url %}
  66. {% assign next = flattenedItems[forloop.index] %}
  67. {% unless forloop.first %}
  68. <a class="prev" href="{{ prev.url }}">
  69. <span class="label">{{ prev.title }}</span>
  70. <span class="arrow">
  71. <span class="tip"></span>
  72. <span class="shaft"></span>
  73. </span>
  74. </a>
  75. {% endunless %}
  76. {% unless forloop.last %}
  77. <a class="next" href="{{ next.url }}">
  78. <span class="label">{{ next.title }}</span>
  79. <span class="arrow">
  80. <span class="tip"></span>
  81. <span class="shaft"></span>
  82. </span>
  83. </a>
  84. {% endunless %}
  85. {% endif %}
  86. {% assign prev = item %}
  87. {% endfor %}
  88. </div>
  89. </div>
  90. </div>
  91. <div class="row">
  92. <hr>
  93. </div>
  94. {% include open-source.html %}
  95. </div>
  96. <!-- script -->
  97. <script src="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.js"></script>
  98. <script>
  99. $(document).ready(function() {
  100. $('h1, h2, h3, h4', $('#docs-container')).each(function(i, h) {
  101. if (!h.id) return;
  102. $('<a class="anchor" href="#' + h.id + '"></a>').prependTo($(h));
  103. });
  104. $('#sidebar-container .sidebar-button').click(function() {
  105. $('#sidebar-container').toggleClass('active');
  106. });
  107. docsearch({
  108. apiKey: '281facf513620e95600126795a00ab6c',
  109. indexName: 'quilljs',
  110. inputSelector: '.search-item input',
  111. debug: false
  112. });
  113. });
  114. </script>
  115. <!-- script -->