* feat: add changelog feature and update site navigation - Introduced a new Changelog page with pagination and detailed entry views. - Added components for displaying changelog entries, pagination, and entry details. - Updated site navigation to include a link to the new Changelog page. - Enhanced localization for changelog-related texts in marketing.json. * refactor: enhance Changelog page layout and entry display - Increased the number of changelog entries displayed per page from 2 to 20 for better visibility. - Improved the layout of the Changelog page by adjusting the container styles and removing unnecessary divs. - Updated the ChangelogEntry component to enhance the visual presentation of entries, including a new date badge with an icon. - Refined the CSS styles for Markdoc headings to improve typography and spacing. * refactor: enhance Changelog page functionality and layout - Increased the number of changelog entries displayed per page from 20 to 50 for improved user experience. - Updated ChangelogEntry component to make the highlight prop optional and refined the layout for better visual clarity. - Adjusted styles in ChangelogHeader and ChangelogPagination components for a more cohesive design. - Removed unnecessary order fields from changelog markdown files to streamline content management. * feat: enhance Changelog entry navigation and data loading - Refactored ChangelogEntry page to load previous and next entries for improved navigation. - Introduced ChangelogNavigation component to facilitate navigation between changelog entries. - Updated ChangelogDetail component to display navigation links and entry details. - Enhanced data fetching logic to retrieve all changelog entries alongside the current entry. - Added localization keys for navigation text in marketing.json. * Update package dependencies and enhance documentation layout - Upgraded various packages including @turbo/gen and turbo to version 2.6.0, and react-hook-form to version 7.66.0. - Updated lucide-react to version 0.552.0 across multiple packages. - Refactored documentation layout components for improved styling and structure. - Removed deprecated loading components and adjusted navigation elements for better user experience. - Added placeholder notes in changelog entries for clarity.
46 lines
1.1 KiB
TypeScript
46 lines
1.1 KiB
TypeScript
import { SidebarProvider } from '@kit/ui/shadcn-sidebar';
|
|
|
|
import { createI18nServerInstance } from '~/lib/i18n/i18n.server';
|
|
|
|
// local imports
|
|
import { DocsNavigation } from './_components/docs-navigation';
|
|
import { getDocs } from './_lib/server/docs.loader';
|
|
import { buildDocumentationTree } from './_lib/utils';
|
|
|
|
async function DocsLayout({ children }: React.PropsWithChildren) {
|
|
const { resolvedLanguage } = await createI18nServerInstance();
|
|
const docs = await getDocs(resolvedLanguage);
|
|
const tree = buildDocumentationTree(docs);
|
|
|
|
return (
|
|
<div className={'container h-[calc(100vh-56px)] overflow-y-hidden'}>
|
|
<SidebarProvider
|
|
className="lg:gap-x-6"
|
|
style={{ '--sidebar-width': '17em' } as React.CSSProperties}
|
|
>
|
|
<HideFooterStyles />
|
|
|
|
<DocsNavigation pages={tree} />
|
|
|
|
{children}
|
|
</SidebarProvider>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
function HideFooterStyles() {
|
|
return (
|
|
<style
|
|
dangerouslySetInnerHTML={{
|
|
__html: `
|
|
.site-footer {
|
|
display: none;
|
|
}
|
|
`,
|
|
}}
|
|
/>
|
|
);
|
|
}
|
|
|
|
export default DocsLayout;
|