page.html 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. {% extends "layout.html" %}
  2. {% block title %}{{ page.title }}{% endblock %}
  3. {% block description %}{{ page.description }}{% endblock %}
  4. {% block style %}
  5. {### Include theme css before plugins css ###}
  6. {% if not fileExists(config.styles.print) %}
  7. {% if options.format %}
  8. <link rel="stylesheet" href="{{ (options.format + ".css")|resolveAsset }}">
  9. {% else %}
  10. <link rel="stylesheet" href="{{ "ebook.css"|resolveAsset }}">
  11. {% endif %}
  12. {% endif %}
  13. {{ super() }}
  14. {### Custom stylesheets for the book ###}
  15. {% for type, style in config.styles %}
  16. {% if fileExists(style) and (type == "ebook" or type == "print" or type == options.format) %}
  17. <link rel="stylesheet" href="{{ style|resolveFile }}">
  18. {% endif %}
  19. {% endfor %}
  20. {% endblock %}
  21. {% block body %}
  22. <div class="page">
  23. {% block page %}
  24. <h1 class="book-chapter book-chapter-{{ page.depth }}">{{ page.title }}</h1>
  25. <div class="section">
  26. {{ page.content|safe }}
  27. </div>
  28. {% endblock %}
  29. </div>
  30. {% endblock %}