You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

guide.html 1.9 kB

2 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. ---
  2. layout: page
  3. ---
  4. {% include vars.html %}
  5. {% assign matched_guides = site.data.guides | where: "id", page.guide %}
  6. {% assign current_guide = matched_guides[0] %}
  7. {% assign guides_size = current_guide.pages | size | plus: 2 %}
  8. {% for i in (0..guides_size) %}
  9. {% if current_guide.pages[i].id == page.id %}
  10. {% assign guide_prev_index = i | minus: 1 %}
  11. {% assign guide_next_index = i | plus: 1 %}
  12. {% break %}
  13. {% endif %}
  14. {% endfor %}
  15. {% assign guide_prev = current_guide.pages[guide_prev_index] %}
  16. {% assign guide_next = current_guide.pages[guide_next_index] %}
  17. <div class="row">
  18. <div class="col-md-8 guide">
  19. {% include debug/toc.html content=page.content %}
  20. <div class="guide-content">
  21. {{content}}
  22. </div>
  23. <div class="guide-controls">
  24. <hr>
  25. <div class="clearfix">
  26. {% if guide_prev_index > -1 %}
  27. <a class="btn btn-outline-primary float-left" href="{{url_base}}{{guide_prev.path}}">
  28. &larr;
  29. {{i18n[guide_prev.id]}}
  30. </a>
  31. {% endif %}
  32. {% if guide_next %}
  33. <a class="btn btn-primary float-right" href="{{url_base}}{{guide_next.path}}">
  34. {{i18n[guide_next.id]}}
  35. &rarr;
  36. </a>
  37. {% endif %}
  38. </div>
  39. </div>
  40. {% if page.additional_reading_tags %}
  41. {% include additional-reading.html tags=page.additional_reading_tags %}
  42. {% endif %}
  43. </div>
  44. <div class="col-md-4">
  45. <ul class="nav nav-stacked guide-nav">
  46. {% for step in current_guide.pages %}
  47. <li class="nav-item">
  48. {% if step.id == page.id %}
  49. <a class="nav-link active">
  50. {{i18n[step.id]}}
  51. </a>
  52. {% else %}
  53. <a class="nav-link" href="{{url_base}}{{step.path}}">
  54. {{i18n[step.id]}}
  55. </a>
  56. {% endif %}
  57. </li>
  58. {% endfor %}
  59. </ul>
  60. </div>
  61. </div>

js yarn包管理组件依赖分析

Contributors (1)