diff --git a/app/views/partials/api-scripts.js b/app/components/client/api-scripts.js similarity index 100% rename from app/views/partials/api-scripts.js rename to app/components/client/api-scripts.js diff --git a/app/views/partials/ecosystem-scripts.js b/app/components/client/ecosystem-scripts.js similarity index 100% rename from app/views/partials/ecosystem-scripts.js rename to app/components/client/ecosystem-scripts.js diff --git a/app/views/partials/glossary-scripts.js b/app/components/client/glossary-scripts.js similarity index 100% rename from app/views/partials/glossary-scripts.js rename to app/components/client/glossary-scripts.js diff --git a/app/views/partials/tour-scripts.js b/app/components/client/tour-scripts.js similarity index 96% rename from app/views/partials/tour-scripts.js rename to app/components/client/tour-scripts.js index 438a1c7..e066cfd 100644 --- a/app/views/partials/tour-scripts.js +++ b/app/components/client/tour-scripts.js @@ -21,7 +21,7 @@ $("body").on("click", "[data-action]", event => { setTimeout(() => { handleExamples(event); $(".tour").removeClass("waiting"); - }, 1500); // "rate-limit" to allow example divs time to populate + }, 2500); // "rate-limit" to allow example divs time to populate }); $("body").on("click", ".tour__content__meme__canvas__thumbnail", event => { @@ -104,7 +104,7 @@ function initializeTour() { setTimeout(() => { $(".tour").removeClass("waiting"); - }, 2000); + }, 2500); } @@ -221,6 +221,7 @@ const handleExamples = debounce(event => { } $("#fetch-claim-uri").val(""); // reset URL bar + $("#tour-url button").text("Resolve"); if ($("#tour-url")[0].style.display === "none") $("#tour-url").show(); $(".tour__sidebar__example").removeClass("active"); @@ -261,6 +262,8 @@ const handleExamples = debounce(event => { } $("#fetch-claim-uri").val(""); // reset URL bar + $("#tour-url button").text("Tip"); + // $("#tour-url").after("

In the LBRY app, you can financially support your favorite creators by donating LBRY Coin (LBC). In this example, we are donating LBC in your stead.

"); if ($("#tour-url")[0].style.display === "none") $("#tour-url").show(); $(".tour__sidebar__example").removeClass("active"); diff --git a/app/views/partials/ecosystem.js b/app/components/ecosystem.js similarity index 96% rename from app/views/partials/ecosystem.js rename to app/components/ecosystem.js index 1acec29..3b83a2f 100644 --- a/app/views/partials/ecosystem.js +++ b/app/components/ecosystem.js @@ -4,7 +4,7 @@ // P A C K A G E -const Component = require("choo/component"); +import Component from "choo/component"; // V A R I A B L E S @@ -44,15 +44,17 @@ Ecosystem.prototype.createElement = () => { `; }; + + +// E X P O R T + +module.exports = exports = Ecosystem; + + + // H E L P E R S function Ecosystem() { if (!(this instanceof Ecosystem)) return new Ecosystem(); Component.call(this); } - - - -// E X P O R T - -module.exports = exports = Ecosystem; diff --git a/app/views/partials/ecosystem/module-applications.js b/app/components/ecosystem/module-applications.js similarity index 100% rename from app/views/partials/ecosystem/module-applications.js rename to app/components/ecosystem/module-applications.js diff --git a/app/views/partials/ecosystem/module-lbry.js b/app/components/ecosystem/module-lbry.js similarity index 100% rename from app/views/partials/ecosystem/module-lbry.js rename to app/components/ecosystem/module-lbry.js diff --git a/app/views/partials/ecosystem/module-lbrycrd.js b/app/components/ecosystem/module-lbrycrd.js similarity index 100% rename from app/views/partials/ecosystem/module-lbrycrd.js rename to app/components/ecosystem/module-lbrycrd.js diff --git a/app/views/partials/ecosystem/submodule-chainquery.js b/app/components/ecosystem/submodule-chainquery.js similarity index 100% rename from app/views/partials/ecosystem/submodule-chainquery.js rename to app/components/ecosystem/submodule-chainquery.js diff --git a/app/views/partials/ecosystem/submodule-lighthouse.js b/app/components/ecosystem/submodule-lighthouse.js similarity index 100% rename from app/views/partials/ecosystem/submodule-lighthouse.js rename to app/components/ecosystem/submodule-lighthouse.js diff --git a/app/views/partials/ecosystem/submodule-reflector.js b/app/components/ecosystem/submodule-reflector.js similarity index 100% rename from app/views/partials/ecosystem/submodule-reflector.js rename to app/components/ecosystem/submodule-reflector.js diff --git a/app/views/partials/ecosystem/submodule-wallet.js b/app/components/ecosystem/submodule-wallet.js similarity index 100% rename from app/views/partials/ecosystem/submodule-wallet.js rename to app/components/ecosystem/submodule-wallet.js diff --git a/app/views/partials/feature-links.js b/app/components/feature-links.js similarity index 97% rename from app/views/partials/feature-links.js rename to app/components/feature-links.js index 4095253..b406f4a 100644 --- a/app/views/partials/feature-links.js +++ b/app/components/feature-links.js @@ -4,7 +4,7 @@ // P A C K A G E -const Component = require("choo/component"); +import Component from "choo/component"; // V A R I A B L E @@ -65,6 +65,14 @@ FeaturedLinks.prototype.createElement = () => { `; }; + + +// E X P O R T + +module.exports = exports = FeaturedLinks; + + + // H E L P E R S function FeaturedLinks() { @@ -85,9 +93,3 @@ function returnLinkTemplate(url, title, image) { `; } - - - -// E X P O R T - -module.exports = exports = FeaturedLinks; diff --git a/app/views/partials/glossary-toc.js b/app/components/glossary-toc.js similarity index 63% rename from app/views/partials/glossary-toc.js rename to app/components/glossary-toc.js index 18b4346..e49fde5 100644 --- a/app/views/partials/glossary-toc.js +++ b/app/components/glossary-toc.js @@ -4,8 +4,10 @@ // V A R I A B L E S -const headerRegex = /###.+/g; +const idRegex = /(".*")/g; const numberRegex = /^[0-9]/g; +const renderedHeaderRegex = /()/g; +const titleRegex = /(>.*<)/g; @@ -13,11 +15,16 @@ const numberRegex = /^[0-9]/g; module.exports = exports = (state, emit, markdown) => { const collectionOfTocElements = []; - const tocElements = markdown.match(headerRegex); + const tocElements = markdown.match(renderedHeaderRegex); - for (const item of tocElements) collectionOfTocElements.push(` -
  • ${item.replace(/### /g, "")}
  • - `); + for (const item of tocElements) { + const id = item.match(idRegex)[0].replace(/"/g, ""); + const title = item.match(titleRegex)[0].replace(">", "").replace("<", ""); + + collectionOfTocElements.push(` +
  • ${title}
  • + `); + } return `