mirror of
https://github.com/veggiemonk/awesome-docker.git
synced 2024-12-22 14:15:10 -05:00
Table: emoji url might be null
This commit is contained in:
parent
abf25909d9
commit
ea85fc1b52
12
build.js
12
build.js
@ -80,7 +80,7 @@ const emojify = text => {
|
|||||||
const result = text.replace(colonWrapped, match => {
|
const result = text.replace(colonWrapped, match => {
|
||||||
const name = match.replace(/:/g, '');
|
const name = match.replace(/:/g, '');
|
||||||
const url = emojiMapURL[name];
|
const url = emojiMapURL[name];
|
||||||
return `<img src="${url}" class="emoji" alt="${name}" />`;
|
return url ? `<img src="${url}" class="emoji" alt="${name}" />` : match;
|
||||||
});
|
});
|
||||||
return result || text;
|
return result || text;
|
||||||
};
|
};
|
||||||
@ -117,17 +117,11 @@ const formatEntry = (
|
|||||||
description,
|
description,
|
||||||
homepage,
|
homepage,
|
||||||
stargazers_count: stargazers,
|
stargazers_count: stargazers,
|
||||||
// subscribers_count: watchers,
|
|
||||||
pushed_at: updated,
|
pushed_at: updated,
|
||||||
// open_issues: issues,
|
|
||||||
// forks,
|
|
||||||
language,
|
language,
|
||||||
license,
|
license,
|
||||||
owner,
|
owner,
|
||||||
categoryName,
|
categoryName,
|
||||||
// categoryDescription,
|
|
||||||
// status,
|
|
||||||
// ownerType,
|
|
||||||
},
|
},
|
||||||
i,
|
i,
|
||||||
) =>
|
) =>
|
||||||
@ -171,8 +165,8 @@ const buttonHTLM = valueNames
|
|||||||
const processMetadata = metaData =>
|
const processMetadata = metaData =>
|
||||||
[
|
[
|
||||||
`<div class="container">`,
|
`<div class="container">`,
|
||||||
`<div class="searchbar" ><input class="search" placeholder="Search" /></div>`,
|
`<div class="searchbar"><input class="search" placeholder="Search" /></div>`,
|
||||||
`<div class="sortbtn" ><p>Sort by</p>${buttonHTLM}</div>`,
|
`<div class="sortbtn"><p>Sort by</p>${buttonHTLM}</div>`,
|
||||||
`</div>`,
|
`</div>`,
|
||||||
'<ul class="list">',
|
'<ul class="list">',
|
||||||
Object.values(metaData)
|
Object.values(metaData)
|
||||||
|
Loading…
Reference in New Issue
Block a user