Add Gravatar ALT

This commit is contained in:
Richie Bendall 2019-05-29 11:09:58 +12:00
parent 7161f230fc
commit 924e7ace1a
No known key found for this signature in database
GPG key ID: 1C6A99DFA9D306FC

View file

@ -48,13 +48,10 @@ app.get('*', (req, res) => {
const user = JSON.parse(data)
info = `${year} ${user.copyright}`
theme = user.theme || "default"
gravatar = user.gravatar ? `<img id="gravatar" src="https://www.gravatar.com/avatar/${md5(user.email.trim().toLowerCase())}" />` : ``
// gravatar = '<img id="gravatar" src="https://www.gravatar.com/avatar/' . md5(strtolower(trim($user->email))) . '" />';
gravatar = user.gravatar ? `<img id="gravatar" alt="Profile image" src="https://www.gravatar.com/avatar/${md5(user.email.trim().toLowerCase())}" />` : ``
}
// Parse the options specified in the URL
// console.log(req.path.split('/'))
const options = {}
res.set('Content-Type', 'text/html');
res.send(new Buffer.from(mustache.render(template, {
info,