1
0
mirror of https://github.com/immich-app/immich.git synced 2024-12-24 10:37:28 +02:00

fix(web): layout spacing when zooming (#2452)

This commit is contained in:
Michel Heusschen 2023-05-17 17:44:15 +02:00 committed by GitHub
parent 308c63df16
commit 115a47d4c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 7 deletions

View File

@ -22,7 +22,7 @@
</header>
<main
class="grid md:grid-cols-[250px_auto] grid-cols-[70px_auto] relative pt-[4.25rem] 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 bg-immich-bg dark:bg-immich-dark-bg immich-scrollbar"
>
<SideBar />
<slot name="content">

View File

@ -40,9 +40,9 @@
};
</script>
<section id="dashboard-navbar" class="fixed h-[4.25rem] w-screen z-[900] text-sm">
<section id="dashboard-navbar" class="fixed h-[var(--navbar-height)] w-screen z-[900] text-sm">
<div
class="grid md:grid-cols-[250px_auto] grid-cols-[70px_auto] border-b dark:border-b-immich-dark-gray items-center py-2 bg-immich-bg dark:bg-immich-dark-bg"
class="grid h-full md:grid-cols-[theme(spacing.64)_auto] grid-cols-[theme(spacing.18)_auto] border-b dark:border-b-immich-dark-gray items-center py-2 bg-immich-bg dark:bg-immich-dark-bg"
>
<a
data-sveltekit-preload-data="hover"
@ -76,7 +76,7 @@
<div in:fly={{ x: 50, duration: 250 }}>
<LinkButton on:click={() => dispatch('uploadClicked')}>
<div class="flex gap-2">
<TrayArrowUp size="20" />
<TrayArrowUp size="1.5em" />
<span class="md:block hidden">Upload</span>
</div>
</LinkButton>
@ -158,3 +158,10 @@
</div>
</div>
</section>
<style>
:root {
/* Used by layouts to ensure proper spacing between navbar and content */
--navbar-height: calc(theme(spacing.18) + 4px);
}
</style>

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-[72px] 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"
>
<slot />
</section>

View File

@ -21,7 +21,7 @@
});
</script>
<main class="grid h-screen pt-[4.25rem] bg-immich-bg dark:bg-immich-dark-bg">
<main class="grid h-screen pt-18 bg-immich-bg dark:bg-immich-dark-bg">
{#if $isMultiSelectStoreState}
<AssetSelectControlBar
assets={$selectedAssets}

View File

@ -41,7 +41,9 @@
<NavigationBar user={data.user} />
<main>
<section class="grid md:grid-cols-[250px_auto] grid-cols-[70px_auto] pt-[72px] h-screen">
<section
class="grid md:grid-cols-[theme(spacing.64)_auto] grid-cols-[theme(spacing.18)_auto] pt-[var(--navbar-height)] h-screen"
>
<SideBarSection>
<SideBarButton
title="Users"

View File

@ -1,3 +1,4 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['./src/**/*.{html,js,svelte,ts}'],
darkMode: 'class',
@ -18,6 +19,9 @@ module.exports = {
},
fontFamily: {
'immich-title': ['Snowburst One', 'cursive']
},
spacing: {
18: '4.5rem'
}
}
},