website: Change API to erb, move content_for head

This commit is contained in:
Justin Campbell 2017-10-20 13:48:28 -04:00
parent 9c00219903
commit 654f39dad0
2 changed files with 60 additions and 60 deletions

View File

@ -4,6 +4,64 @@ page_title: "Vagrant Cloud API"
sidebar_current: "vagrant-cloud-api"
---
<% content_for :head do %>
<script type="text/javascript">
var setExampleLanguage = function(language) {
$(".examples-menu").removeClass("active");
$(".examples-menu-" + language).addClass("active");
$(".examples pre.highlight").hide();
$(".examples pre.highlight." + language).show();
}
$(document).ready(function() {
setExampleLanguage("shell"); }
);
</script>
<style>
li {
margin: 0 !important;
}
.examples p {
display: none;
}
ul.examples-header {
margin: 0;
padding: 0 1em;
}
ul.examples-header > li {
border: 1px solid #ccc;
border-bottom: 0;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
display: inline-block;
margin: 0 !important;
margin-bottom: -1px !important;
padding: 0 0.5em;
padding-bottom: 1px;
}
ul.examples-header > li.active {
background-color: #f8f8f8;
}
ul.examples-header > li a {
color: #555 !important;
}
ul.examples-header > li a:hover {
color: #333 !important;
text-decoration: none !important;
}
.example-body {
}
</style>
<% end %>
# Vagrant Cloud API
* [Using the API](#using-the-api)

View File

@ -1,61 +1,3 @@
<% content_for :head do %>
<script type="text/javascript">
var setExampleLanguage = function(language) {
$(".examples-menu").removeClass("active");
$(".examples-menu-" + language).addClass("active");
$(".examples pre.highlight").hide();
$(".examples pre.highlight." + language).show();
}
$(document).ready(function() {
setExampleLanguage("shell"); }
);
</script>
<style>
li {
margin: 0 !important;
}
.examples p {
display: none;
}
ul.examples-header {
margin: 0;
padding: 0 1em;
}
ul.examples-header > li {
border: 1px solid #ccc;
border-bottom: 0;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
display: inline-block;
margin: 0 !important;
margin-bottom: -1px !important;
padding: 0 0.5em;
padding-bottom: 1px;
}
ul.examples-header > li.active {
background-color: #f8f8f8;
}
ul.examples-header > li a {
color: #555 !important;
}
ul.examples-header > li a:hover {
color: #333 !important;
text-decoration: none !important;
}
.example-body {
}
</style>
<% end %>
<% wrap_layout :inner do %>
<% content_for :sidebar do %>
<ul class="nav docs-sidenav">