aboutsummaryrefslogtreecommitdiffstats
path: root/docs/_templates/versions.html
blob: d466bf1b01b8bafa492770c3a4f0d98fa155f126 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{# This overrides ./sphinx_rtd_theme/versions.html #}
{# from https://github.com/readthedocs/sphinx_rtd_theme.git #}
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="{{ _('Versions') }}">
  <span class="rst-current-version" data-toggle="rst-current-version">
    <span class="fa fa-book"> VPP versions</span>
    {% set version_split = version.split('-') %}
    {{ version_split[0] }}
    <span class="fa fa-caret-down"></span>
  </span>
  <div class="rst-other-versions">
    <dl id="version-container">
      <!-- versions will end up here -->
    </dl>
    <dl>
      <dt>Other links</dt>
      <dd>
        <a href="https://fd.io">Project Home</a>
      </dd>
    </dl>
  </div>
</div>
<script type="text/javascript">
$(document).ready(function() {
  $.getJSON( "https://fd.io/vpp_versions.json", function( data ) {
    let cont = $("#version-container");
    cont.empty();
    cont.append('<dt>Versions</dt>');
    $.each( data, function( key, val ) {
      cont.append('<dd><a href="' + val.link + '">' + val.name + '</a></dd>');
    });
  });
});
</script>