docs: improve resouce page style (#38624)

This commit is contained in:
afc163 2022-11-17 18:33:44 +08:00 committed by GitHub
parent e486979b30
commit 1cdb4503a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 22 deletions

View File

@ -11,7 +11,7 @@ const Loading: FC = () => {
pathname.startsWith('/changelog')
) {
return (
<Space direction="vertical" style={{ width: '100%' }} size={40}>
<Space direction="vertical" style={{ width: '100%', marginTop: 24 }} size={40}>
<Skeleton title={false} active paragraph={{ rows: 3 }} />
<Skeleton active paragraph={{ rows: 3 }} />
</Space>

View File

@ -1,11 +1,10 @@
import React, { FC, PropsWithChildren } from 'react';
import { useRouteMeta, FormattedMessage } from 'dumi';
import Footer from 'dumi/theme/slots/Footer';
import AffixTabs from './AffixTabs';
import { useRouteMeta } from 'dumi';
import { Layout, Typography, ConfigProvider } from 'antd';
import { css } from '@emotion/react';
import AffixTabs from './AffixTabs';
import EditButton from '../../common/EditButton';
import { FormattedMessage } from 'dumi';
import { Layout, Typography } from 'antd';
import useSiteToken from '../../../hooks/useSiteToken';
import CommonHelmet from '../../common/CommonHelmet';
@ -115,24 +114,26 @@ const ResourceLayout: FC<ResourceLayoutProps> = ({ children }) => {
const meta = useRouteMeta();
return (
<Layout>
<CommonHelmet />
<div id="resources-page" css={styles.resourcePage}>
<AffixTabs />
<div css={styles.banner}>
<Typography.Title style={{ fontSize: 30 }}>
{meta.frontmatter.title}
<EditButton
title={<FormattedMessage id="app.content.edit-page" />}
filename={meta.frontmatter.filename}
/>
</Typography.Title>
<section>{meta.frontmatter.description}</section>
<ConfigProvider theme={{ token: { colorBgLayout: '#fff' } }}>
<Layout>
<CommonHelmet />
<div id="resources-page" css={styles.resourcePage}>
<AffixTabs />
<div css={styles.banner}>
<Typography.Title style={{ fontSize: 30 }}>
{meta.frontmatter.title}
<EditButton
title={<FormattedMessage id="app.content.edit-page" />}
filename={meta.frontmatter.filename}
/>
</Typography.Title>
<section>{meta.frontmatter.description}</section>
</div>
<div css={styles.resourceContent}>{children}</div>
<Footer />
</div>
<div css={styles.resourceContent}>{children}</div>
<Footer />
</div>
</Layout>
</Layout>
</ConfigProvider>
);
};