PageRenderTime 21ms CodeModel.GetById 15ms app.highlight 3ms RepoModel.GetById 2ms app.codeStats 0ms

/docs/source/_themes/om/layout.html

https://bitbucket.org/prologic/circuits/
HTML | 123 lines | 116 code | 7 blank | 0 comment | 0 complexity | 91bf72c582c49b66930cc576007d0ccf MD5 | raw file
  1{% extends "basic/layout.html" %}
  2
  3{%- macro secondnav() %}
  4  {%- if prev %}
  5    &laquo; <a href="{{ prev.link|e }}" title="{{ prev.title|e }}">previous</a> 
  6    {{ reldelim2 }}
  7  {%- endif %}
  8  {%- if parents %}
  9    <a href="{{ parents.0.link|e }}" title="{{ parents.0.title|e }}" accesskey="U">up</a> 
 10  {%- else %}
 11    <a title="{{ docstitle }}" href="{{ pathto('index') }}" accesskey="U">up</a> 
 12  {%- endif %}
 13  {%- if next %}
 14  {{ reldelim2 }}
 15    <a href="{{ next.link|e }}" title="{{ next.title|e }}">next</a> &raquo;
 16  {%- endif %}
 17{%- endmacro %}
 18
 19{% block extrahead %}
 20{{ super() }}
 21<script type="text/javascript" src="{{ pathto('templatebuiltins.js', 1) }}"></script>
 22<script type="text/javascript">
 23(function($) {
 24    if (!django_template_builtins) {
 25       // templatebuiltins.js missing, do nothing.
 26       return;
 27    }
 28    $(document).ready(function() {
 29        // Hyperlink Django template tags and filters
 30        var base = "{{ pathto('ref/templates/builtins') }}";
 31        if (base == "#") {
 32            // Special case for builtins.html itself
 33            base = "";
 34        }
 35        // Tags are keywords, class '.k'
 36        $("div.highlight\\-html\\+django span.k").each(function(i, elem) {
 37             var tagname = $(elem).text();
 38             if ($.inArray(tagname, django_template_builtins.ttags) != -1) {
 39                 var fragment = tagname.replace(/_/, '-');
 40                 $(elem).html("<a href='" + base + "#" + fragment + "'>" + tagname + "</a>");
 41             }
 42        });
 43        // Filters are functions, class '.nf'
 44        $("div.highlight\\-html\\+django span.nf").each(function(i, elem) {
 45             var filtername = $(elem).text();
 46             if ($.inArray(filtername, django_template_builtins.tfilters) != -1) {
 47                 var fragment = filtername.replace(/_/, '-');
 48                 $(elem).html("<a href='" + base + "#" + fragment + "'>" + filtername + "</a>");
 49             }
 50        });
 51    });
 52})(jQuery);
 53</script>
 54{% endblock %}
 55
 56{% block document %}
 57  <div id="custom-doc" class="{% block bodyclass %}{{ 'yui-t6' if pagename != 'index' else '' }}{% endblock %}">
 58    <div id="hd">
 59      <h1><a href="{{ pathto('index') }}">{{ docstitle }}</a></h1>
 60      <div id="global-nav">
 61        <a title="Home page" href="{{ pathto('index') }}">Home</a> {{ reldelim2 }}
 62        <a title="Global index" href="{{ pathto('genindex') }}">Index</a> {{ reldelim2 }}
 63        <a title="Module index" href="{{ pathto('py-modindex') }}">Modules</a>
 64      </div>
 65      <div class="nav">{{ secondnav() }}</div>
 66    </div>
 67    
 68    <div id="bd">
 69      <div id="yui-main">
 70        <div class="yui-b">
 71          <div class="yui-g" id="{{ pagename|replace('/', '-') }}">
 72            {% block body %}{% endblock %}
 73          </div>         
 74        </div>
 75      </div>
 76      {% block sidebarwrapper %}
 77        {% if pagename != 'index' %}
 78          <div class="yui-b" id="sidebar">
 79            {{ sidebar() }}
 80            {%- if last_updated %}
 81              <h3>Last update:</h3>
 82              <p class="topless">{{ last_updated }}</p>
 83            {%- endif %}
 84          </div> 
 85        {% endif %}
 86      {% endblock %}
 87    </div>
 88    
 89    <div id="ft">
 90      <div class="nav">{{ secondnav() }}</div>
 91    </div>
 92  </div>
 93{% endblock %}
 94
 95{% block sidebarrel %}
 96  <h3>Browse</h3>
 97  <ul>
 98    {% if prev %}
 99      <li>Prev: <a href="{{ prev.link }}">{{ prev.title }}</a></li>
100    {% endif %}
101    {% if next %}
102      <li>Next: <a href="{{ next.link }}">{{ next.title }}</a></li>
103    {% endif %}
104  </ul>
105  <h3>You are here:</h3>
106  <ul>
107      <li>
108        <a href="{{ pathto('index') }}">{{ docstitle }}</a>
109        {% for p in parents %}
110          <ul><li><a href="{{ p.link }}">{{ p.title }}</a>
111        {% endfor %}
112        <ul><li>{{ title }}</li></ul>
113        {% for p in parents %}</li></ul>{% endfor %}
114      </li>
115  </ul>  
116{% endblock %}
117
118{# Empty some default blocks out #}
119{% block relbar1 %}{% endblock %}
120{% block relbar2 %}{% endblock %}
121{% block sidebar1 %}{% endblock %}
122{% block sidebar2 %}{% endblock %}
123{% block footer %}{% endblock %}