Code Cleanup™
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
---
|
||||
import { getCollection } from "astro:content";
|
||||
import {getCollection} from "astro:content";
|
||||
import NavbarLayout from "../../layouts/NavbarLayout.astro";
|
||||
import {astroI18n, createGetStaticPaths} from "astro-i18n";
|
||||
|
||||
@@ -7,24 +7,24 @@ export const getStaticPaths = createGetStaticPaths(async () => {
|
||||
let posts = await getCollection("help");
|
||||
|
||||
return posts.filter(value => value.id.split("/")[0] === astroI18n.locale).map((page) => ({
|
||||
props: { page }, params: { slug: page.slug }
|
||||
}) );
|
||||
props: {page}, params: {slug: page.slug},
|
||||
}));
|
||||
});
|
||||
|
||||
const { page } = Astro.props;
|
||||
const { Content } = await page.render();
|
||||
const {page} = Astro.props;
|
||||
const {Content} = await page.render();
|
||||
---
|
||||
|
||||
<NavbarLayout title={page.data.title}>
|
||||
<article>
|
||||
<h1 class="text-left">{page.data.title}</h1>
|
||||
<Content />
|
||||
<Content/>
|
||||
</article>
|
||||
</NavbarLayout>
|
||||
|
||||
<style is:global>
|
||||
article {
|
||||
>* {
|
||||
> * {
|
||||
all: revert;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,6 @@ let posts = await getCollection("help", entry => entry.id.split("/")[0] === astr
|
||||
<style>
|
||||
div {
|
||||
@apply mx-auto bg-gray-100 px-4 py-8 rounded-b-md shadow-md pt-40 sm:pt-28 md:pt-14
|
||||
dark:text-white dark:bg-neutral-900;
|
||||
dark:text-white dark:bg-neutral-900;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user