summary.html 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. {% extends "./page.html" %}
  2. {% block title %}{{ "SUMMARY"|t }}{% endblock %}
  3. {% macro articles(_articles) %}
  4. {% for article in _articles %}
  5. <li>
  6. <span class="inner">
  7. {% if article.path or article.url %}
  8. {% if article.path %}
  9. <a href="{{ article.path|contentURL }}{{ article.anchor }}">{{ article.title }}</a>
  10. {% else %}
  11. <a target="_blank" href="{{ article.url }}">{{ article.title }}</a>
  12. {% endif %}
  13. {% else %}
  14. <span>{{ article.title }}</span>
  15. {% endif %}
  16. {% if 1 %}
  17. <span class="page">{{ article.level }}</span>
  18. {% endif %}
  19. </span>
  20. {% if article.articles.length > 0 %}
  21. <ol>
  22. {{ articles(article.articles) }}
  23. </ol>
  24. {% endif %}
  25. </li>
  26. {% endfor %}
  27. {% endmacro %}
  28. {% block page %}
  29. <div class="section toc">
  30. <h1>{{ "SUMMARY"|t }}</h1>
  31. <ol>
  32. {% for part in summary.parts %}
  33. {% if part.title %}
  34. <li class="part-title">
  35. <h2>{{ part.title }}</h2>
  36. </li>
  37. {% endif %}
  38. {{ articles(part.articles) }}
  39. {% if not loop.last %}
  40. <li class="divider"></li>
  41. {% endif %}
  42. {% endfor %}
  43. {% if glossary.path %}
  44. <li>
  45. <span class="inner">
  46. <a href="{{ ('/' + glossary.path)|contentURL }}">{{ "GLOSSARY"|t }}</a>
  47. </span>
  48. </li>
  49. {% endif %}
  50. </ol>
  51. </div>
  52. {% endblock %}