Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
92 lines (81 sloc) 2.37 KB
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="css/application.css" type="text/css" charset="utf-8">
<script src="lib/LAB.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
$LAB
.setOptions({AlwaysPreserveOrder:true})
.script("lib/json.js")
.script("lib/jquery.js")
.script("lib/jquery.tmpl.js")
.script("lib/jquery.bitly.js")
.script("lib/store.min.js")
.script("lib/spine.js")
.script("lib/spine.model.local.js")
.script("lib/spine.controller.manager.js")
.script("lib/spine.route.js")
.script("app/models/url.js")
.script("app/application.js");
</script>
<script type="text/x-jquery-tmpl" id="urlTemplate">
<div class="item">
<div class="show">
<span class="short">
${long_url}
</span>
<span class="long">
{{if short_url}}
<a href="${short_url}">${short_url}</a>
{{else}}
Generating...
{{/if}}
</span>
<span class="iconPanel">
<a class="toggleStats"></a>
<a class="destroy"></a>
</span>
</div>
</div>
</script>
<script type="text/x-jquery-tmpl" id="statsTemplate">
<div class="stats">
<a class="back">Back</a>
<h1>Click Statistics</h1>
<h1 class="longUrl">${long_url}</h1>
{{if stats}}
<img class="gchart" src="http://chart.apis.google.com/chart?chs=350x250&cht=p&chd=t:${stats.global_clicks},${stats.user_clicks}&chdl=Global+clicks|User+clicks&chtt=Global+vs.+User+Clicks" width="350" height="250" alt="Global vs. User Clicks" />
{{/if}}
<p>Short URL:
{{if short_url}}
<a href="${short_url}">${short_url}</a>
{{else}}
Generating...
{{/if}}
</p>
{{if stats}}
<p>Global clicks: ${stats.global_clicks}</p>
<p>User clicks: ${stats.user_clicks}</p>
{{else}}
Fetching...
{{/if}}
</div>
</script>
</head>
<body>
<div id="views">
<div id="urls">
<h1>Bit.ly Client</h1>
<form>
<input type="text" placeholder="Enter a URL">
</form>
<div class="items"></div>
</div>
<div id="stats">
</div>
</div>
<div class="footer">
A demo by <a href="http://twitter.com/addyosmani">@addyosmani</a> and <a href="http://twitter.com/maccman">@maccman</a>.
</div>
</body>
</html>