Skip to content

Commit

Permalink
feat(layout): set max inline size for the whole content
Browse files Browse the repository at this point in the history
  • Loading branch information
jmiguelv committed Nov 4, 2024
1 parent 47a9e62 commit c1276df
Showing 1 changed file with 24 additions and 14 deletions.
38 changes: 24 additions & 14 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,36 @@
<Head {metadata} />
</svelte:head>

<div class="layout surface-1">
<Header />

<main>
<PageTransition url={data.url}>
<Breadcrumbs />
<div class="body">
<slot />
</div>
</PageTransition>
</main>

<Footer />
<div class="layout-container">
<div class="layout surface-1">
<Header />

<main>
<PageTransition url={data.url}>
<Breadcrumbs />
<div class="body">
<slot />
</div>
</PageTransition>
</main>

<Footer />
</div>
</div>

<style>
.layout-container {
background: var(--surface-4);
display: flex;
justify-content: center;
min-height: 100%;
}
.layout {
display: grid;
grid-template-rows: auto 1fr auto;
height: 100%;
max-inline-size: var(--size-xl);
width: 100%;
}
main {
Expand Down

0 comments on commit c1276df

Please sign in to comment.