layout.html 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. <p class="version">v {{release}}</p>
  45. </div>
  46. {%- endblock %}
  47. {%- block relbar1 %}{% endblock %}
  48. {%- block relbar2 %}{% endblock %}
  49. {%- block document %}
  50. <div class="documentwrapper">
  51. <div class="mobile-header">
  52. <a href="{{ pathto(master_doc) }}" title="{{ project }}">{{ project }}</a>
  53. </div>
  54. {%- if render_sidebar %}
  55. <div class="bodywrapper">
  56. {%- endif %}
  57. <div class="body">
  58. {{ custom_relbar() }}
  59. <div role="main">
  60. {% block body %} {% endblock %}
  61. </div>
  62. {{ custom_prevnext() }}
  63. <div class="footer" role="contentinfo">
  64. {%- if show_copyright %}
  65. {%- if hasdoc('copyright') %}
  66. {% trans path=pathto('copyright'), copyright=copyright|e %}&#169; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
  67. {%- else %}
  68. {% trans copyright=copyright|e %}&#169; Copyright {{ copyright }}.{% endtrans %}
  69. {%- endif %}
  70. {%- endif %}
  71. {%- if last_updated %}
  72. {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
  73. {%- endif %}
  74. {%- if show_sphinx %}
  75. {% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx-doc.org/">Sphinx</a>.{% endtrans %}
  76. {%- endif %}
  77. </div>
  78. </div>
  79. {%- if render_sidebar %}
  80. </div>
  81. {%- endif %}
  82. </div>
  83. {%- endblock %}
  84. {%- block footer %}{%- endblock %}