added website to new repo

This commit is contained in:
Mik-TF
2024-06-04 08:03:43 -04:00
parent 1442281a65
commit c92f8c1bba
150 changed files with 22329 additions and 75 deletions

View File

@@ -0,0 +1,35 @@
---
import PageLayout from '~/layouts/PageLayout.astro';
import Header from '~/components/widgets/Header.astro';
import { headerData } from '~/navigation';
import type { MetaData } from '~/types';
export interface Props {
metadata?: MetaData;
}
const { metadata } = Astro.props;
---
<PageLayout metadata={metadata}>
<Fragment slot="announcement">
<slot name="announcement" />
</Fragment>
<Fragment slot="header">
<slot name="header">
<Header
links={headerData?.links[2] ? [headerData.links[2]] : undefined}
actions={[
{
text: 'Download',
href: 'https://github.com/onwidget/astrowind',
},
]}
showToggleTheme
position="right"
/>
</slot>
</Fragment>
<slot />
</PageLayout>

54
src/layouts/Layout.astro Normal file
View File

@@ -0,0 +1,54 @@
---
import '~/assets/styles/tailwind.css';
import { I18N } from 'astrowind:config';
import CommonMeta from '~/components/common/CommonMeta.astro';
import Favicons from '~/components/Favicons.astro';
import CustomStyles from '~/components/CustomStyles.astro';
import ApplyColorMode from '~/components/common/ApplyColorMode.astro';
import Metadata from '~/components/common/Metadata.astro';
import SiteVerification from '~/components/common/SiteVerification.astro';
import Analytics from '~/components/common/Analytics.astro';
import BasicScripts from '~/components/common/BasicScripts.astro';
// Comment the line below to disable View Transitions
import { ViewTransitions } from 'astro:transitions';
import type { MetaData as MetaDataType } from '~/types';
export interface Props {
metadata?: MetaDataType;
}
const { metadata = {} } = Astro.props;
const { language, textDirection } = I18N;
---
<!doctype html>
<html lang={language} dir={textDirection} class="2xl:text-[20px]">
<head>
<CommonMeta />
<Favicons />
<CustomStyles />
<ApplyColorMode />
<Metadata {...metadata} />
<SiteVerification />
<Analytics />
<!-- Comment the line below to disable View Transitions -->
<ViewTransitions fallback="swap" />
</head>
<body class="antialiased text-default bg-page tracking-tight">
<slot />
<BasicScripts />
<style is:global>
img {
content-visibility: auto;
}
</style>
</body>
</html>

View File

@@ -0,0 +1,28 @@
---
import Layout from '~/layouts/PageLayout.astro';
import type { MetaData } from '~/types';
export interface Props {
frontmatter: {
title?: string;
};
}
const { frontmatter } = Astro.props;
const metadata: MetaData = {
title: frontmatter?.title,
};
---
<Layout metadata={metadata}>
<section class="px-4 py-16 sm:px-6 mx-auto lg:px-8 lg:py-20 max-w-4xl">
<h1 class="font-bold font-heading text-4xl md:text-5xl leading-tighter tracking-tighter">{frontmatter.title}</h1>
<div
class="mx-auto prose prose-lg max-w-4xl dark:prose-invert dark:prose-headings:text-slate-300 prose-md prose-headings:font-heading prose-headings:leading-tighter prose-headings:tracking-tighter prose-headings:font-bold prose-a:text-blue-600 dark:prose-a:text-blue-400 prose-img:rounded-md prose-img:shadow-lg mt-8"
>
<slot />
</div>
</section>
</Layout>

View File

@@ -0,0 +1,27 @@
---
import Layout from '~/layouts/Layout.astro';
import Header from '~/components/widgets/Header.astro';
import Footer from '~/components/widgets/Footer.astro';
import { headerData, footerData } from '~/navigation';
import type { MetaData } from '~/types';
export interface Props {
metadata?: MetaData;
}
const { metadata } = Astro.props;
---
<Layout metadata={metadata}>
<slot name="header">
<Header {...headerData} isSticky showRssFeed showToggleTheme />
</slot>
<main>
<slot />
</main>
<slot name="footer">
<Footer {...footerData} />
</slot>
</Layout>