Commit ec861ba2 authored by Allan Blanchard's avatar Allan Blanchard
Browse files

Do not loop for latest versions

parent 0075b70c
......@@ -10,15 +10,15 @@ css: documentation
<div class="pageKernel pages">
<div class="wrap">
{% include headers.html header="documentation" %}
{% for version in site.fc-versions reversed %}
{% if version.beta %}
{% assign beta = version.name | downcase %}
{% endif %}
{% unless version.beta %}
{% assign latest = version.name | downcase %}
{% break %}
{% endunless %}
{% endfor %}
{% assign versions = site.fc-versions | reverse %}
{% if versions[0].beta %}
{% assign beta = versions[0].name | downcase %}
{% assign latest = versions[1].name | downcase %}
{% else %}
{% assign latest = versions[0].name | downcase %}
{% endif %}
{% unless page.version == latest %}
{% if beta and beta == page.version %}
{% assign text = "a beta" %}
......
......@@ -237,14 +237,12 @@ description: "Frama-C - An open-source extensible and collaborative platform
<div class="head">
<h3 tabindex="0">Get Frama-C</h3>
{% for version in site.fc-versions reversed %}
{% unless version.beta %}
{% assign latest = version %}
{% break %}
{% endunless %}
{% endfor %}
{% if site.fc-versions.last.beta %}
{% assign beta = site.fc-versions.last %}
{% assign versions = site.fc-versions | reverse %}
{% if versions[0].beta %}
{% assign beta = versions[0] %}
{% assign latest = versions[1] %}
{% else %}
{% assign latest = versions[0] %}
{% endif %}
<nav>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment