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:
parent
308c63df16
commit
115a47d4c6
@ -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">
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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}
|
||||
|
@ -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"
|
||||
|
@ -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'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user