Closes #157
This commit is contained in:
parent
097bfc65c7
commit
7654917466
2 changed files with 39 additions and 18 deletions
|
@ -17,9 +17,19 @@ let title = "";
|
||||||
// E X P O R T
|
// E X P O R T
|
||||||
|
|
||||||
module.exports = exports = (state, emit) => {
|
module.exports = exports = (state, emit) => {
|
||||||
if (state.route !== "/" && state.params.wildcard) title = `${state.params.wildcard.capitalize()} ∙ LBRY ∙ ${config.meta.tagline}`;
|
switch(true) {
|
||||||
else if (state.route === "api") title = `API ∙ LBRY ∙ ${config.meta.tagline}`;
|
case (state.route !== "/" && state.params.wildcard):
|
||||||
else title = `LBRY ∙ ${config.meta.tagline}`;
|
title = `${state.params.wildcard.capitalize()} ∙ LBRY ∙ ${config.meta.tagline}`;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case (state.route === "api"):
|
||||||
|
title = `API ∙ LBRY ∙ ${config.meta.tagline}`;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
title = `LBRY ∙ ${config.meta.tagline}`;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (state.title !== title) emit(state.events.DOMTITLECHANGE, title);
|
if (state.title !== title) emit(state.events.DOMTITLECHANGE, title);
|
||||||
state.page = state.page || { };
|
state.page = state.page || { };
|
||||||
|
|
|
@ -19,7 +19,17 @@ const apiScripts = "<script>" + fs.readFileSync("./app/components/client/api-scr
|
||||||
|
|
||||||
// E X P O R T
|
// E X P O R T
|
||||||
|
|
||||||
module.exports = exports = state => parseApiFile(state.params.wildcard).then(response => asyncHtml`
|
module.exports = exports = state => parseApiFile(state.params.wildcard).then(response => {
|
||||||
|
/*
|
||||||
|
state.lbry = {
|
||||||
|
description: "This is the API page for LBRY.tech",
|
||||||
|
"og:image": "/assets/media/images/carlsagan2.jpg",
|
||||||
|
"og:image:height": 300,
|
||||||
|
"og:image:width": 400
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
|
return asyncHtml`
|
||||||
<div class="__slate">
|
<div class="__slate">
|
||||||
<aside class="api__toc">
|
<aside class="api__toc">
|
||||||
<div class="api__toc__search">
|
<div class="api__toc__search">
|
||||||
|
@ -36,7 +46,8 @@ module.exports = exports = state => parseApiFile(state.params.wildcard).then(res
|
||||||
|
|
||||||
<script src="/assets/scripts/plugins/jets.js"></script>
|
<script src="/assets/scripts/plugins/jets.js"></script>
|
||||||
${raw(apiScripts)}
|
${raw(apiScripts)}
|
||||||
`);
|
`;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue