Skip to content

Commit

Permalink
refactor: layout
Browse files Browse the repository at this point in the history
  • Loading branch information
bpolaszek committed Apr 25, 2024
1 parent dec71b9 commit c4df887
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
18 changes: 14 additions & 4 deletions components/layout/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
<div class="flex flex-col h-full overflow-hidden">
<LayoutTopNavigation />
<div class="grow relative">
<div class="absolute inset-0 overflow-auto">
<section class="mx-auto max-w-7xl py-4 px-4 sm:px-6 lg:px-8">
<div class="absolute inset-0 flex flex-col">
<section
class="mx-auto max-w-7xl w-full py-4 px-4 sm:px-6 lg:px-8 static top-0 bg-white">
<slot name="header" :title="title" :subtitle="subtitle">
<LayoutPageHeader :title="title" :subtitle="subtitle">
<template #title-actions>
Expand All @@ -15,8 +16,16 @@
</LayoutPageHeader>
</slot>
</section>
<div class="mx-auto max-w-7xl py-4 px-4 sm:px-6 lg:px-8">
<slot />
<div class="grow relative overflow-hidden">
<div class="absolute inset-0 overflow-auto">
<section
:class="[
nowrap || 'mx-auto max-w-7xl w-full py-4 px-4 sm:px-6 lg:px-8',
'h-full',
]">
<slot />
</section>
</div>
</div>
</div>
</div>
Expand All @@ -30,6 +39,7 @@
type Props = {
title: string
subtitle?: string
nowrap?: boolean
}
defineProps<Props>()
Expand Down
14 changes: 8 additions & 6 deletions error.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
<ConfirmationDialog v-if="confirmationDialog" v-bind="confirmationDialog" />
<div
class="flex flex-col items-center justify-between h-full max-w-5xl mx-auto pt-10 pb-32">
<header class="flex items-center justify-center gap-2">
<img
class="size-16 shrink-0 grow-0 -ml-10"
src="/assets/images/logo.svg"
alt="Meiliweb" />
<span class="text-3xl font-semibold">Meiliweb</span>
<header>
<a href="/" class="flex items-center justify-center gap-2">
<img
class="size-16 shrink-0 grow-0 -ml-10"
src="/assets/images/logo.svg"
alt="Meiliweb" />
<span class="text-3xl font-semibold">Meiliweb</span>
</a>
</header>

<main>
Expand Down

0 comments on commit c4df887

Please sign in to comment.