Fix embed examples

pull/8432/head
Puru Vijay 3 years ago
parent fd407a78c8
commit 810a4abdfd

@ -10,9 +10,6 @@ export function get_examples_data(base = BASE) {
const examples = []; const examples = [];
for (const subdir of fs.readdirSync(base)) { for (const subdir of fs.readdirSync(base)) {
// Exclude embeds
if (subdir.endsWith('99-embeds')) continue;
const section = { const section = {
title: '', // Initialise with empty title: '', // Initialise with empty
slug: subdir.split('-').slice(1).join('-'), slug: subdir.split('-').slice(1).join('-'),

@ -15,6 +15,7 @@
</svelte:head> </svelte:head>
<Shell nav_visible={$page.url.pathname !== '/repl/embed'}> <Shell nav_visible={$page.url.pathname !== '/repl/embed'}>
{#if $page.url.pathname !== '/repl/embed'}
<Nav logo="/svelte-logo.svg"> <Nav logo="/svelte-logo.svg">
<svelte:fragment slot="nav-center"> <svelte:fragment slot="nav-center">
{#if $page.url.pathname !== '/search'} {#if $page.url.pathname !== '/search'}
@ -45,6 +46,7 @@
</NavItem> </NavItem>
</svelte:fragment> </svelte:fragment>
</Nav> </Nav>
{/if}
<slot /> <slot />
</Shell> </Shell>

@ -14,6 +14,7 @@
<ul class="examples-toc"> <ul class="examples-toc">
{#each sections as section} {#each sections as section}
{#if section.title !== undefined}
<li> <li>
<span class="section-title">{section.title}</span> <span class="section-title">{section.title}</span>
@ -39,6 +40,7 @@
</div> </div>
{/each} {/each}
</li> </li>
{/if}
{/each} {/each}
</ul> </ul>

Loading…
Cancel
Save