디렉터리 페이지에서 파일 목록도 함께 표시하도록 구현 및 파일/디렉터리 이름이 너무 긴 경우 잘라서 표시하도록 개선

This commit is contained in:
static
2025-01-05 00:57:40 +09:00
parent 9b14e833be
commit 269152f8d8
5 changed files with 73 additions and 18 deletions

View File

@@ -17,13 +17,15 @@
</script>
<div class="sticky top-0 flex items-center justify-between bg-white pt-4">
<button onclick={back} class="rounded-full p-1 active:bg-gray-100">
<button onclick={back} class="w-[2.3rem] flex-shrink-0 rounded-full p-1 active:bg-gray-100">
<IconArrowBack class="text-2xl" />
</button>
{#if title}
<p class="absolute left-1/2 -translate-x-1/2 transform text-lg font-semibold">{title}</p>
{/if}
{#if children}
{@render children?.()}
<p class="flex-grow truncate px-2 text-center text-lg font-semibold">{title}</p>
{/if}
<div class="min-w-[2.3rem] flex-shrink-0">
{#if children}
{@render children?.()}
{/if}
</div>
</div>