samhuri.net/templates/proj/index.html
2012-06-12 22:10:24 -07:00

156 lines
4.9 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>projects :: samhuri.net</title>
<link rel="icon" type="image/gif" href="../images/s.gif">
<link rel="stylesheet" href="../css/proj-index-all.min.css">
<link rel="stylesheet" media="screen" href="../css/mobile.min.css">
<!--[if IE 6]>
<link rel="stylesheet" href="../css/ie6.min.css">
<![endif]-->
<!--[if lt IE 8]>
<link rel="stylesheet" href="../css/ie7.min.css">
<script src="http://d1eqzjbvoh1rux.cloudfront.net/json2.min.js"></script>
<script src="../js/storage-polyfill.min.js"></script>
<![endif]-->
<style>
#gh { text-align: center }
#gh img { border: none }
span { padding: 5px }
#forkme { display: none }
#projects li p { margin: 0 }
#projects li p.description
{ font-size: 0.6em
; line-height: 1em
; color: #444
; margin-bottom: 0.5em
}
</style>
</head>
<body>
<nav id="breadcrumbs"><a href="../">samhuri.net</a></nav>
<a href="https://github.com/samsonjs"><img id="forkme" src="../images/forkme@2x.png" width="140" height="140" alt="Fork me on GitHub"></a>
<header>
<h1>projects</h1>
</header>
<p id="gh">
<a class="img" href="https://github.com/samsonjs"><img src="../images/dr-octocat-448x448.png" width="224" height="224" alt="GitHub"></a>
</p>
<table align="center" id="stats">
<tr>
<td align="right"><span id="npublicRepos"><img src="../images/spinner@2x.gif" width="16" height="16"></span> projects</td>
<td>&mdash;</td>
<td align="left"><span id="nfollowers"><img src="../images/spinner@2x.gif" width="16" height="16"></span> followers</td>
</tr>
<tr>
<td align="right"><span id="npublicGists"><img src="../images/spinner@2x.gif" width="16" height="16"> gists</span>
<td>&mdash;</td>
<td align="left">following <span id="nfollowing"><img src="../images/spinner@2x.gif" width="16" height="16"></span></td>
</tr>
</table>
<nav>
<ul class="nav" id="projects">
{{#projects}}
<li>
<p class="title"><a href="{{name}}">{{name}}</a></p>
<p class="description">{{description}}</p>
</li>
{{/projects}}
</ul>
</nav>
<footer>
<p>You can <a href="https://twitter.com/_sjs">find me on twitter</a>.</p>
<p><a href="mailto:sami@samhuri.net">sami@samhuri.net</a></p>
</footer>
<p id="promote-js">
<a class="img" href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/RegExp" title="JS RegExp .lastIndex"><img src="../images/promotejsv.gif" height="140" width="80" alt="JS RegExp .lastIndex"></a>
</p>
<script>
var _gaq = _gaq || []
_gaq.push( ['_setAccount', 'UA-214054-5']
, ['_trackPageview']
, ['_trackPageLoadTime']
)
;(function() {
var ga = document.createElement('script')
ga.type = 'text/javascript'
ga.async = true
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'
var s = document.getElementsByTagName('script')[0]
s.parentNode.insertBefore(ga, s)
}())
</script>
<script src="../js/proj-index-all.min.js"></script>
<script>
if (typeof console === 'undefined') {
console = {log:function(){}}
}
;(function() {
if (document.addEventListener) {
document.addEventListener('DOMContentLoaded', ready, false)
} else if (window.attachEvent) {
window.attachEvent('onload', ready)
}
function ready() {
function addClass(el, name) {
var c = el.className || name
if (!c.match(new RegExp('\b' + name + '\b', 'i'))) c += ' ' + name
}
var body = document.getElementsByTagName('body')[0]
, text
if ('innerText' in body) {
text = function(id, text) {
document.getElementById(id).innerText = text
}
} else {
text = function(id, text) {
document.getElementById(id).textContent = text
}
}
function highlight(id) {
document.getElementById(id).style.className = ' highlight'
}
function textHighlight(id, t) {
text(id, t)
document.getElementById(id).className = ' highlight'
}
function updateN(name, things) {
textHighlight('n' + name, things)
}
var data = createObjectStore('proj')
, t = data.get('t-proj')
, user = GITR.user('samsonjs')
, names = ['followers', 'following', 'publicRepos', 'publicGists']
if (!t || +new Date() - t > 3600 * 1000) {
console.log('stale ' + String(t))
data.set('t-proj', +new Date())
user.fetch(function(err, user) {
if (user) {
data.set('user', user)
}
names.forEach(function(name) {
if (err) {
updateN(name, '?')
}
else {
updateN(name, user[name])
}
})
})
} else {
console.log('hit ' + t + ' (' + (+new Date() - t) + ')')
names.forEach(function(name) { updateN(name, data.get('user')[name]) })
}
}
}())
</script>
</body>
</html>