Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions web-admin/src/components/nav/LeftNav.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}[];
</script>

<div class="nav-items" style:min-width={minWidth}>
<div class="nav-sidebar" style:min-width={minWidth}>
<!-- if hasPermission is not provided, it will be undefined -->
{#each navItems as { label, route, hasPermission = true } (route)}
{#if hasPermission}
Expand All @@ -26,7 +26,15 @@
</div>

<style lang="postcss">
.nav-items {
@apply flex flex-col gap-y-2;
.nav-sidebar {
@apply flex flex-col gap-y-2 shrink-0;
}

@media (min-width: 768px) {
.nav-sidebar {
position: sticky;
top: 0;
align-self: flex-start;
}
}
</style>
14 changes: 10 additions & 4 deletions web-admin/src/routes/[organization]/-/settings/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,27 @@
</script>

<ContentContainer title="Organization settings" maxWidth={1100}>
<div class="container flex-col md:flex-row">
<div class="settings-layout">
<LeftNav
{basePage}
baseRoute="/[organization]/-/settings"
{navItems}
minWidth="180px"
/>
<div class="flex flex-col gap-y-6 w-full">
<div class="flex flex-col gap-y-6 w-full min-w-0">
<slot />
</div>
</div>
</ContentContainer>

<style lang="postcss">
.container {
@apply flex pt-6 gap-6 max-w-full overflow-hidden;
.settings-layout {
@apply flex flex-col pt-6 gap-6 max-w-full;
}

@media (min-width: 768px) {
.settings-layout {
@apply flex-row items-start;
}
}
</style>
16 changes: 12 additions & 4 deletions web-admin/src/routes/[organization]/-/users/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,22 @@
</script>

<ContentContainer title="Manage users" maxWidth={1100}>
<div class="container flex-col md:flex-row">
<div class="settings-layout">
<LeftNav {basePage} baseRoute="/[organization]/-/users" {navItems} />
<slot />
<div class="flex flex-col gap-y-6 w-full min-w-0">
<slot />
</div>
</div>
</ContentContainer>

<style lang="postcss">
.container {
@apply flex pt-6 gap-6 max-w-full overflow-hidden;
.settings-layout {
@apply flex flex-col pt-6 gap-6 max-w-full;
}

@media (min-width: 768px) {
.settings-layout {
@apply flex-row items-start;
}
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,27 @@
</script>

<ContentContainer title="Project settings" maxWidth={1100}>
<div class="container flex-col md:flex-row">
<div class="settings-layout">
<LeftNav
{basePage}
baseRoute="/[organization]/[project]/-/settings"
{navItems}
minWidth="180px"
/>
<slot />
<div class="flex flex-col gap-y-6 w-full min-w-0">
<slot />
</div>
</div>
</ContentContainer>

<style lang="postcss">
.container {
@apply flex pt-6 gap-6 max-w-full overflow-hidden;
.settings-layout {
@apply flex flex-col pt-6 gap-6 max-w-full;
}

@media (min-width: 768px) {
.settings-layout {
@apply flex-row items-start;
}
}
</style>
Loading