Skip to content

Commit

Permalink
New functions, dataset and a test commit
Browse files Browse the repository at this point in the history
- Tests GH Pages thing. Shouldn't affect anything
- NEW HESA/UCAS Table
- Edit Mode
- Export
  • Loading branch information
kennydude committed Jul 27, 2012
1 parent c44f3a9 commit ae19852
Show file tree
Hide file tree
Showing 4 changed files with 1,183 additions and 29 deletions.
7 changes: 0 additions & 7 deletions _layouts/default.html
Expand Up @@ -55,12 +55,5 @@ <h6>

</div> <!-- /container -->

<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="mustache.js"></script>
<script type="text/javascript" src="script.js"></script>

</body>
</html>
84 changes: 75 additions & 9 deletions _layouts/entry.html
@@ -1,3 +1,6 @@
---
layout: default
---
<!DOCTYPE html>
<html lang="en">
<head>
Expand All @@ -13,7 +16,15 @@
body {
padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
}
</style>
body.editmode{
padding-top: 90px;
}
.navbar .editmode{
background: #FFF;
text-align: center;
padding: 10px;
}
</style><style id="eMode"></style>
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap-responsive.css" rel="stylesheet">

<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
Expand All @@ -24,9 +35,12 @@

<body>

<a href="https://github.com/kennydude/data"><img style="position: absolute; top: 0; right: 0; border: 0;z-index:9999" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
<a href="https://github.com/kennydude/data"><img style="position: fixed; top: 0; right: 0; border: 0;z-index:9999" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>

<div class="navbar navbar-fixed-top">
<div class="editmode"><div class="container"><div class="span4 offset3">
You are in Edit Mode! <a class="close closeEditMode" style="float: none !important" href="#">&times;</a>
</div></div></div>
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
Expand All @@ -45,16 +59,44 @@
</div>

<div class="container">

<h1>{{ page.title }}</h1>
<p>{{ page.description }}</p>
<a href="#encode">Skip to Encode</a>
<div style="height:600px; font-size: 20px;padding-top:30px" class="pleasewait">
Please wait...
</div>
<div class="page-header">
<h1>{{ page.title }}
<small>{{ page.description }}</small>
</h1>
</div>
<div class="btn-group">
<a class="editMode btn">Edit Mode</a>
<a class="export btn">Export JSON</a>
<a href="#encode" class="btn">Skip to Encode →</a>
</div>
<hr/>
<pre id="rawcode">{{ page.content }}</pre>

<table id="data" class="table table-striped table-bordered table-condensed">
<thead><tr class="datahead"></tr></thead>
<tbody id="body"></tbody>
<thead><tr class="datahead"></tr></thead>
<thead>
<tr class="datahead top">
<td class="editmode addNewColumn" style="cursor:pointer">
<i class="icon-plus-sign"></i> New Column
</td>
</tr>
</thead>
<tbody id="body">
<tr class="newrow editmode">
<td colspan="1" id="newRowCell" style="text-align: center; cursor: pointer;">
<i class="icon-plus-sign"></i> Add new row
</td>
</tr>
</tbody>
<thead>
<tr class="datahead bottom">
<td class="editmode addNewColumn" style="cursor:pointer">
<i class="icon-plus-sign"></i> New Column
</td>
</tr>
</thead>
</table>
<a id="encode"></a>
<h2>Encode:</h2>
Expand All @@ -74,10 +116,34 @@ <h6>

</div> <!-- /container -->

<div class="modal hide" id="exportModal">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3>Export JSON</h3>
</div>
<div class="modal-body">
<p>You can now pull this into a .json file under the <code>_posts</code> directory on the databin. <a class="exportFile btn" target="_blank">Open as savable file</a></p>
<pre id="exportContent"></pre>
<hr/>
<p>Notes: You'll need this at the header for it to work properly with Jekyll</p>
<pre>---
layout: entry
title: Title
description: Description
---
</pre>
</div>
<div class="modal-footer">
<a href="#" class="btn" data-dismiss="modal">Close</a>
</div>
</div>

<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<!-- We're on GH pages anyway! -->
<script type="text/javascript" src="http://twitter.github.com/bootstrap/assets/js/bootstrap-modal.js"></script>
<script type="text/javascript" src="mustache.js"></script>
<script type="text/javascript" src="script.js"></script>

Expand Down

0 comments on commit ae19852

Please sign in to comment.