Files
myeasycms-v2/apps/web/app/(marketing)/blog/page.tsx
giancarlo e7f2660032 Update UI design across multiple pages and components
Several changes have been made to improve the user interface and enhance the user experience. This includes redesigning Auth buttons, modifying website layouts and routing, tweaking heading and text sizes for clarity, and revamping the marketing, documentation, and pricing pages. These changes collectively contribute to a cleaner, more concise and navigable interface.
2024-04-09 13:35:12 +08:00

45 lines
1.2 KiB
TypeScript

import { createCmsClient } from '@kit/cms';
import { GridList } from '~/(marketing)/_components/grid-list';
import { SitePageHeader } from '~/(marketing)/_components/site-page-header';
import { PostPreview } from '~/(marketing)/blog/_components/post-preview';
import { createI18nServerInstance } from '~/lib/i18n/i18n.server';
import { withI18n } from '~/lib/i18n/with-i18n';
export const generateMetadata = async () => {
const { t } = await createI18nServerInstance();
return {
title: t('marketing:blog'),
description: t('marketing:blogSubtitle'),
};
};
async function BlogPage() {
const { t } = await createI18nServerInstance();
const cms = await createCmsClient();
const posts = await cms.getContentItems({
categories: ['blog'],
});
return (
<div className={'flex flex-col space-y-12'}>
<SitePageHeader
title={t('marketing:blog')}
subtitle={t('marketing:blogSubtitle')}
/>
<div className={'container mx-auto'}>
<GridList>
{posts.map((post, idx) => {
return <PostPreview key={idx} post={post} />;
})}
</GridList>
</div>
</div>
);
}
export default withI18n(BlogPage);