Skip to content

Commit

Permalink
fix: 【首页】样式优化
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenlingasMx committed Aug 23, 2023
1 parent ace5574 commit 5fb1c91
Show file tree
Hide file tree
Showing 5 changed files with 186 additions and 23 deletions.
108 changes: 108 additions & 0 deletions examples/website/.dumi/theme/slots/Footer/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
import { Footer } from 'dumi-theme-antd-style';

const footer = [
{
title: 'Product',
items: [
{
url: 'https://antdpro.gitee.io/antdp',
title: 'antdp 国内镜像站点 🇨🇳',
openExternal: true,
},
{
url: 'https://github.com/antdpro/create-antdp',
title: 'create-antdp 快速创建一个项目',
openExternal: true,
},
{
url: 'https://github.com/uiwjs',
title: '@uiwjs 一些 React 相关组件',
openExternal: true,
},
{
url: 'https://github.com/jaywcjlove/tsbb',
title: 'TSBB 创建一个组件?',
openExternal: true,
},
],
},
{
title: '相关资源',
items: [
{
url: 'https://umijs.org/',
title: 'UmiJS - React 应用开发框架',
openExternal: true,
},
{
url: 'https://github.com/websemantics/awesome-ant-design',
title: 'Awesome Ant Design',
openExternal: true,
},
{
url: 'https://github.com/alibaba/hooks',
title: 'ahooks-React Hooks 库',
openExternal: true,
},
{
url: 'https://kktjs.github.io/kkt-pro/#/doc/kktp',
title: 'KKTP',
openExternal: true,
},
],
},
{
title: '其它资料',
items: [
{
url: 'https://github.com/facebook/react',
title: 'React',
openExternal: true,
},
{
url: 'https://ant.design/',
title: 'Ant Design',
openExternal: true,
},
{
url: 'https://ant-design.gitee.io/',
title: 'Ant Design 国内镜像站点 🇨🇳',
openExternal: true,
},
],
},
{
title: '学习资料',
items: [
{
url: 'https://www.react.express/',
title: 'React Express',
openExternal: true,
},
{
url: 'https://jskatas.org/',
title: 'JavaScript Katas',
openExternal: true,
},
{
url: 'https://www.typescriptlang.org/',
title: 'TypeScript',
openExternal: true,
},
{
url: 'https://es6.ruanyifeng.com/',
title: 'ES6 入门教程',
openExternal: true,
},
],
},
];

export default () => {
return (
<Footer
bottom={'Copyright © 2023 antdp. All rights reserved.'}
columns={footer}
/>
);
};
35 changes: 30 additions & 5 deletions examples/website/.dumirc.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,40 @@
import { defineConfig } from 'dumi';
import { featuresZh } from './config/features';

export default defineConfig({
outputPath: 'dist',
themeConfig: {
name: 'antdp',
logo:'/logo.svg',
editLink:true,
name: 'antd project',
logo: '/logo.svg',
hero: {
description:
'一个基于 antd5.x 和 umi 的初始级别项目,集成路由、dva(Redux)、选项卡等特性',
actions: [
{
type: 'primary',
text: '开始使用',
link: '/guid/quick-start',
},
{
text: 'Github',
link: 'https://github.com/antdpro/antdp',
openExternal: true,
},
],
features: featuresZh,
},
socialLinks: {
github: 'https://github.com/antdpro/antdp',
},
footer: 'Copyright © 2023 antdp. All rights reserved.' ,
nav:[{title:'实例预览',link:'https://stackblitz.com/github/antdpro/antdp/tree/master/examples/antdp-base?embed=1&hideNavigation=0&hidedevtools=0'},{title:'教程',link:'/guide/quick-start'},{title:'组件',link:'/component/user-login'}]
editLink: true,
extraBabelPlugins: ['antd-style'],
nav: [
{
title: '实例预览',
link: 'https://stackblitz.com/github/antdpro/antdp/tree/master/examples/antdp-base?embed=1&hideNavigation=0&hidedevtools=0',
},
{ title: '教程', link: '/guide/quick-start' },
{ title: '组件', link: '/component/user-login' },
],
},
});
46 changes: 46 additions & 0 deletions examples/website/config/features.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import { IFeature } from 'dumi-theme-antd-style';

export const featuresZh: IFeature[] = [
{
title: '简化配置',
image: '🪖',
description: '简化 antd 5.x + 和 umi 框架配置使用',
row: 6,
},
{
title: '基于 Ant Design',
description: '简化 antd 5.x + 和 umi 框架配置使用',
imageType: 'light',
image:
'https://gw.alipayobjects.com/zos/hitu-asset/c88e3678-6900-4289-8538-31367c2d30f2/hitu-1609235995955-image.png',
row: 6,
},
{
title: '简单直观',
link: '/component/basic-layouts',
description: '更简单直观的配置权限和更改Layouts',
image: '💠',
row: 6,
},
{
title: '减少依赖',
link: '/guide/config',
description: '减少项目配置和依赖,将配置集成到包中开箱即用',
image: '📦',
row: 6,
},
{
title: 'Tab',
description: '支持 tab 选项卡功能',
link: '/component/layout-tabs',
image: '🐝',
row: 6,
},
{
title: '权限',
link: '/guide/auth',
description: '内部支持权限',
image: '💋',
row: 6,
},
];
17 changes: 0 additions & 17 deletions examples/website/docs/index.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,4 @@
---
title: antdp
hero:
title: antdp
description: 一个基于 antd5.x 和 umi 的初始级别项目,集成路由、dva(Redux)、选项卡等特性
actions:
- text: 立即上手
link: /guide/quick-start
- text: GitHub
link: https://github.com/antdpro/antdp
features:
- title: 简化
emoji: 💎
description: 简化 antd 5.x + 和 umi 框架配置使用
- title: 减少
emoji: 🌈
description: 减少项目配置和依赖,将配置集成到包中开箱即用
- title: '简单'
emoji: 🚀
description: 更简单直观的配置权限和更改 Layout
---
3 changes: 2 additions & 1 deletion examples/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"@commitlint/cli": "^17.1.2",
"@commitlint/config-conventional": "^17.1.0",
"antd": "5.6.1",
"dumi": "^2.2.0"
"dumi": "^2.2.0",
"dumi-theme-antd-style": "^0.29.4"
},
"authors": []
}

0 comments on commit 5fb1c91

Please sign in to comment.