feat(web): improve page header + scrolling (#2453)

* fix: line to edge of screen

* refactor: user layout page
This commit is contained in:
Jason Rasmussen 2023-05-17 15:45:16 -04:00 committed by GitHub
parent 35c4887e4a
commit 4a0052026f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 129 additions and 132 deletions

View file

@ -22,24 +22,25 @@
</header>
<main
class="grid md:grid-cols-[theme(spacing.64)_auto] grid-cols-[theme(spacing.18)_auto] relative pt-[var(--navbar-height)] h-screen bg-immich-bg dark:bg-immich-dark-bg immich-scrollbar"
class="grid md:grid-cols-[theme(spacing.64)_auto] grid-cols-[theme(spacing.18)_auto] relative pt-[var(--navbar-height)] h-screen overflow-hidden bg-immich-bg dark:bg-immich-dark-bg"
>
<SideBar />
<slot name="content">
<section class="overflow-y-auto my-8 mx-4 bg-immich-bg dark:bg-immich-dark-bg">
{#if title}
<div class="flex justify-between place-items-center dark:text-immich-dark-fg px-4 h-10">
{#if title}
<section class="relative">
<div
class="absolute border-b dark:border-immich-dark-gray flex justify-between place-items-center dark:text-immich-dark-fg w-full p-4 h-16"
>
<p class="font-medium">{title}</p>
<slot name="buttons" />
</div>
<div class="my-4">
<hr class="dark:border-immich-dark-gray" />
<div
class="absolute overflow-y-auto top-16 h-[calc(100%-theme(spacing.16))] w-full immich-scrollbar p-4 pb-8"
>
<slot />
</div>
{/if}
<slot />
</section>
</section>
{/if}
</slot>
</main>

View file

@ -3,7 +3,7 @@
<section
id="sidebar"
class="group flex flex-col gap-1 pt-8 bg-immich-bg dark:bg-immich-dark-bg transition-all duration-200 z-10 w-18 md:w-64 hover:sm:pr-6 md:pr-6 hover:sm:w-64 hover:sm:shadow-2xl hover:md:shadow-none hover:md:border-none hover:sm:border-r hover:sm:dark:border-r-immich-dark-gray"
class="group flex flex-col gap-1 pt-8 bg-immich-bg dark:bg-immich-dark-bg transition-all duration-200 z-10 w-18 md:w-64 hover:sm:pr-6 md:pr-6 hover:sm:w-64 hover:sm:shadow-2xl hover:md:shadow-none hover:md:border-none hover:sm:border-r hover:sm:dark:border-r-immich-dark-gray relative overflow-y-auto immich-scrollbar"
>
<slot />
</section>