generated from avior/template-web-astro
feat: Add first version of website
Signed-off-by: Avior <github@avior.me>
This commit is contained in:
47
src/layouts/Article.astro
Normal file
47
src/layouts/Article.astro
Normal file
@@ -0,0 +1,47 @@
|
||||
---
|
||||
import Layout, { type Props as BaseProps } from './Layout.astro'
|
||||
import Header from 'components/global/Header.astro'
|
||||
import Footer from 'components/global/Footer.astro'
|
||||
import ButtonLink from 'components/global/ButtonLink.astro'
|
||||
import Breadcrumb from 'components/global/Breadcrumb.astro'
|
||||
|
||||
export interface Props extends BaseProps {
|
||||
link?: {
|
||||
href: string
|
||||
rel?: string
|
||||
text?: string
|
||||
target?: string
|
||||
}
|
||||
breadcrumb: Array<{
|
||||
text: string
|
||||
href?: string
|
||||
}>
|
||||
}
|
||||
---
|
||||
|
||||
<Layout {...Astro.props}>
|
||||
<div class="container">
|
||||
<Breadcrumb items={Astro.props.breadcrumb} />
|
||||
<article class="prose prose-img:object-contain prose-img:max-h-96 prose-img:rounded-lg prose-img:mx-auto lg:prose-lg 2xl:prose-2xl xl:prose-xl dark:prose-invert mx-auto max-w-none prose-p:text-justify">
|
||||
<slot />
|
||||
</article>
|
||||
{Astro.props.link && (
|
||||
<div class="flex justify-center mt-6">
|
||||
<ButtonLink
|
||||
target="_blank"
|
||||
href={Astro.props.link.href}
|
||||
rel={Astro.props.link.rel ?? 'nofollow noopener'}
|
||||
>
|
||||
{Astro.props.link.text ?? 'Visiter le site'}
|
||||
</ButtonLink>
|
||||
</div>
|
||||
)}
|
||||
{Astro.props.disabled && (
|
||||
<div class="flex justify-center mt-6">
|
||||
<Button>
|
||||
{Astro.props.disabled}
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</Layout>
|
@@ -1,11 +1,12 @@
|
||||
---
|
||||
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'
|
||||
import '@fontsource-variable/lexend'
|
||||
|
||||
export interface Props {
|
||||
title: string
|
||||
}
|
||||
|
||||
const { title } = Astro.props;
|
||||
---
|
||||
@@ -17,12 +18,12 @@ const { title } = Astro.props;
|
||||
<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>
|
||||
<script defer data-domain="avior.me" src="/js/script.js"></script>
|
||||
|
||||
<Favicon svg={IconSVG} png={IconPNG} icoPath="/favicon.ico" />
|
||||
<title>{title}</title>
|
||||
</head>
|
||||
<body class="bg-gray-50">
|
||||
<body class="bg-blue-50 dark:bg-slate-950 text-slate-950 dark:text-blue-50">
|
||||
<slot />
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -1,11 +1,15 @@
|
||||
---
|
||||
import Footer from 'components/global/Footer.astro'
|
||||
import Base, { type Props as BaseProps } from './Base.astro'
|
||||
import Header from 'components/global/Header.astro'
|
||||
|
||||
export interface Props extends BaseProps {}
|
||||
---
|
||||
|
||||
<Base {...Astro.props}>
|
||||
<main class="container">
|
||||
<Header />
|
||||
<div class="pt-24">
|
||||
<slot />
|
||||
</main>
|
||||
</div>
|
||||
<Footer />
|
||||
</Base>
|
||||
|
13
src/layouts/LayoutWithHero.astro
Normal file
13
src/layouts/LayoutWithHero.astro
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
import Footer from 'components/global/Footer.astro'
|
||||
import Base, { type Props as BaseProps } from './Base.astro'
|
||||
import Header from 'components/global/Header.astro'
|
||||
|
||||
export interface Props extends BaseProps {}
|
||||
---
|
||||
|
||||
<Base {...Astro.props}>
|
||||
<Header />
|
||||
<slot />
|
||||
<Footer />
|
||||
</Base>
|
Reference in New Issue
Block a user