Commit a900b9de authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

website: put popular OS on top

parent 6b4125e2
......@@ -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>
......
Markdown is supported
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