›
{#each categories as cat} {@const catNotes = notes.filter( (n) => getCategory(n) === cat && matchesSearch(n), )} {#if catNotes.length > 0 || !search} {@const isFolder = notes.some((n) => n.id.includes("/") && getCategory(n) === cat)}
toggle(cat)} class="flex items-center gap-1.5 px-2 py-1 rounded-md hover:bg-base-200/40 transition-colors duration-150 shrink-0" >
/
{#if isFolder}
{cat}
{:else}
{cat}
{/if}
{#if openCategories.includes(cat)}
{#each catNotes as note}
{currentEntry && note.id === currentEntry.id ? "▸" : "–"}
{note.data.title}
{/each}
{/if}
{/if} {/each}