mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-04 11:55:50 +00:00
Fix blog post template
This commit is contained in:
@@ -1,20 +1,30 @@
|
||||
import React from 'react';
|
||||
import { Markdown as MarkdownWrapper } from '@redocly/theme/components/Markdown/Markdown';
|
||||
import { Markdown } from '@redocly/theme/components/Markdown/Markdown';
|
||||
import { DocumentationLayout } from '@redocly/theme/layouts/DocumentationLayout';
|
||||
import { TableOfContent } from '@redocly/theme/components/TableOfContent/TableOfContent';
|
||||
import styled from 'styled-components';
|
||||
|
||||
const LayoutWrapper = styled.div`
|
||||
display: flex;
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
`;
|
||||
|
||||
function PostInfo(data) {
|
||||
return (
|
||||
<div className="blog-post-info">
|
||||
Publication date: {data.date}
|
||||
Publication date: {data.data.date}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default function BlogPost({ pageProps, children }) {
|
||||
return (
|
||||
<DocumentationLayout tableOfContent={null} feedback={null}>
|
||||
<PostInfo data={pageProps.frontmatter} />
|
||||
<MarkdownWrapper>{children}</MarkdownWrapper>
|
||||
</DocumentationLayout>
|
||||
<LayoutWrapper>
|
||||
<DocumentationLayout {...pageProps}>
|
||||
<PostInfo data={pageProps.frontmatter} />
|
||||
<Markdown>{children}</Markdown>
|
||||
</DocumentationLayout>
|
||||
<TableOfContent {...pageProps} />
|
||||
</LayoutWrapper>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user