fix spacing of github info lists on project pages

This commit is contained in:
Sami Samhuri 2010-12-19 16:49:24 -08:00
parent ef7fe966a2
commit ce091d1821
2 changed files with 20 additions and 6 deletions

View file

@ -26,6 +26,16 @@ h4 { margin: 0.5em 0 0.7em }
#info > div:first-child { border-left: none }
#info ul { list-style-type: none
; text-align: center
; padding: 0
; margin: 0
}
#info li { padding: 0.2em 0
; margin: 0
}
#info > br.clear { clear: both }
@media only screen and (max-device-width:480px) {

View file

@ -1,8 +1,8 @@
(function() {
;(function() {
if (typeof console === 'undefined') {
console = {log:function(){}}
}
var global = this
global.SJS = {
proj: function(name) {
@ -50,22 +50,26 @@
})
}
function listify(things) {
return '<ul><li>' + things.join('</li><li>') + '</li></ul>'
}
function updateBranches(name, branches) {
function branchLink(b) {
return '<a href=https://github.com/samsonjs/' + name + '/tree/' + b + '>' + b + '</a>'
}
html('branches', Object.keys(branches).map(branchLink).join('<br>'))
html('branches', listify(Object.keys(branches).map(branchLink)))
}
function updateContributors(contributors) {
function userLink(u) {
return '<a href=https://github.com/' + u.login + '>' + (u.name || u.login) + '</a>'
}
html('contributors', contributors.map(userLink).join('<br>'))
html('contributors', listify(contributors.map(userLink)))
}
function updateLangs(langs) {
html('langs', langsByUsage(langs).join('<br>'))
html('langs', listify(langsByUsage(langs)))
}
function updateN(name, things) {
@ -129,4 +133,4 @@
}
}
}
}())
}());