lbry.tech/app/components/ecosystem.js

61 lines
1.2 KiB
JavaScript
Raw Normal View History

2018-07-12 17:21:42 +02:00
"use strict";
2018-08-25 00:30:58 +02:00
// P A C K A G E
2018-07-12 17:21:42 +02:00
2018-08-30 23:53:52 +02:00
import Component from "choo/component";
2018-07-12 17:21:42 +02:00
2018-08-24 23:58:04 +02:00
// V A R I A B L E S
2018-07-12 17:21:42 +02:00
2018-08-24 23:58:04 +02:00
const APPLICATIONS = require("./ecosystem/module-applications");
const CHAINQUERY = require("./ecosystem/submodule-chainquery");
const LBRY = require("./ecosystem/module-lbry");
const LBRYCRD = require("./ecosystem/module-lbrycrd");
const LIGHTHOUSE = require("./ecosystem/submodule-lighthouse");
const REFLECTOR = require("./ecosystem/submodule-reflector");
const WALLET = require("./ecosystem/submodule-wallet");
2018-07-12 17:21:42 +02:00
2018-08-25 00:30:58 +02:00
// P R O G R A M
2018-07-12 17:21:42 +02:00
2018-08-24 23:58:04 +02:00
Ecosystem.prototype = Object.create(Component.prototype);
2018-07-12 17:21:42 +02:00
2018-08-24 23:58:04 +02:00
Ecosystem.prototype.createElement = () => {
2018-08-25 00:30:58 +02:00
return `
2018-08-24 23:58:04 +02:00
<section class="ecosystem">
<aside class="ecosystem__submodules">
${CHAINQUERY()}
${WALLET()}
</aside>
2018-07-12 17:21:42 +02:00
2018-08-24 23:58:04 +02:00
<section class="ecosystem__modules">
${LBRYCRD()}
${LBRY()}
${APPLICATIONS()}
</section>
2018-07-12 17:21:42 +02:00
2018-08-24 23:58:04 +02:00
<aside class="ecosystem__submodules">
${LIGHTHOUSE()}
${REFLECTOR()}
</aside>
</section>
`;
};
2018-07-26 00:04:21 +02:00
2018-08-30 23:53:52 +02:00
// E X P O R T
module.exports = exports = Ecosystem;
2018-08-25 00:30:58 +02:00
// H E L P E R S
2018-07-26 00:04:21 +02:00
2018-08-24 23:58:04 +02:00
function Ecosystem() {
if (!(this instanceof Ecosystem)) return new Ecosystem();
Component.call(this);
}