source: trunk/docs/_themes/sphinx_rtd_theme/layout.html @ 772

Last change on this file since 772 was 726, checked in by djay, 9 years ago

Fix location of _static using pathto in the layout.html files used as templates for the new documentation layout.

  • Property svn:executable set to *
File size: 5.8 KB
Line 
1{# TEMPLATE VAR SETTINGS #}
2{%- set url_root = pathto('', 1) %}
3{%- if url_root == '#' %}{% set url_root = '' %}{% endif %}
4{%- if not embedded and docstitle %}
5  {%- set titlesuffix = " — "|safe + docstitle|e %}
6{%- else %}
7  {%- set titlesuffix = "" %}
8{%- endif %}
9
10<!DOCTYPE html>
11<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
12<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
13<head>
14  <meta charset="utf-8">
15  <meta name="viewport" content="width=device-width, initial-scale=1.0">
16  {% block htmltitle %}
17  <title>{{ title|striptags|e }}{{ titlesuffix }}</title>
18  {% endblock %}
19  <link href="http://fonts.googleapis.com/css?family=Days+One" rel="stylesheet" type="text/css">
20  {# FAVICON #}
21  {% if favicon %}
22    <link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/>
23  {% endif %}
24
25  {# CSS #}
26
27  {# OPENSEARCH #}
28  {% if not embedded %}
29    {% if use_opensearch %}
30      <link rel="search" type="application/opensearchdescription+xml" title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}" href="{{ pathto('_static/opensearch.xml', 1) }}"/>
31    {% endif %}
32
33  {% endif %}
34
35  {# RTD hosts this file, so just load on non RTD builds #}
36  {% if not READTHEDOCS %}
37    <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
38  {% endif %}
39
40  {% for cssfile in css_files %}
41    <link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
42  {% endfor %}
43
44  {% for cssfile in extra_css_files %}
45    <link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
46  {% endfor %}
47
48  {%- block linktags %}
49    {%- if hasdoc('about') %}
50        <link rel="author" title="{{ _('About these documents') }}"
51              href="{{ pathto('about') }}"/>
52    {%- endif %}
53    {%- if hasdoc('genindex') %}
54        <link rel="index" title="{{ _('Index') }}"
55              href="{{ pathto('genindex') }}"/>
56    {%- endif %}
57    {%- if hasdoc('search') %}
58        <link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}"/>
59    {%- endif %}
60    {%- if hasdoc('copyright') %}
61        <link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}"/>
62    {%- endif %}
63    <link rel="top" title="{{ docstitle|e }}" href="{{ pathto('index') }}"/>
64    {%- if parents %}
65        <link rel="up" title="{{ parents[-1].title|striptags|e }}" href="{{ parents[-1].link|e }}"/>
66    {%- endif %}
67    {%- if next %}
68        <link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}"/>
69    {%- endif %}
70    {%- if prev %}
71        <link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}"/>
72    {%- endif %}
73  {%- endblock %}
74  {%- block extrahead %} {% endblock %}
75
76  {# Keep modernizr in head - http://modernizr.com/docs/#installing #}
77  <script src="{{ pathto('_static/' + 'js/modernizr.min.js', 1) }}"></script>
78
79</head>
80
81<body class="wy-body-for-nav" role="document">
82
83  <div class="wy-grid-for-nav">
84
85    {# SIDE NAV, TOGGLES ON MOBILE #}
86    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
87      <div class="wy-side-nav-search">
88        {% block sidebartitle %}
89
90        {% if logo and theme_logo_only %}
91          <a href="{{ pathto(master_doc) }}">
92        {% else %}
93          <a class="shrink" href="http://zoo-project.org"><img src="http://zoo-project.org/img/zoo-sun-logo.png" class="img-responsive sun" style="display: inline;"> ZOO</a>
94        {% endif %}
95
96        {% if logo %}
97          {# Not strictly valid HTML, but it's the only way to display/scale it properly, without weird scripting or heaps of work #}
98          <img src="{{ pathto('_static/' + logo, 1) }}" class="logo" />
99        {% endif %}
100        </a>
101
102        {% include "searchbox.html" %}
103
104        {% endblock %}
105      </div>
106
107      <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
108        {% block menu %}
109          {% set toctree = toctree(maxdepth=2, collapse=False, includehidden=False) %}
110          {% if toctree %}
111              {{ toctree }}
112          {% else %}
113              <!-- Local TOC -->
114              <div class="local-toc">{{ toc }}</div>
115          {% endif %}
116        {% endblock %}
117      </div>
118      &nbsp;
119    </nav>
120
121    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
122
123      {# MOBILE NAV, TRIGGLES SIDE NAV ON TOGGLE #}
124      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
125        <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
126        <a href="{{ pathto(master_doc) }}">{{ project }}</a>
127      </nav>
128
129
130      {# PAGE CONTENT #}
131      <div class="wy-nav-content">
132        <div class="rst-content">
133          {% include "breadcrumbs.html" %}
134          <div role="main" class="document">
135            {% block body %}{% endblock %}
136          </div>
137          {% include "footer.html" %}
138        </div>
139      </div>
140
141    </section>
142
143  </div>
144  {% include "versions.html" %}
145
146  {% if not embedded %}
147
148    <script type="text/javascript">
149        var DOCUMENTATION_OPTIONS = {
150            URL_ROOT:'{{ url_root }}',
151            VERSION:'{{ release|e }}',
152            COLLAPSE_INDEX:false,
153            FILE_SUFFIX:'{{ '' if no_search_suffix else file_suffix }}',
154            HAS_SOURCE:  {{ has_source|lower }}
155        };
156    </script>
157    {%- for scriptfile in script_files %}
158      <script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
159    {%- endfor %}
160
161  {% endif %}
162
163  {# RTD hosts this file, so just load on non RTD builds #}
164  {% if not READTHEDOCS %}
165    <script type="text/javascript" src="{{ pathto('_static/js/theme.js', 1) }}"></script>
166  {% endif %}
167
168  {# STICKY NAVIGATION #}
169  {% if theme_sticky_navigation %}
170  <script type="text/javascript">
171      jQuery(function () {
172          SphinxRtdTheme.StickyNav.enable();
173      });
174  </script>
175  {% endif %}
176
177  {%- block footer %} {% endblock %}
178
179</body>
180</html>
Note: See TracBrowser for help on using the repository browser.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png