›
use #tag to filter by tag
{#each categories as cat} {@const catNotes = filteredByCategory(cat)} {#if catNotes.length > 0}
/
{cat}
{catNotes.length} note{catNotes.length !== 1 ? "s" : ""}
{#each catNotes as n}
{n.title}
{#if n.description}
{n.description}
{/if}
{#if n.tags.length > 0}
{#each n.tags as tag}
{tag}
{/each}
{/if}
{/each}
{/if} {/each}
{#if visibleCount === 0}
no results.
{/if}
{visibleCount} note{visibleCount !== 1 ? "s" : ""} total