Skip to content

Commit

Permalink
feat(app): flex-based layout
Browse files Browse the repository at this point in the history
  • Loading branch information
cor committed May 30, 2024
1 parent 137fba7 commit f624ebf
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</head>

<body data-sveltekit-prefetch data-sveltekit-preload-data="hover" data-sveltekit-preload-code="hover">
<div class="size-screen flex flex-col">%sveltekit.body%</div>
<div class="max-w-screen h-screen max-h-screen flex flex-col">%sveltekit.body%</div>
</body>

</html>
3 changes: 2 additions & 1 deletion app/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import PreloadingIndicator from "$lib/components/preloading-indicator.svelte"
import { QueryClient, MutationCache, notifyManager } from "@tanstack/svelte-query"
import { PersistQueryClientProvider } from "@tanstack/svelte-query-persist-client"
import { createSyncStoragePersister } from "@tanstack/query-sync-storage-persister"
import { cn } from "$lib/utilities/shadcn";
if (browser) notifyManager.setScheduler(window.requestAnimationFrame)
Expand Down Expand Up @@ -108,7 +109,7 @@ $: if ($navigating) console.log("Navigating to", $page.url.pathname)
<Toaster position="bottom-right" />

<Header />
<div class="flex-1"><slot /></div>
<slot />
<Footer />
<SvelteQueryDevtools
position="bottom"
Expand Down
7 changes: 4 additions & 3 deletions app/src/routes/explorer/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<script>
import { cn } from "$lib/utilities/shadcn";
</script>
<div class="flex flex-row h-full flex-1">

<main class="flex flex-row flex-1 overflow-y-hidden">
<nav class={cn("flex flex-col border-solid border-r border-red-500 w-40")}>
<a href="/explorer/blocks">blocks</a>
<a href="/explorer/connections">connections</a>
</nav>

<div class="flex-1">
<div class="flex-1 overflow-y-scroll">
<slot/>
</div>
</div>
</main>
4 changes: 2 additions & 2 deletions app/src/routes/explorer/blocks/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ $: virtualizer = createVirtualizer<HTMLDivElement, HTMLTableRowElement>({
})
</script>

<main class="mb-12 mt-10 flex size-full min-size-full flex-col items-center justify-center">
<div class="rounded-md border-2 space-y-2 h-min max-h-[600px] overflow-auto w-6xl bg-card">
<main class="p-4">
<div class="rounded-md border-2 space-y-2 h-min overflow-auto w-6xl bg-card">
<div
bind:this={virtualListElement}
class={cn('rounded-md border border-secondary border-solid')}
Expand Down
2 changes: 1 addition & 1 deletion app/src/routes/transfer/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ onMount(() => {
export let data: PageData
const { chains, assets } = data
const devBorder = 0 && "outline outline-[1px] outline-pink-200/40"
// const devBorder = 0 && "outline outline-[1px] outline-pink-200/40"
const queryParams = queryParameters(
{
Expand Down

0 comments on commit f624ebf

Please sign in to comment.