This commit is contained in:
ポール ウェッブ 2018-09-28 16:34:42 -05:00
parent 097bfc65c7
commit 7654917466
2 changed files with 39 additions and 18 deletions

View file

@ -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 || { };

View file

@ -19,24 +19,35 @@ 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 => {
<div class="__slate"> /*
<aside class="api__toc"> state.lbry = {
<div class="api__toc__search"> description: "This is the API page for LBRY.tech",
<input class="api__toc__search__field" id="input-search" placeholder="Search" type="search"/> "og:image": "/assets/media/images/carlsagan2.jpg",
<div class="api__toc__search__clear" id="clear-search" title="Clear search query">&times;</div> "og:image:height": 300,
<ul class="api__toc__search__results"></ul> "og:image:width": 400
</div> };
*/
<ul class="api__toc__items" id="toc" role="navigation">${raw(createApiSidebar(response).join(""))}</ul> return asyncHtml`
</aside> <div class="__slate">
<aside class="api__toc">
<div class="api__toc__search">
<input class="api__toc__search__field" id="input-search" placeholder="Search" type="search"/>
<div class="api__toc__search__clear" id="clear-search" title="Clear search query">&times;</div>
<ul class="api__toc__search__results"></ul>
</div>
<section class="api__content" id="toc-content">${raw(createApiContent(response).join(""))}</section> <ul class="api__toc__items" id="toc" role="navigation">${raw(createApiSidebar(response).join(""))}</ul>
</div> </aside>
<script src="/assets/scripts/plugins/jets.js"></script> <section class="api__content" id="toc-content">${raw(createApiContent(response).join(""))}</section>
${raw(apiScripts)} </div>
`);
<script src="/assets/scripts/plugins/jets.js"></script>
${raw(apiScripts)}
`;
});