<script>
  import Pages from '$lib/Pages.svelte';
  import PageRenderer from './_page.svelte';
  export let page;
  export let pages;
  export let loc;
</script>

{#if page}
  <PageRenderer {page} {pages} {loc}/>
{:else if pages}
  <style>
    .pagesin {
      font-size: 1.5em;
      margin-top: 1em;
      margin-bottom: 1em;
    }
  </style>

  <div class="pagesin">Pages in <b>{loc}</b>:</div>

  <Pages {pages}/>
{:else}
  404!
{/if}