From ce86c5b74ea82286ca75c0affdb7aff83e7d9f21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=9D=E3=83=BC=E3=83=AB=20=E3=82=A6=E3=82=A7=E3=83=83?= =?UTF-8?q?=E3=83=96?= Date: Fri, 24 Aug 2018 17:30:58 -0500 Subject: [PATCH] Further Refactoring --- views/pages/page.js | 8 +-- views/partials/ecosystem.js | 31 ++------- .../partials/ecosystem/module-applications.js | 8 +-- views/partials/ecosystem/module-lbry.js | 8 +-- views/partials/ecosystem/module-lbrycrd.js | 8 +-- .../ecosystem/submodule-chainquery.js | 8 +-- .../ecosystem/submodule-lighthouse.js | 8 +-- .../partials/ecosystem/submodule-reflector.js | 8 +-- views/partials/ecosystem/submodule-wallet.js | 8 +-- views/partials/feature-links.js | 68 ++++++++++++------- 10 files changed, 57 insertions(+), 106 deletions(-) diff --git a/views/pages/page.js b/views/pages/page.js index d1c9adf..6d567f0 100644 --- a/views/pages/page.js +++ b/views/pages/page.js @@ -115,7 +115,7 @@ function createMetaTags(metaObject) { For Markdown files, the custom yaml should look like this: meta: - - description: Description goes here + - description: Description goes here This does not currently work with parameters like "og:image" // https://github.com/lbryio/lbry.tech/issues/30 @@ -143,9 +143,9 @@ function partialFinder(markdownBody) { if (fileExistsTest) { const partialFunction = local(`/views/partials/${filename}.js`); - if (filename === "ecosystem") { - const Ecosystem = new partialFunction; - markdownBody = markdownBody.replace(partial, Ecosystem.render()); + if (filename === "ecosystem" || filename === "feature-links") { + const neatPartial = new partialFunction; + markdownBody = markdownBody.replace(partial, neatPartial.render()); } else markdownBody = markdownBody.replace(partial, partialFunction); diff --git a/views/partials/ecosystem.js b/views/partials/ecosystem.js index a88a5a8..1acec29 100644 --- a/views/partials/ecosystem.js +++ b/views/partials/ecosystem.js @@ -2,10 +2,9 @@ -// P A C K A G E S +// P A C K A G E const Component = require("choo/component"); -const html = require("choo/html"); // V A R I A B L E S @@ -19,12 +18,12 @@ const WALLET = require("./ecosystem/submodule-wallet"); -// E X P O R T +// P R O G R A M Ecosystem.prototype = Object.create(Component.prototype); Ecosystem.prototype.createElement = () => { - return html` + return `