Source

pasteboard_template / index.html

Full commit
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Crimson+Text">
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Inconsolata">
<link rel="stylesheet" type="text/css" media="all" href="960.css" />
<link rel="stylesheet" type="text/css" media="all" href="style.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>          
<script type="text/javascript" src="inventory.json"></script>
<script type="text/javascript">
 function update_inventory(data) {
    gotten = data;
    posts = $("#content");
    var this_uuid;
    var base_loc = "https://bitbucket.org/" + bbuser + "/" + bbuser 
                 + ".bitbucket.org/src/tip/";
    $.each(data, function(intIndex, objValue) {
        this_uuid = objValue['fullname'].substring(6,42);
        // embed code is the path to the post in the bitbucket repository, but
        // with embed=t as a query
        posts.append("<div class='post_time grid_1 alpha'><a href='"+objValue['htmlname']+
                     "'>"+objValue['modtime']+ "</a></div>");
        posts.append("<div class='post_name grid_4'>"+objValue['name'] + "</div>");
        posts.append("<div class='post_links grid_1 omega'>"+
                     "<a href='" + objValue['fullname'] + "'>raw</a></div>");
        posts.append("<div class='grid_1 post_ebutton alpha'>" +
                     "<a href='#' class='ebutton small'" +
                     "onClick='var t = $(\"#"+this_uuid+"\");t.toggle();t.select();'" + 
                     ">embed</a></div>");
        posts.append("<div class='grid_5 post_embed omega'>" +
                     "<input size=80 type='text' class='post_embed_input'"+
                     "id='" + this_uuid + "'" +
                     "value='<script src=\"" + base_loc + objValue['fullname'] + 
                     "?embed=t\">" + "<\/script>'></div>");
        posts.append("<div class='post_desc grid_5 prefix_1 alpha omega'>" +
                     objValue['descr'] + "</div>");
    });
 }
 var bbuser;
 $(document).ready(function() {
    var loc = window.location;
    bbuser = loc.hostname.substring(0, loc.hostname.indexOf('.'));
    if(bbuser.length == 0) { bbuser = "Unknown User"; }
    $("#this_username").html(bbuser);
    update_inventory(inventory_data);
 });
</script>    
<title>PasteBoard</title>
</head>
<body>
<div id="header" class="container_6">
    <div class="grid_6">
        <h1><span id="this_username">Nothing</span>'s PasteBoard</h1>
    </div>
<div id="content" class="container_6">

</div>
</body>
</html>