generated from avior/template-web-astro
Initial commit
This commit is contained in:
28
src/layouts/Base.astro
Normal file
28
src/layouts/Base.astro
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
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" />
|
||||
<!-- Analytics -->
|
||||
<script defer data-domain="example.com" src="/js/script.js"></script>
|
||||
|
||||
<Favicon svg={IconSVG} png={IconPNG} icoPath="/favicon.ico" />
|
||||
<title>{title}</title>
|
||||
</head>
|
||||
<body class="bg-gray-50">
|
||||
<slot />
|
||||
</body>
|
||||
</html>
|
11
src/layouts/Layout.astro
Normal file
11
src/layouts/Layout.astro
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
import Base, { type Props as BaseProps } from './Base.astro'
|
||||
|
||||
export interface Props extends BaseProps {}
|
||||
---
|
||||
|
||||
<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