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| ...@@ -22,6 +22,10 @@ response.body.split("\n").each do |line|
$packer_files[os] << filename $packer_files[os] << filename
end end
$packer_os = ["darwin", "linux", "windows"] & $packer_files.keys
$packer_os += $packer_files.keys
$packer_os.uniq!
$packer_files.each do |key, value| $packer_files.each do |key, value|
value.sort! value.sort!
end end
......
...@@ -20,14 +20,14 @@ page_title: "Downloads" ...@@ -20,14 +20,14 @@ page_title: "Downloads"
</p> </p>
</div> </div>
</div> </div>
<% $packer_files.each do |os, files| %> <% $packer_os.each do |os| %>
<div class="row"> <div class="row">
<div class="span8 offset2 download"> <div class="span8 offset2 download">
<div class="icon pull-left"><%= image_tag "/images/icons/icon_#{os}.png" %></div> <div class="icon pull-left"><%= image_tag "/images/icons/icon_#{os}.png" %></div>
<div class="details"> <div class="details">
<h2 class="os-name"><%= download_os_human(os) %></h2> <h2 class="os-name"><%= download_os_human(os) %></h2>
<ul> <ul>
<% files.each do |file| %> <% $packer_files[os].each do |file| %>
<li><a href="<%= download_url(file) %>"><%= download_arch(file) %></a></li> <li><a href="<%= download_url(file) %>"><%= download_arch(file) %></a></li>
<% end %> <% end %>
</ul> </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