website: pages for UI download

This commit is contained in:
Mitchell Hashimoto 2014-05-01 10:49:30 -07:00
parent 0459237a41
commit 728ff28c1c
6 changed files with 99 additions and 45 deletions

View File

@ -56,6 +56,10 @@ module DownloadHelpers
"https://dl.bintray.com/mitchellh/consul/#{file}"
end
def ui_download_url
download_url("#{latest_version}_web_ui.zip")
end
def latest_version
ENV["CONSUL_VERSION"]
end

View File

@ -2,7 +2,7 @@ module SidebarHelpers
# This helps by setting the "active" class for sidebar nav elements
# if the YAML frontmatter matches the expected value.
def sidebar_current(expected)
current = current_page.data.sidebar_current
current = current_page.data.sidebar_current || ""
if current.start_with?(expected)
return " class=\"active\""
else

View File

@ -1,11 +1,10 @@
---
page_title: "Downloads"
layout: "downloads"
page_title: "Download Consul"
sidebar_current: "downloads-consul"
---
<div class="container">
<div class="col-md-8 col-md-offset-2">
<div class="bs-docs-section">
<h1>Downloads</h1>
<h1>Download Consul</h1>
<section class="downloads">
<div class="description row">
@ -45,6 +44,3 @@ page_title: "Downloads"
</div>
</div>
</section>
</div>
</div>
</div>

View File

@ -0,0 +1,33 @@
---
layout: "downloads"
page_title: "Download Consul Web UI"
sidebar_current: "downloads-ui"
---
<h1>Download Consul Web UI</h1>
<section class="downloads">
<div class="description row">
<div class="col-md-12">
<p>
From this page you can download the web UI for Consul. This is
distributed as a separate ZIP package. You can view a
<a href="http://demo.consul.io">demo of the web UI here</a> or
you can
<a href="/docs/agent/options.html">read the docs on how to set up the UI here</a>.
</p>
<p class="center">
<a class="btn btn-default btn-lg" href="<%= ui_download_url %>">
Download Consul Web UI <%= latest_version %></a>
</p>
</div>
</div>
<div class="row">
<div class="col-md-12 poweredby">
<a href='http://www.bintray.com'>
<img src='http://www.bintray.com/docs/images/poweredByBintray_ColorTransparent.png'>
</a>
</div>
</div>
</section>

View File

@ -0,0 +1,17 @@
<% wrap_layout :inner do %>
<% content_for :sidebar do %>
<div class="docs-sidebar hidden-print affix-top" role="complementary">
<ul class="nav docs-sidenav">
<li<%= sidebar_current("downloads-consul") %>>
<a href="/downloads.html">Download Consul</a>
</li>
<li<%= sidebar_current("downloads-ui") %>>
<a href="/downloads_web_ui.html">Download Web UI</a>
</li>
</ul>
</div>
<% end %>
<%= yield %>
<% end %>

View File

@ -77,3 +77,7 @@ pre {
padding-top: 15px;
padding-bottom: 15px;
}
.center {
text-align: center;
}