mirror of
https://github.com/primer/css.git
synced 2025-01-05 21:22:57 +03:00
use real avatars
This commit is contained in:
parent
d73daf52b3
commit
80829c15d2
@ -38,11 +38,12 @@ module.exports = async function(source) {
|
||||
}
|
||||
},
|
||||
avatar_for: ([username, size], kwargs) => {
|
||||
const name = username === 'current_user' ? 'github' : username
|
||||
const attrs = Object.entries(kwargs)
|
||||
.map(([key, value]) => ` ${key}="${value}"`)
|
||||
.join(' ')
|
||||
const s = size * 2
|
||||
return `<img src="https://github.com/github.png?s=${s}" width="${size}" height="${size}"${attrs}>`
|
||||
return `<img src="https://github.com/${name}.png?s=${s}" width="${size}" height="${size}"${attrs}>`
|
||||
}
|
||||
/* eslint-enable */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user