website: put popular OS on top
This commit is contained in:
parent
3cf1a2fbf4
commit
f6ae2f242c
|
@ -22,6 +22,10 @@ response.body.split("\n").each do |line|
|
|||
$packer_files[os] << filename
|
||||
end
|
||||
|
||||
$packer_os = ["darwin", "linux", "windows"] & $packer_files.keys
|
||||
$packer_os += $packer_files.keys
|
||||
$packer_os.uniq!
|
||||
|
||||
$packer_files.each do |key, value|
|
||||
value.sort!
|
||||
end
|
||||
|
|
|
@ -20,14 +20,14 @@ page_title: "Downloads"
|
|||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<% $packer_files.each do |os, files| %>
|
||||
<% $packer_os.each do |os| %>
|
||||
<div class="row">
|
||||
<div class="span8 offset2 download">
|
||||
<div class="icon pull-left"><%= image_tag "/images/icons/icon_#{os}.png" %></div>
|
||||
<div class="details">
|
||||
<h2 class="os-name"><%= download_os_human(os) %></h2>
|
||||
<ul>
|
||||
<% files.each do |file| %>
|
||||
<% $packer_files[os].each do |file| %>
|
||||
<li><a href="<%= download_url(file) %>"><%= download_arch(file) %></a></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
|
Loading…
Reference in New Issue