mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-04 03:27:09 -05:00 
			
		
		
		
	fix(web): layout spacing when zooming (#2452)
This commit is contained in:
		
							parent
							
								
									308c63df16
								
							
						
					
					
						commit
						115a47d4c6
					
				@ -22,7 +22,7 @@
 | 
				
			|||||||
</header>
 | 
					</header>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<main
 | 
					<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 />
 | 
						<SideBar />
 | 
				
			||||||
	<slot name="content">
 | 
						<slot name="content">
 | 
				
			||||||
 | 
				
			|||||||
@ -40,9 +40,9 @@
 | 
				
			|||||||
	};
 | 
						};
 | 
				
			||||||
</script>
 | 
					</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
 | 
						<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
 | 
							<a
 | 
				
			||||||
			data-sveltekit-preload-data="hover"
 | 
								data-sveltekit-preload-data="hover"
 | 
				
			||||||
@ -76,7 +76,7 @@
 | 
				
			|||||||
					<div in:fly={{ x: 50, duration: 250 }}>
 | 
										<div in:fly={{ x: 50, duration: 250 }}>
 | 
				
			||||||
						<LinkButton on:click={() => dispatch('uploadClicked')}>
 | 
											<LinkButton on:click={() => dispatch('uploadClicked')}>
 | 
				
			||||||
							<div class="flex gap-2">
 | 
												<div class="flex gap-2">
 | 
				
			||||||
								<TrayArrowUp size="20" />
 | 
													<TrayArrowUp size="1.5em" />
 | 
				
			||||||
								<span class="md:block hidden">Upload</span>
 | 
													<span class="md:block hidden">Upload</span>
 | 
				
			||||||
							</div>
 | 
												</div>
 | 
				
			||||||
						</LinkButton>
 | 
											</LinkButton>
 | 
				
			||||||
@ -158,3 +158,10 @@
 | 
				
			|||||||
		</div>
 | 
							</div>
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
</section>
 | 
					</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
 | 
					<section
 | 
				
			||||||
	id="sidebar"
 | 
						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 />
 | 
						<slot />
 | 
				
			||||||
</section>
 | 
					</section>
 | 
				
			||||||
 | 
				
			|||||||
@ -21,7 +21,7 @@
 | 
				
			|||||||
	});
 | 
						});
 | 
				
			||||||
</script>
 | 
					</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}
 | 
						{#if $isMultiSelectStoreState}
 | 
				
			||||||
		<AssetSelectControlBar
 | 
							<AssetSelectControlBar
 | 
				
			||||||
			assets={$selectedAssets}
 | 
								assets={$selectedAssets}
 | 
				
			||||||
 | 
				
			|||||||
@ -41,7 +41,9 @@
 | 
				
			|||||||
<NavigationBar user={data.user} />
 | 
					<NavigationBar user={data.user} />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<main>
 | 
					<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>
 | 
							<SideBarSection>
 | 
				
			||||||
			<SideBarButton
 | 
								<SideBarButton
 | 
				
			||||||
				title="Users"
 | 
									title="Users"
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,4 @@
 | 
				
			|||||||
 | 
					/** @type {import('tailwindcss').Config} */
 | 
				
			||||||
module.exports = {
 | 
					module.exports = {
 | 
				
			||||||
	content: ['./src/**/*.{html,js,svelte,ts}'],
 | 
						content: ['./src/**/*.{html,js,svelte,ts}'],
 | 
				
			||||||
	darkMode: 'class',
 | 
						darkMode: 'class',
 | 
				
			||||||
@ -18,6 +19,9 @@ module.exports = {
 | 
				
			|||||||
			},
 | 
								},
 | 
				
			||||||
			fontFamily: {
 | 
								fontFamily: {
 | 
				
			||||||
				'immich-title': ['Snowburst One', 'cursive']
 | 
									'immich-title': ['Snowburst One', 'cursive']
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								spacing: {
 | 
				
			||||||
 | 
									18: '4.5rem'
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user