Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
<h3>Other projects</h3>
<div id="proj_list">
<p>
{% if project|lower != "opbasm" %}<a href="http://kevinpt.github.io/opbasm/">Opbasm</a><br>{% endif %}
{% if project|lower != "ripyl" %}<a href="http://kevinpt.github.io/ripyl/">Ripyl</a><br>{% endif %}
{% if project|lower != "vertcl" %}<a href="http://code.google.com/p/vertcl">Vertcl</a><br>{% endif %}
{% if project|lower != "vhdl-extras" %}<a href="http://code.google.com/p/vhdl-extras">Vhdl-extras</a><br>{% endif %}
{% if project|lower != "lecroy colorizer" %}<a href="http://kevinpt.github.io/lecroy-colorizer/">Lecroy-colorizer</a>{% endif %}
</p>
</div>
<script>
$(function() { // Retrieve list of repositories from Github and dynamically insert them into sidebar
if(!window.sessionStorage || !JSON) { return; } // Punt on crusty browsers (looking at you IE10)
function JSONP( url, callback ) {
var id = ( 'jsonp' + Math.random() * new Date() ).replace('.', '');
var script = document.createElement('script');
script.src = url.replace( 'callback=?', 'callback=' + id );
document.body.appendChild( script );
window[ id ] = function( data ) {
if (callback) {
callback( data );
}
};
}
// Build dictionary indexing lower cased project names with their preferred format
var knownProjects = ["VHDL-extras", "Ripyl", "VerTcl", "LeCroy-colorizer", "Opbasm"];
var projectDict = {};
$.each(knownProjects, function(index, v) {
projectDict[v.toLowerCase()] = v;
});
function insert_projects(projects) {
var links = [];
var cur_proj = "{{ project }}".toLowerCase();
$.each(projects, function(key, value) {
if(key != cur_proj) {
var title;
if(key in projectDict) {
title = projectDict[key];
} else { // Capitalize first char
title = key.replace(/^./, function(match) {return match.toUpperCase()});
}
links.push("<a href='"+ value +"'>" + title + "</a>");
}
});
$("#proj_list").html("<p>"+ links.join("<br>") +"</p>");
}
var now = new Date().getTime();
if(sessionStorage.KTcacheTime && now - sessionStorage.KTcacheTime < 5*60*1000 ) { // Use cached values (5 min. expiry)
insert_projects(JSON.parse(sessionStorage.KTprojects));
} else { // Retrieve current projects
JSONP("https://api.github.com/users/kevinpt/repos?type=owner&callback=?", function(response) {
var projects = {};
$.each(response.data, function(index, value) {
if(!value.fork)
projects[value.name] = value.homepage;
});
insert_projects(projects);
// Store data in session cache
sessionStorage.KTprojects = JSON.stringify(projects);
var now = new Date().getTime();
sessionStorage.KTcacheTime = now;
});
}
});
</script>
a9b24e4d6This file is pinned to the selected release. Download the original to open it in your design tool.