| 1 |
{# |
| 2 |
cloud/layout.html |
| 3 |
~~~~~~~~~~~~~~~~~ |
| 4 |
|
| 5 |
Sphinx layout template for the cloud theme. |
| 6 |
|
| 7 |
:copyright: Copyright 2009-2011 Assurance Technologies LLC |
| 8 |
:license: BSD |
| 9 |
|
| 10 |
roottarget - optional target for root link (default to toc) |
| 11 |
logotarget - optional target for logo link (defaults to root target) |
| 12 |
googleanalytics_id - if set, enabled google analytics snippet & footer |
| 13 |
googleanalytics_path - optional subpatch for GA cookie |
| 14 |
|
| 15 |
#} |
| 16 |
|
| 17 |
{% extends "basic/layout.html" %} |
| 18 |
|
| 19 |
{% set reldelim2 = reldim2 is not defined and ' ' or reldelim2 %} |
| 20 |
|
| 21 |
{# compat hack for sphinx < 1.8 #} |
| 22 |
{% macro compat_js_tag(asset) %} |
| 23 |
{% if js_tag is undefined %} {# sphinx 1.6 / 1.7 #} |
| 24 |
<script type="text/javascript" src="{{ pathto(asset, 1) }}"></script> |
| 25 |
{% else %} {# sphinx >= 1.8.0 #} |
| 26 |
{{ js_tag(asset) }} |
| 27 |
{% endif %} |
| 28 |
{% endmacro %} |
| 29 |
|
| 30 |
{%- block scripts %} |
| 31 |
{{ super() }} |
| 32 |
|
| 33 |
{# add script file to instrument collapsable sections and other features #} |
| 34 |
{{ compat_js_tag("_static/cloud.base.js") }} |
| 35 |
{{ compat_js_tag("_static/cloud.js") }} |
| 36 |
|
| 37 |
{%- endblock %} |
| 38 |
|
| 39 |
{# make root link redirectable #} |
| 40 |
{%- set theme_roottarget = (theme_roottarget == "<toc>" and master_doc or theme_roottarget) %} |
| 41 |
{% block rootrellink %} |
| 42 |
<li><a href="{{ pathto(theme_roottarget) }}">{{shorttitle|e}}</a>{{reldelim1}}</li> |
| 43 |
{% endblock %} |
| 44 |
|
| 45 |
{# make logo link redirectable #} |
| 46 |
{%- set theme_logotarget = (theme_logotarget == "<root>" and theme_roottarget or (theme_logotarget == "<toc>" and master_doc or theme_logotarget)) %} |
| 47 |
{%- block sidebarlogo %} |
| 48 |
{%- if logo %} |
| 49 |
<p class="logo"><a href="{{ pathto(theme_logotarget) }}" title="{{ theme_logotarget }}"> |
| 50 |
<img class="logo" src="{{ pathto('_static/' + logo, 1) }}" alt="Logo"/> |
| 51 |
</a></p> |
| 52 |
{%- endif %} |
| 53 |
{%- endblock %} |
| 54 |
|
| 55 |
{# wrap relbars in distinct classes to make themeing easier #} |
| 56 |
{%- block relbar1 %} |
| 57 |
<div class="relbar-top"> |
| 58 |
{{ super() }} |
| 59 |
</div> |
| 60 |
{% endblock %} |
| 61 |
|
| 62 |
{%- block relbar2 %} |
| 63 |
<div class="relbar-bottom"> |
| 64 |
{{ super() }} |
| 65 |
</div> |
| 66 |
{% endblock %} |
| 67 |
|
| 68 |
{% block extrahead -%} |
| 69 |
{{ super() }} |
| 70 |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
| 71 |
{%- endblock %} |
| 72 |
|
| 73 |
{% block body -%} |
| 74 |
{# hack to insert lang=en in scope of div.body #} |
| 75 |
{% if theme_hyphenation_langage %} |
| 76 |
<div lang="{{ theme_hyphenation_language }}">{{ super() }}</div> |
| 77 |
{% endif %} |
| 78 |
{%- endblock %} |
| 79 |
|
| 80 |
{% block sidebar2 -%} |
| 81 |
{{ super() }} |
| 82 |
{# insert markup for sidebar toggle button #} |
| 83 |
{% block sidebartoggle %} |
| 84 |
<div class="sidebar-toggle-group no-js"> |
| 85 |
{% set right = theme_rightsidebar|tobool %} |
| 86 |
<button class="sidebar-toggle" id="sidebar-hide" title="Hide the sidebar menu"> |
| 87 |
{% if not right %} «{% endif %} |
| 88 |
<span class="show-for-small">hide menu</span> |
| 89 |
{% if right %} »{% endif %} |
| 90 |
</button> |
| 91 |
<button class="sidebar-toggle" id="sidebar-show" title="Show the sidebar menu"> |
| 92 |
{% if right %} «{% endif %} |
| 93 |
<span class="show-for-small">menu</span> |
| 94 |
<span class="hide-for-small">sidebar</span> |
| 95 |
{% if not right %} »{% endif %} |
| 96 |
</button> |
| 97 |
</div> |
| 98 |
{% endblock %} |
| 99 |
{%- endblock %} |
| 100 |
|
| 101 |
{% block footer -%} |
| 102 |
{{ super() }} |
| 103 |
|
| 104 |
{%- endblock %} |