Created
May 12, 2013 19:49
-
-
Save kinlane/5564677 to your computer and use it in GitHub Desktop.
List Federal Agencies who have published their digital strategy.
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
<!-- Being Federal Agency Listing ---> | |
<!-- Requires http://mustache.github.io/--> | |
<table id="agencyListing" style="padding-left: 40px;"> | |
<tbody> | |
<tr> | |
<td colspan="2"> | |
<table> | |
<tbody> | |
<tr> | |
<td width="80%" align="left"> | |
<strong>Federal Agency Digital Strategies</strong> | |
</td> | |
<td width="10%" align="center"> | |
<a href="[github gists]" target="_blank" title="Script for Display"> | |
<img src="https://s3.amazonaws.com/kinlane-productions/bw-icons/bw-code.png" width="25" /> | |
</a> | |
</td> | |
<td width="10%" align="center"> | |
<a href="federal-agencies-digital-strategy.json" target="_blank" title="Raw JSON Data" | |
<img src="https://s3.amazonaws.com/kinlane-productions/bw-icons/bw-json-data-store.png" width="25" /> | |
</a> | |
</td> | |
</tr> | |
</tbody> | |
</table> | |
</td> | |
</tr> | |
</tbody> | |
</table> | |
<script id="agencyListingTemplate" type="text/template"> | |
<tr> | |
<td width="75" align="center" valign="middle"> | |
<a href="{{url}}" target="_blank"> | |
<img src="{{logo}}" width="75" align="center" style="padding: 15px;" /> | |
</a> | |
</td> | |
<td valign="middle" align="left"> | |
<a href="{{url}}" style="color: #000;" target="_blank"> | |
<strong>{{name}}</strong> | |
</a> | |
<br /> | |
<a href="{{url}}" style="color: #000;" target="_blank"> | |
{{url}} | |
</a> | |
</td> | |
</tr> | |
</script> | |
<script type="text/javascript"> | |
function listAgencies() | |
{ | |
$.getJSON('federal-agencies-digital-strategy.json', function(data) { | |
agencycount = 1; | |
$.each(data['agencies'], function(key, val) { | |
var template = $('#agencyListingTemplate').html(); | |
var html = Mustache.to_html(template, val); | |
$('#agencyListing').append(html); | |
agencycount++; | |
}); | |
}); | |
} | |
listAgencies(); | |
</script> | |
<!-- End Federal Agency Listing ---> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment