~canonical-ci-engineering/ubuntu-ci-services-itself/ansible

« back to all changes in this revision

Viewing changes to docsite/_themes/bootstrap/layout.html

  • Committer: Package Import Robot
  • Author(s): Michael Vogt, Harlan Lieberman-Berg, Michael Vogt
  • Date: 2013-11-01 09:40:59 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20131101094059-6w580ocxzqyqzuu3
Tags: 1.3.4+dfsg-1
[ Harlan Lieberman-Berg ]
* New upstream release (Closes: #717777).
  Fixes CVE-2013-2233 (Closes: #714822).
  Fixes CVE-2013-4259 (Closes: #721766).
* Drop fix-ansible-cfg patch.
* Change docsite generation to not expect docs as part of a wordpress install.
* Add trivial patch to fix lintian error with rpm-key script.
* Add patch header information to fix-html-makefile.

[ Michael Vogt ]
* add myself to uploader
* build/ship the module manpages for ansible in the ansible package

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
{% extends "basic/layout.html" %}
2
 
{% set script_files = script_files + ['_static/bootstrap-dropdown.js', '_static/bootstrap-scrollspy.js'] %}
3
 
{% set css_files = ['_static/bootstrap.css', '_static/bootstrap-sphinx.css', '_static/ansible-local.css'] + css_files %}
4
 
 
5
 
{# Sidebar: Rework into our Boostrap nav section. #}
6
 
{% macro navBar() %}
7
 
  <div class="topbar" data-scrollspy="scrollspy" >
8
 
    <div class="topbar-inner">
9
 
      <div class="container">
10
 
        <!-- <a class="brand" href="{{ pathto(master_doc) }}">{{ shorttitle|e }}</a> -->
11
 
        <ul class="nav">
12
 
          {% block sidebartoc %}
13
 
            <li><a href="/">Home</A>
14
 
            {% include "globaltoc.html" %}
15
 
            {% include "localtoc.html" %}
16
 
          {% endblock %}
17
 
        </ul>
18
 
        <ul class="nav secondary-nav">
19
 
          {% block sidebarsearch %}
20
 
            {% include "searchbox.html" %}
21
 
          {% endblock %}
22
 
        </ul>
23
 
      </div>
24
 
    </div>
25
 
  </div>
26
 
{% endmacro %}
27
 
<p></p>
28
 
 
29
 
{%- block extrahead %}
30
 
<script type="text/javascript">
31
 
(function () {
32
 
  /**
33
 
   * Patch TOC list.
34
 
   *
35
 
   * Will mutate the underlying span to have a correct ul for nav.
36
 
   *
37
 
   * @param $span: Span containing nested UL's to mutate.
38
 
   * @param minLevel: Starting level for nested lists. (1: global, 2: local).
39
 
   */
40
 
  var patchToc = function ($span, minLevel) {
41
 
    var $tocList = $("<ul/>").attr('class', "dropdown-menu"),
42
 
      findA;
43
 
 
44
 
    // Find all a "internal" tags, traversing recursively.
45
 
    findA = function ($elem, level) {
46
 
      var level = level || 0,
47
 
        $items = $elem.find("> li > a.internal, > ul, > li > ul");
48
 
 
49
 
      // Iterate everything in order.
50
 
      $items.each(function (index, item) {
51
 
        var $item = $(item),
52
 
          tag = item.tagName.toLowerCase(),
53
 
          pad = 10 + ((level - minLevel) * 10);
54
 
 
55
 
        if (tag === 'a' && level >= minLevel) {
56
 
          // Add to existing padding.
57
 
          $item.css('padding-left', pad + "px");
58
 
          // Add list element.
59
 
          $tocList.append($("<li/>").append($item));
60
 
        } else if (tag === 'ul') {
61
 
          // Recurse.
62
 
          findA($item, level + 1);
63
 
        }
64
 
      });
65
 
    };
66
 
 
67
 
    // Start construction and return.
68
 
    findA($span);
69
 
 
70
 
    // Wipe out old list and patch in new one.
71
 
    return $span.empty("ul").append($tocList);
72
 
  };
73
 
 
74
 
  $(document).ready(function () {
75
 
    // Patch the global and local TOC's to be bootstrap-compliant.
76
 
    patchToc($("span.globaltoc"), 1);
77
 
    patchToc($("span.localtoc"), 2);
78
 
 
79
 
    // Activate.
80
 
    $('#topbar').dropdown();
81
 
  });
82
 
}());
83
 
</script>
84
 
 
85
 
<script type="text/javascript">
86
 
// Set the maximum height of drop down menus to just less than the height
87
 
// of the viewport.
88
 
var set_max_menu_height = function () {
89
 
 
90
 
  // set menu max height to 75 less than viewport height
91
 
  $('.dropdown-menu').css('max-height', $(window).height() - 75); 
92
 
}
93
 
 
94
 
// Set this when we set the page up and on each resize.
95
 
$(window).resize(set_max_menu_height);
96
 
$(window).ready(set_max_menu_height);
97
 
 
98
 
</script>
99
 
 
100
 
{% endblock %}
101
 
 
102
 
{% block header %}{{ navBar() }}{% endblock %}
103
 
 
104
 
{# Silence the sidebar's, relbar's #}
105
 
{% block sidebar1 %}{% endblock %}
106
 
{% block sidebar2 %}{% endblock %}
107
 
{% block relbar1 %}{% endblock %}
108
 
{% block relbar2 %}{% endblock %}
109
 
 
110
 
{%- block content %}
111
 
 
112
 
<div class="container">
113
 
   {% block body %} {% endblock %}
114
 
<br/>
115
 
</div>
116
 
 
117
 
{%- endblock %}
118
 
 
119
 
{%- block footer %}
120
 
<footer class="footer">
121
 
<center>
122
 
<p>
123
 
    {%- if show_copyright %}
124
 
      {%- if hasdoc('copyright') %}
125
 
        {% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}<br/>
126
 
      {%- else %}
127
 
        {% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}.{% endtrans %}<br/>
128
 
      {%- endif %}
129
 
    {%- endif %}
130
 
    {%- if last_updated %}
131
 
      {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}<br/>
132
 
    {%- endif %}
133
 
    </p>
134
 
</div>
135
 
</center>
136
 
</footer>
137
 
{%- endblock %}
138