{#if isSearching}
{i18n(I18nKey.searchLoading)}
{:else if result.length > 0} {#each result.slice(0, 5) as item} handleResultClick(e, item.url)} class="transition first-of-type:mt-2 lg:first-of-type:mt-0 group block rounded-xl text-lg px-3 py-2 hover:bg-(--btn-plain-bg-hover) active:bg-(--btn-plain-bg-active)">
{@html item.meta.title}
{#if item.excerpt.includes('')}
{i18n(I18nKey.searchSummary)}
{@html item.excerpt}
{/if} {#if item.content && item.content.includes('')}
{i18n(I18nKey.searchContent)}
{@html item.content}
{/if}
{/each} {#if result.length > 5} handleResultClick(e, getSearchUrl(keywordDesktop || keywordMobile))} class="transition first-of-type:mt-2 lg:first-of-type:mt-0 group block rounded-xl text-lg px-3 py-2 hover:bg-(--btn-plain-bg-hover) active:bg-(--btn-plain-bg-active) text-(--primary) font-bold text-center"> {i18n(I18nKey.searchViewMore).replace('{count}', (result.length - 5).toString())} {/if} {:else if result.length === 0}
{i18n(I18nKey.searchNoResults)}
{:else if keywordDesktop || keywordMobile}
{i18n(I18nKey.searchTypeSomething)}
{/if}