feat: Add first version of website

Signed-off-by: Avior <github@avior.me>
This commit is contained in:
2023-10-01 02:25:21 +02:00
parent ed8dcebcb7
commit fe437165a1
49 changed files with 2220 additions and 457 deletions

47
src/layouts/Article.astro Normal file
View 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>

View File

@@ -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>

View File

@@ -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>

View 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>