Created
July 13, 2013 21:18
-
-
Save kinlane/5992258 to your computer and use it in GitHub Desktop.
This is a detail page for list of Backend as a Service (BaaS) providers.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--Data, API and Script Toolbar---> | |
<ul class="toolbar"> | |
<li>{"<a href="https://raw.github.com/kinlane/backend-as-a-service/gh-pages/data/companies.json" title="JSON" target="_blank">JSON</a>"}</li> | |
<li>{"<a href="https://apievangelist.3scale.net/docs" title="API" target="_blank">API</a>"}</li> | |
<li>{"<a href="https://gist.github.com/kinlane/5992075" title="Script" target="_blank">SCRIPT</a>"}</li> | |
</ul> | |
<!--BaaS Detail Template---> | |
{% raw %} | |
<script id="companyDetailTemplate" type="text/template"> | |
<h2>{{name}}</h2> | |
<p><img src="{{logo}}" width="250" style="padding: 15px;" align="right" /></a></p> | |
<p>{{details}}</p> | |
</script> | |
{% endraw %} | |
<!--BaaS Full Listing Container---> | |
<div id="companyDetailContainer"> | |
<div id="companyDetail"> </div> | |
<br /> | |
<div id="linkicons" align="center" width="50%"> | |
<a href="companies.html" target="_blank" title="Website" id="home-icon"><img id="home-icon-img" src="https://s3.amazonaws.com/kinlane-productions/bw-icons/bw-home-icon.jpeg" width="50" style="margin-bottom: 5px; padding:15px;" /></a> | |
<a href="companies.html" target="_blank" title="Blog" id="blog-icon"><img id="blog-icon-img" src="https://s3.amazonaws.com/kinlane-productions/bw-icons/bw-blog-icon.png" width="45" style="padding:15px;margin-bottom: 3px; " /></a> | |
<a href="companies.html" target="_blank" title="Blog RSS" id="blogrss-icon"><img id="blogrss-icon-img" src="https://s3.amazonaws.com/kinlane-productions/bw-icons/bw-rss-icon.png" width="47" style="padding:15px;" /></a> | |
<a href="companies.html" target="_blank" title="Twitter" id="twitter-icon"><img id="twitter-icon-img" src="https://s3.amazonaws.com/kinlane-productions/bw-icons/bw-twitter-icon.png" width="55" style="padding:15px;margin-bottom: 3px; " /></a> | |
<a href="companies.html" target="_blank" title="Githube" id="github-icon"><img id="github-icon-img" src="https://s3.amazonaws.com/kinlane-productions/bw-icons/bw-github-icon.png" width="70" style="padding:15px;" /></a> | |
</div> | |
<br /> | |
<p align="center"><a href="companies.html">Return to BaaS Providers Full Listing Page</a></p> | |
</div> | |
<!--BaaS Detail JavaScript---> | |
<script type="text/javascript"> | |
//Pull variables from URL | |
function getUrlVar(key){ | |
var result = new RegExp(key + "=([^&]*)", "i").exec(window.location.search); | |
return result && unescape(result[1]) || ""; | |
} | |
// Requires Mustache - http://mustache.github.io/ | |
// Displays BaaS Detail | |
function getCompanyDetails(id){ | |
$.getJSON('data/companies.json', function(data) { | |
$.each(data['company'], function(key, val) { | |
thisid = val['id']; | |
if(thisid == id) | |
{ | |
var template = $('#companyDetailTemplate').html(); | |
var html = Mustache.to_html(template, val); | |
$('#companyDetail').append(html); | |
website = val['website']; | |
if(website.length>0){ document.getElementById("home-icon").href=website; } else { document.getElementById("home-icon-img").style.display='none'; } | |
blog = val['blog']; | |
if(blog.length>0){ document.getElementById("blog-icon").href=blog; } else { document.getElementById("home-blog-img").style.display='none'; } | |
blogrss = val['blogrss']; | |
if(blog.length>0){ document.getElementById("blogrss-icon").href=blogrss; } else { document.getElementById("blogrss-icon-img").style.display='none'; } | |
twitter = val['twitter']; | |
if(twitter.length>0){ document.getElementById("twitter-icon").href=twitter; } else { document.getElementById("twitter-icon-img").style.display='none'; } | |
github = val['github']; | |
if(github.length>0){ document.getElementById("github-icon").href=github; } else { document.getElementById("github-icon-img").style.display='none'; } | |
} | |
}); | |
}); | |
} | |
</script> | |
<!--Trigger BaaS DetailJavaScript onLoad--> | |
<script type="text/javascript"> | |
getCompanyDetails(getUrlVar('id')); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment