mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2025-03-15 21:08:23 +00:00
Only show the dynamic version menu in production environment where it's available. Local (development) builds only show a stub version menu with one item. Also, fix the theme customization. Append version list items to the correct element in html so that they are displayed correctly. Drop unnecessary <div/>.
58 lines
2.4 KiB
Text
58 lines
2.4 KiB
Text
<div class="addons-wrap d-flex flex-column overflow-y-auto">
|
|
<div class="status d-flex flex-justify-between p-2">
|
|
<div class="title p-1">
|
|
<i class="fa fa-book"></i> {{ site.title }}
|
|
</div>
|
|
<div class="branch p-1">
|
|
<span class="name">
|
|
{{ site.version }}
|
|
</span>
|
|
<i class="fa fa-caret-down"></i>
|
|
</div>
|
|
</div>
|
|
<div class="addons d-flex flex-column height-full p-2 d-none">
|
|
{% if site.display_version_list %}
|
|
<dl id="versions">
|
|
<dt>Versions</dt>
|
|
|
|
{% if jekyll.environment == "development" %}
|
|
<dd>
|
|
<a href="{{ site.baseurl }}/">{{ site.version }}</a>
|
|
</dd>
|
|
{% else %}
|
|
{% comment %}
|
|
Drop the last component from site.baseurl which is supposed to
|
|
be pointing to a subdirectory of the true site baseurl.
|
|
{% endcomment %}
|
|
{% assign spliturl = site.baseurl | split: "/" %}
|
|
{% assign last = spliturl.size | minus: 1 %}
|
|
{% assign baseurl = spliturl | slice: 0, last | join: "/" %}
|
|
|
|
<script src="{{ baseurl }}/versions.js"></script>
|
|
<script>
|
|
var dt = document.getElementById('versions');
|
|
var items = getVersionListItems();
|
|
for (var i=0; i < items.length; i++) {
|
|
var dd = document.createElement('dd');
|
|
var a = dd.appendChild(document.createElement('a'));
|
|
a.appendChild(document.createTextNode(items[i].name));
|
|
a.href = items[i].url;
|
|
dt.appendChild(dd);
|
|
}
|
|
</script>
|
|
{% endif %}
|
|
</dl>
|
|
{% endif %}
|
|
{%- assign items = "github" | split: ", " -%}
|
|
{% for item in items -%}
|
|
{% include addons/{{ item }}.liquid %}
|
|
{% endfor -%}
|
|
<hr>
|
|
<div class="license f6 pb-2">
|
|
The
|
|
<a href="{{ site.baseurl }}/">software</a>
|
|
is under the terms of
|
|
<a href="{{ docs.repository_url }}">{{ docs.license.name | default: "The Unlicense" }}</a>.
|
|
</div>
|
|
</div>
|
|
</div>
|