Signed-off-by: Florian BOUILLON <f.bouillon@aptatio.com>
This commit is contained in:
25
src/layouts/Base.astro
Normal file
25
src/layouts/Base.astro
Normal file
@ -0,0 +1,25 @@
|
||||
---
|
||||
export interface Props {
|
||||
title: string
|
||||
}
|
||||
|
||||
import Favicon from '../components/Favicon/Favicon.astro'
|
||||
import IconSVG from '../assets/layouts/Base/favicon.svg'
|
||||
import IconPNG from '../assets/layouts/Base/favicon.png'
|
||||
|
||||
const { title } = Astro.props;
|
||||
---
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="description" content="Astro description">
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<Favicon svg={IconSVG} png={IconPNG} icoPath="/favicon.ico" />
|
||||
<title>{title}</title>
|
||||
</head>
|
||||
<body class="bg-gray-50">
|
||||
<slot />
|
||||
</body>
|
||||
</html>
|
@ -1,37 +1,11 @@
|
||||
---
|
||||
import { WifiOff } from 'lucide-astro'
|
||||
export interface Props {
|
||||
title: string;
|
||||
}
|
||||
import Base, { type Props as BaseProps } from './Base.astro'
|
||||
|
||||
const { title } = Astro.props;
|
||||
export interface Props extends BaseProps {}
|
||||
---
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="description" content="Astro description">
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<meta name="generator" content={Astro.generator} />
|
||||
<title>{title}</title>
|
||||
</head>
|
||||
<body class="bg-gray-50">
|
||||
|
||||
<aside class="fixed top-0 left-0 z-40 w-64 p-4 h-screen bg-white border-r-2 border-gray-100">
|
||||
<div class="mb-2 flex">
|
||||
<img src="/logo.svg" class="w-1/2" alt="FI3D Logo">
|
||||
<WifiOff class='pokemon' />
|
||||
</div>
|
||||
<ul class="space-y-2 font-medium">
|
||||
<li class="p-4 w-full bg-red-100 hover:bg-red-200 cursor-pointer text-center">Item</li>
|
||||
</ul>
|
||||
</aside>
|
||||
|
||||
<div class="p-4 sm:ml-64">
|
||||
<slot />
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<Base {...Astro.props}>
|
||||
<main class="container">
|
||||
<slot />
|
||||
</main>
|
||||
</Base>
|
||||
|
7
src/layouts/README.md
Normal file
7
src/layouts/README.md
Normal file
@ -0,0 +1,7 @@
|
||||
# Layouts
|
||||
|
||||
Application different layouts they should extends `Base.astro` if added and also pass the parameters of Base.astro to the page
|
||||
|
||||
## Base.astro
|
||||
|
||||
This is the base file for each path of the application, executed for each paths
|
Reference in New Issue
Block a user