2018-07-13 18:28:24 +02:00
|
|
|
"use strict";
|
|
|
|
|
2018-09-26 18:42:41 +02:00
|
|
|
|
|
|
|
|
2018-10-10 19:56:35 +02:00
|
|
|
// U T I L
|
2018-07-13 18:28:24 +02:00
|
|
|
|
2018-10-10 00:11:22 +02:00
|
|
|
const links = [
|
2018-07-13 18:28:24 +02:00
|
|
|
{
|
2019-03-19 23:56:32 +01:00
|
|
|
href: "https://chat.lbry.com",
|
2018-10-09 23:28:18 +02:00
|
|
|
image: "https://spee.ch/b432346bfd641990f3dc3dbceda057b4ededa360/discord-bg.jpg",
|
2018-09-30 19:05:15 +02:00
|
|
|
title: "Chat (Discord)"
|
2018-07-13 18:28:24 +02:00
|
|
|
},
|
|
|
|
{
|
2019-03-19 23:56:32 +01:00
|
|
|
href: "https://discourse.lbry.com",
|
2018-10-09 23:28:18 +02:00
|
|
|
image: "https://spee.ch/e59dcbe6a533934eb82e73bb335b7e43cb8a9f7d/atmosphere.png",
|
2018-09-30 19:05:15 +02:00
|
|
|
title: "Developer Forum"
|
2018-07-13 18:28:24 +02:00
|
|
|
},
|
|
|
|
{
|
2018-09-30 19:05:15 +02:00
|
|
|
href: "https://lbry.fund",
|
2018-10-09 23:28:18 +02:00
|
|
|
image: "https://spee.ch/b29b4cb6495c9c2e6fc26113bcc92158ed408a35/pixelsunset.png",
|
2018-09-30 19:05:15 +02:00
|
|
|
title: "lbry.fund (Project Funding)"
|
2018-07-13 18:28:24 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
href: "https://www.reddit.com/r/lbry",
|
2018-10-09 23:28:18 +02:00
|
|
|
image: "https://spee.ch/2357ab1464bcbba3458f4eabdad9644bcfd6f491/lines.png",
|
2018-07-13 18:28:24 +02:00
|
|
|
title: "Reddit"
|
|
|
|
},
|
2019-03-27 20:34:40 +01:00
|
|
|
// {
|
|
|
|
// href: "https://lbry.com/join-us",
|
|
|
|
// image: "https://spee.ch/6db68b3ebf22386fcd9d04237d11bfaff5ba2a95/minimalisticrubikcube.png",
|
|
|
|
// title: "Join Our Team"
|
|
|
|
// },
|
2018-07-13 18:28:24 +02:00
|
|
|
{
|
2018-09-24 21:06:10 +02:00
|
|
|
href: "https://twitter.com/lbryio",
|
2018-10-09 23:28:18 +02:00
|
|
|
image: "https://spee.ch/9c38db124b85736adbcca48cdf34877d2110bbcd/GeoShapes.png",
|
2018-07-13 18:28:24 +02:00
|
|
|
title: "Twitter"
|
2018-10-09 23:28:18 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
href: "https://www.facebook.com/lbryio",
|
|
|
|
image: "https://spee.ch/734404b89658e30af920829553b22d1742c0d99a/voice.png",
|
|
|
|
title: "Facebook"
|
2018-07-13 18:28:24 +02:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2018-09-26 18:42:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
// E X P O R T
|
|
|
|
|
2018-10-03 22:27:13 +02:00
|
|
|
export default () => {
|
2018-07-13 18:28:24 +02:00
|
|
|
const renderedLinks = [];
|
|
|
|
let imageLink = "";
|
|
|
|
|
|
|
|
for (const link of links) {
|
2019-04-12 21:08:35 +02:00
|
|
|
if (link.image)
|
|
|
|
imageLink = `<img alt="${link.title}" src="${link.image}"/>`;
|
|
|
|
|
2018-08-25 00:30:58 +02:00
|
|
|
renderedLinks.push(returnLinkTemplate(link.href, link.title, imageLink));
|
2018-07-13 18:28:24 +02:00
|
|
|
}
|
|
|
|
|
2018-08-25 00:30:58 +02:00
|
|
|
return `
|
2018-09-30 19:05:15 +02:00
|
|
|
<div class="feature-links">${renderedLinks.join("")}</div>
|
2018-07-13 18:28:24 +02:00
|
|
|
`;
|
2018-10-03 22:27:13 +02:00
|
|
|
};
|
2018-09-26 18:42:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// H E L P E R
|
2018-08-25 00:30:58 +02:00
|
|
|
|
|
|
|
function returnLinkTemplate(url, title, image) {
|
|
|
|
return `
|
2018-09-30 19:05:15 +02:00
|
|
|
<a class="feature-link" href="${url}" title="${title}">
|
|
|
|
<h3 class="feature-link__title">
|
|
|
|
<span class="feature-link__title-inner">${title}</span>
|
|
|
|
</h3>
|
2018-08-25 00:30:58 +02:00
|
|
|
|
|
|
|
<figure class="feature-link__background">
|
|
|
|
${image}
|
|
|
|
</figure>
|
2018-09-30 19:05:15 +02:00
|
|
|
</a>
|
2018-08-25 00:30:58 +02:00
|
|
|
`;
|
|
|
|
}
|