chore: cleanup alt attrs
This commit is contained in:
parent
1232e36745
commit
0c6cc69abf
2 changed files with 7 additions and 9 deletions
|
@ -12,12 +12,17 @@ module.exports = {
|
|||
}
|
||||
if (item.type === 'artist') {
|
||||
normalized['title'] = item['title']
|
||||
normalized['alt'] = `${item['plays']} plays of ${item['title']}`
|
||||
normalized['subtext'] = `${item['plays']} plays`
|
||||
}
|
||||
if (item.type === 'book') normalized['alt'] = item['title']
|
||||
if (item.type === 'movie') normalized['title'] = item['title']
|
||||
if (item.type === 'movie') {
|
||||
normalized['title'] = item['title']
|
||||
normalized['alt'] = `${item['title']} - ${item['summary']}`
|
||||
}
|
||||
if (item.type === 'tv') {
|
||||
normalized['title'] = item['title']
|
||||
normalized['alt'] = `${item['title']} from ${item['name']}`
|
||||
normalized['subtext'] = `${item.name} • <strong>${item.episode}</strong>`
|
||||
}
|
||||
return normalized
|
||||
|
|
Reference in a new issue