mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
docs: improve resouce page style (#38624)
This commit is contained in:
parent
e486979b30
commit
1cdb4503a2
@ -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>
|
||||
|
@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user