From abf30b129542ade0b3b498bdf8d017528403c131 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Fri, 27 Nov 2026 03:23:10 -0500 Subject: [PATCH] refactor(web): Admin, Settings and Collection share one rail layout (DRY W7) The three areas each repeated the same title, left rail and content grid. SectionLayout now draws it once, with the rail and any lines under the title as snippets. Admin pages now get the content cap Settings has (max-w-[100rem]): both lay their groups out in SettingsColumns, and without it Admin's two columns stretched across a very wide screen. The Collection keeps its uncapped lists. Co-Authored-By: Claude Opus 5.5 --- web/src/lib/components/SectionLayout.svelte | 40 +++++++++++++++++++++ web/src/routes/admin/+layout.svelte | 20 ++++------- web/src/routes/collection/+layout.svelte | 25 +++++-------- web/src/routes/settings/+layout.svelte | 23 ++++-------- 4 files changed, 63 insertions(+), 45 deletions(-) create mode 100644 web/src/lib/components/SectionLayout.svelte diff --git a/web/src/lib/components/SectionLayout.svelte b/web/src/lib/components/SectionLayout.svelte new file mode 100644 index 00000000..cdda0e60 --- /dev/null +++ b/web/src/lib/components/SectionLayout.svelte @@ -0,0 +1,40 @@ + + +
+
+

{title}

+ {@render intro?.()} +
+
+
+
+ {@render rail()} +
+
+
+ {@render children?.()} +
+
+
diff --git a/web/src/routes/admin/+layout.svelte b/web/src/routes/admin/+layout.svelte index ef749932..4b11bd2f 100644 --- a/web/src/routes/admin/+layout.svelte +++ b/web/src/routes/admin/+layout.svelte @@ -1,4 +1,5 @@ -
-

Admin

-
-
-
- -
-
-
- {@render children?.()} -
-
-
+ + {#snippet rail()} + + {/snippet} + {@render children?.()} + diff --git a/web/src/routes/collection/+layout.svelte b/web/src/routes/collection/+layout.svelte index 4d15711c..67f6487f 100644 --- a/web/src/routes/collection/+layout.svelte +++ b/web/src/routes/collection/+layout.svelte @@ -1,4 +1,5 @@ -
-
-

Collection

+ + {#snippet intro()}

What in the library needs looking at: tracks people reported, songs held twice, files from doubtful sources, and the tracks waiting for a good file. @@ -33,16 +33,9 @@

Nothing needs you.

{/if} {/if} -
- -
-
-
- -
-
-
- {@render children?.()} -
-
-
+ {/snippet} + {#snippet rail()} + + {/snippet} + {@render children?.()} + diff --git a/web/src/routes/settings/+layout.svelte b/web/src/routes/settings/+layout.svelte index 62b51261..289a337f 100644 --- a/web/src/routes/settings/+layout.svelte +++ b/web/src/routes/settings/+layout.svelte @@ -1,4 +1,5 @@ -
-

Settings

-
-
-
- -
-
- -
- {@render children?.()} -
-
-
+ + {#snippet rail()} + + {/snippet} + {@render children?.()} +