feat: update multiple category layout

This commit is contained in:
ridemountainpig 2024-01-18 01:16:56 +08:00
parent 6d5e54b602
commit d69adfe4be

View File

@ -190,22 +190,26 @@
<p class="truncate text-[15px] font-medium text-balance text-center select-all"> <p class="truncate text-[15px] font-medium text-balance text-center select-all">
{svgInfo.title} {svgInfo.title}
</p> </p>
</div> <div class="flex flex-wrap justify-center">
<div class="mb-3 flex flex-col items-center justify-center h-10">
{#if Array.isArray(svgInfo.category)} {#if Array.isArray(svgInfo.category)}
{#each svgInfo.category.sort() as c} {#each svgInfo.category.sort() as c, index}
<a <a
href={`/directory/${c.toLowerCase()}`} href={`/directory/${c.toLowerCase()}`}
class="text-sm lowercase text-neutral-500 hover:underline font-mono">{c}</a class="text-sm lowercase text-neutral-500 hover:underline font-mono">{c}</a
> >
{#if index < svgInfo.category.length - 1}
<span class="text-neutral-500">.</span>
{/if}
{/each} {/each}
{:else} {:else}
<a <a
href={`/directory/${svgInfo.category.toLowerCase()}`} href={`/directory/${svgInfo.category.toLowerCase()}`}
class="text-sm lowercase text-neutral-500 hover:underline font-mono">{svgInfo.category}</a class="text-sm lowercase text-neutral-500 hover:underline font-mono"
>{svgInfo.category}</a
> >
{/if} {/if}
</div> </div>
</div>
<!-- Actions --> <!-- Actions -->
<div class="flex items-center space-x-1"> <div class="flex items-center space-x-1">
{#if isInFigma} {#if isInFigma}