2
0

layout.html 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. {%- extends "basic/layout.html" %}
  2. {%- macro custom_relbar() %}
  3. <div class="related" role="navigation" aria-label="related navigation">
  4. <h3>{{ _('Navigation') }}</h3>
  5. <ul>
  6. {%- block rootrellink %}
  7. <li class="nav-item nav-item-0"><a href="{{ pathto(master_doc) }}">Docs</a>{{ reldelim1 }}</li>
  8. {%- endblock %}
  9. {%- for parent in parents %}
  10. <li class="nav-item nav-item-{{ loop.index }}"><a href="{{ parent.link|e }}" {% if loop.last %}{{ accesskey("U") }}{% endif %}>{{ parent.title }}</a>{{ reldelim1 }}</li>
  11. {%- endfor %}
  12. <li class="nav-item">{{ title|striptags|e }}</li>
  13. {%- block relbaritems %} {% endblock %}
  14. </ul>
  15. </div>
  16. {%- endmacro %}
  17. {%- macro custom_prevnext() %}
  18. <div class="prevnext">
  19. {%- if prev %}
  20. <div class="item left">
  21. <a href="{{ prev.link|e }}">← {{ prev.title }}</a>
  22. </div>
  23. {%- endif %}
  24. {%- if next %}
  25. <div class="item right">
  26. <a href="{{ next.link|e }}">{{ next.title }} →</a>
  27. </div>
  28. {%- endif %}
  29. <div class="clearfix"></div>
  30. </div>
  31. {%- endmacro %}
  32. {%- block extrahead %}
  33. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
  34. {%- endblock %}
  35. {%- block sidebarlogo %}
  36. <div class="logowrapper">
  37. <p class="logo"><a href="{{ pathto(master_doc) }}" title="{{ project }}">
  38. {%- if logo %}
  39. <img class="logo" src="{{ pathto('_static/' + logo, 1) }}" alt="{{ project }}"/>
  40. {%- else %}
  41. <span>{{ project }}</span>
  42. {%- endif %}
  43. </a></p>
  44. </div>
  45. {%- endblock %}
  46. {%- block relbar1 %}{% endblock %}
  47. {%- block relbar2 %}{% endblock %}
  48. {%- block document %}
  49. <div class="documentwrapper">
  50. <div class="mobile-header">
  51. <a href="{{ pathto(master_doc) }}" title="{{ project }}">{{ project }}</a>
  52. </div>
  53. {%- if render_sidebar %}
  54. <div class="bodywrapper">
  55. {%- endif %}
  56. <div class="body">
  57. {{ custom_relbar() }}
  58. <div role="main">
  59. {% block body %} {% endblock %}
  60. </div>
  61. {{ custom_prevnext() }}
  62. <div class="footer" role="contentinfo">
  63. {%- if show_copyright %}
  64. {%- if hasdoc('copyright') %}
  65. {% trans path=pathto('copyright'), copyright=copyright|e %}&#169; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
  66. {%- else %}
  67. {% trans copyright=copyright|e %}&#169; Copyright {{ copyright }}.{% endtrans %}
  68. {%- endif %}
  69. {%- endif %}
  70. {%- if last_updated %}
  71. {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
  72. {%- endif %}
  73. {%- if show_sphinx %}
  74. {% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx-doc.org/">Sphinx</a>.{% endtrans %}
  75. {%- endif %}
  76. </div>
  77. </div>
  78. {%- if render_sidebar %}
  79. </div>
  80. {%- endif %}
  81. </div>
  82. {%- endblock %}
  83. {%- block footer %}{%- endblock %}