mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 06:03:04 -04:00
add support for richer entities
This commit is contained in:
parent
1cefaaab55
commit
a8dcd920cf
2 changed files with 25 additions and 2 deletions
|
@ -111,6 +111,18 @@ function createSearchResultPage(context, result, doodle){
|
|||
|
||||
if(result.card.images.preview) res.author.iconUrl = result.card.images.preview;
|
||||
|
||||
if(result.card.images.image) res.image = {
|
||||
url: result.card.images.image
|
||||
};
|
||||
|
||||
if(result.card.facts) res.fields = result.card.facts.map((f)=>{
|
||||
return {
|
||||
name: f.label,
|
||||
value: f.value,
|
||||
inline: true
|
||||
}
|
||||
})
|
||||
|
||||
if(result.card.link) res.author.url = result.card.link
|
||||
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue