├── .editorconfig ├── .eslintignore ├── .eslintrc.js ├── .github └── FUNDING.yml ├── .gitignore ├── .stylelintrc ├── CNAME ├── LICENSE ├── README-zh_CN.md ├── README.md ├── docs ├── cases.md ├── download.md ├── edit │ ├── edit-block.md │ └── video.md ├── guide │ ├── banner.md │ ├── content.md │ ├── examples.md │ ├── header-footer.md │ ├── layout.md │ └── type.md ├── introduce.md └── use │ ├── create-react-app.en-US.md │ ├── create-react-app.zh-CN.md │ ├── dumi.md │ ├── dva-cli.md │ ├── getting-started.md │ ├── pro-1-x.md │ ├── pro.md │ └── umi.md ├── documentation.md ├── index.text ├── package.json ├── prettier ├── install-service-worker.js ├── lib │ ├── index.js │ ├── parser-babylon.js │ ├── parser-flow.js │ ├── parser-glimmer.js │ ├── parser-graphql.js │ ├── parser-markdown.js │ ├── parser-parse5.js │ ├── parser-postcss.js │ ├── parser-typescript.js │ ├── parser-vue.js │ └── sw-toolbox.js ├── service-worker.js └── worker.js ├── renovate.json ├── site ├── bisheng.common.config.js ├── bisheng.edit.config.js ├── bisheng.index.config.js ├── bisheng.templates.config.js ├── edit │ ├── en-US.js │ ├── index.js │ ├── static │ │ ├── banner-slide.less │ │ ├── common.less │ │ ├── content.less │ │ ├── custom.less │ │ ├── edit-influence.less │ │ ├── edit-list │ │ │ ├── box-model.less │ │ │ ├── child.less │ │ │ ├── collapse.less │ │ │ ├── common.less │ │ │ ├── custom.less │ │ │ ├── editor-bg-image.less │ │ │ ├── editor-color.less │ │ │ ├── editor-font.less │ │ │ ├── editor-gradient.less │ │ │ └── index.less │ │ ├── edit-stage.less │ │ ├── index.html │ │ ├── index.less │ │ ├── login-controller.less │ │ ├── nav-controller.less │ │ ├── other-view.less │ │ ├── side-menu.less │ │ ├── sort.less │ │ └── style.js │ ├── template │ │ ├── NotFound.jsx │ │ ├── component.config.js │ │ ├── components │ │ │ ├── EditInfluence.jsx │ │ │ ├── EditListController.jsx │ │ │ ├── EditStageController.jsx │ │ │ ├── Iframe.jsx │ │ │ ├── ListComponents │ │ │ │ ├── CheckboxGroup.jsx │ │ │ │ ├── ChildComp.jsx │ │ │ │ ├── EditorComp.jsx │ │ │ │ ├── EditorOther.jsx │ │ │ │ ├── InputGroup.jsx │ │ │ │ └── PropsComp.jsx │ │ │ ├── MediumEditor.jsx │ │ │ ├── NavController │ │ │ │ ├── HistoryButton.jsx │ │ │ │ ├── NewFileButton.jsx │ │ │ │ ├── PublishModal.jsx │ │ │ │ └── index.jsx │ │ │ ├── SideMenu.jsx │ │ │ ├── StateComponents │ │ │ │ ├── ButtonViewComponent │ │ │ │ │ ├── ContentEditView.jsx │ │ │ │ │ ├── ContentEditViewItem.jsx │ │ │ │ │ ├── ContentWrapper.jsx │ │ │ │ │ ├── IconComp.jsx │ │ │ │ │ ├── ImageComp.jsx │ │ │ │ │ ├── LinkComp.jsx │ │ │ │ │ ├── MenuComp.jsx │ │ │ │ │ ├── MenuEditView.jsx │ │ │ │ │ ├── TextyComp.jsx │ │ │ │ │ └── VideoComp.jsx │ │ │ │ ├── EditButtonView.jsx │ │ │ │ ├── ListSort.jsx │ │ │ │ └── SwitchSlideView.jsx │ │ │ └── saveJsZip.jsx │ │ ├── index.jsx │ │ ├── layout.jsx │ │ ├── template.config.js │ │ └── utils.jsx │ └── zh-CN.js ├── shared │ ├── constants.js │ ├── defaultTemplate.js │ ├── leancloud.js │ ├── localStorage.js │ ├── redux │ │ ├── actionTypes.js │ │ ├── actions.js │ │ ├── index.js │ │ ├── reducers │ │ │ ├── currentEditData.js │ │ │ ├── historyEdit.js │ │ │ ├── index.js │ │ │ ├── mediaStateSelect.js │ │ │ ├── templateData.js │ │ │ └── userIsLogin.js │ │ └── saga.js │ ├── url.js │ └── utils.js ├── templates │ ├── index.js │ ├── static │ │ ├── bottom-func-bar.less │ │ ├── common.less │ │ ├── content.less │ │ ├── custom.less │ │ ├── index.html │ │ ├── index.less │ │ ├── lessToString.jsx │ │ └── point.less │ └── template │ │ ├── BottomBar.jsx │ │ ├── NotFound.jsx │ │ ├── element │ │ ├── Banner0 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Banner1 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Banner2 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Banner3 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Banner4 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Banner5 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Content0 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Content1 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Content10 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Content11 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Content12 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Content13 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Content2 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Content3 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Content4 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Content5 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Content6 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Content7 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Content8 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Content9 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Feature6 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Feature7 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Feature8 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Footer0 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Footer1 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Footer2 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Nav0 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Nav1 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Nav2 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Nav3 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Pricing0 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Pricing1 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Pricing2 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Teams0 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Teams1 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Teams2 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ ├── Teams3 │ │ │ ├── index.jsx │ │ │ ├── index.less │ │ │ └── template.config.js │ │ └── template.config.js │ │ ├── index.jsx │ │ ├── layout.jsx │ │ ├── other │ │ ├── Point.jsx │ │ └── otherToString.jsx │ │ └── utils.jsx ├── theme │ ├── en-US.js │ ├── index.js │ ├── static │ │ ├── antd.less │ │ ├── common.less │ │ ├── default.less │ │ ├── footer.less │ │ ├── header.less │ │ ├── home │ │ │ ├── banner.less │ │ │ ├── index.less │ │ │ ├── page1.less │ │ │ ├── page2.less │ │ │ ├── page3.less │ │ │ ├── page4.less │ │ │ └── responsive.less │ │ ├── index.less │ │ ├── page │ │ │ ├── highlight.less │ │ │ ├── index.less │ │ │ ├── markdown.less │ │ │ ├── page-nav.less │ │ │ ├── responsive.less │ │ │ └── toc.less │ │ ├── preview-img.less │ │ ├── responsive.less │ │ ├── style.js │ │ └── template.html │ ├── template │ │ ├── Content │ │ │ ├── Article.jsx │ │ │ ├── EditButton.jsx │ │ │ ├── MainContent.jsx │ │ │ └── index.jsx │ │ ├── Home │ │ │ ├── Banner.jsx │ │ │ ├── Page1.jsx │ │ │ ├── Page2.jsx │ │ │ ├── Page3.jsx │ │ │ ├── Page4.jsx │ │ │ ├── component │ │ │ │ ├── ImageLoadComp.jsx │ │ │ │ ├── Templates.jsx │ │ │ │ ├── WaterfallLayout.jsx │ │ │ │ └── data.json │ │ │ ├── index.jsx │ │ │ └── utils.jsx │ │ ├── Layout │ │ │ ├── Footer.jsx │ │ │ ├── Header.jsx │ │ │ ├── Layout.jsx │ │ │ ├── PhoneNav.jsx │ │ │ └── index.jsx │ │ ├── NotFound.jsx │ │ ├── Other │ │ │ ├── Cases.jsx │ │ │ ├── Download.jsx │ │ │ ├── cases.less │ │ │ └── download.less │ │ └── utils.jsx │ └── zh-CN.js └── utils.jsx └── webpack.config.js /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | 15 | [Makefile] 16 | indent_style = tab -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | _site 3 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: ant-design-landing 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | custom: # Replace with a single custom sponsorship URL 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .idea/ 3 | .ipr 4 | .iws 5 | *~ 6 | ~* 7 | *.diff 8 | *.patch 9 | *.bak 10 | .DS_Store 11 | Thumbs.db 12 | .project 13 | .*proj 14 | .svn/ 15 | *.swp 16 | *.swo 17 | *.pyc 18 | *.pyo 19 | node_modules 20 | dist 21 | psd 22 | old 23 | _site 24 | .vscode -------------------------------------------------------------------------------- /.stylelintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "stylelint-config-standard", 3 | "rules": { 4 | "comment-empty-line-before": null, 5 | "declaration-empty-line-before": null, 6 | "function-comma-newline-after": null, 7 | "function-name-case": null, 8 | "function-parentheses-newline-inside": null, 9 | "function-max-empty-lines": null, 10 | "function-whitespace-after": null, 11 | "indentation": null, 12 | "number-leading-zero": null, 13 | "number-no-trailing-zeros": null, 14 | "rule-empty-line-before": null, 15 | "selector-combinator-space-after": null, 16 | "selector-list-comma-newline-after": null, 17 | "selector-pseudo-element-colon-notation": null, 18 | "unit-no-unknown": null, 19 | "value-list-max-empty-lines": null, 20 | "no-descending-specificity": null 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /CNAME: -------------------------------------------------------------------------------- 1 | landing.ant.design -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT LICENSE 2 | 3 | Copyright (c) 2015-present Alipay.com, https://www.alipay.com/ 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /README-zh_CN.md: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
2 |
3 |
4 |
5 |
示例1
19 |示例2
23 |示例3
27 |
51 | ```
52 | ## 删除 Home 里的 md 文件
53 |
54 | 将 documentation.md 从文件包里删除;
55 |
56 | ## 完成
57 |
58 | 完成以上步骤之后,我们再启动 `npm start` 即可查看在 landing 上下载的模板。
59 |
--------------------------------------------------------------------------------
/docs/use/dva-cli.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 3
3 | category:
4 | zh-CN: 使用教程
5 | en-US: Tutorial
6 | title:
7 | zh-CN: dva-cli 里使用
8 | en-US: Use in dva
9 | ---
10 | [dva](https://github.com/dvajs/dva) 脚手架为 ant design 提供的基于 redux、redux-saga 和 react-router 比较完善的轻量级前端框架,具体教程[请查看](https://github.com/sorrycc/blog/issues/18)。
11 |
12 | 如何使用 demo 地址请查看 [dva-cli-example](https://github.com/ant-motion/ant-motion-dva-cli-example);
13 |
14 | 基本配置请查看 [开始使用](docs/use/getting-started);
15 |
16 | ## 文件路径
17 |
18 | [dva-cli](https://github.com/dvajs/dva-cli) 脚手架的文件目录为 `src/routes`, 首先我们需要将下载的 Home 文件包直接复制到 routes 文件夹下。
19 |
20 | ## 修改路由
21 |
22 | 复制完成后,我们需要将主页入口修改成以上复制的文件目录。
23 |
24 | ```jsx
25 | import IndexPage from './routes/Home';
26 | ```
27 |
28 | ## CSS Modules
29 |
30 | dva 默认使用了 `css-modules`,同样我们提供了两套解决方案。
31 |
32 | ### 关闭 css-modules
33 |
34 | 如果你当前项目为新项目,且对 `css-modules` 并不是太了解,可以选择关闭 `css-modules`,只需要在 `.roadhogrc` 文件里加上 `"disableCSSModules": true` 即可。
35 | ```json
36 | {
37 | "entry": "src/index.js",
38 | + "disableCSSModules": true, // 加在此处
39 | "env": {
40 | "development": {
41 | "extraBabelPlugins": [
42 | "dva-hmr",
43 | "transform-runtime"
44 | ]
45 | },
46 | "production": {
47 | "extraBabelPlugins": [
48 | "transform-runtime"
49 | ]
50 | }
51 | },
52 | }
53 | ```
54 |
55 | ### 使用 global
56 |
57 | 使用 `css-modules` 的 `global`, 在 `index.less` 里添加 `:global`, 将样式不作转换, `global` 具体使用[请查看开始使用](/docs/use/getting-started#样式)。
58 |
59 |
60 | ## 按需加载
61 |
62 | dva 里使用 `babel-plugin-import` 我们只需要 `.roadhogrc` 文件里添加 `["import", { "libraryName": "antd", "style": true }]` 即可。
63 |
64 | ```json
65 |
66 | {
67 | "entry": "src/index.js",
68 | "env": {
69 | "development": {
70 | "extraBabelPlugins": [
71 | "dva-hmr",
72 | "transform-runtime",
73 | ["import", { "libraryName": "antd", "style": true }]
74 | ]
75 | },
76 | "production": {
77 | "extraBabelPlugins": [
78 | "transform-runtime",
79 | ["import", { "libraryName": "antd", "style": true }]
80 | ]
81 | }
82 | },
83 | }
84 | ```
85 |
86 | ## 完成
87 |
88 | 完成以上频骤之后,我们再启动 `npm start` 即可查看在 landing 上下载的模板。
--------------------------------------------------------------------------------
/docs/use/pro.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 4
3 | category:
4 | zh-CN: 使用教程
5 | en-US: Tutorial
6 | title:
7 | zh-CN: pro 里使用
8 | en-US: Use in pro
9 | ---
10 |
11 | [Ant Design pro](https://pro.ant.design) 是 Ant Design 推出的一个开箱即用的中台前端/设计解决方案。
12 |
13 | ## 文件路径
14 |
15 | [Ant Design pro v2.x](https://pro.ant.design) 使用的为 umi 脚手架,文件目录同样为 `src/pages`, 首先我们需要将下载的 Home 文件包直接复制到 `pages` 文件夹下。
16 |
17 | ## 修改路由
18 |
19 | 文件目录: `config/router.config.js`;
20 |
21 | 修改 `dashboard` 的路由, 增加 `Home` 路由;
22 |
23 | ```js
24 | export default [
25 | + { path: '/', component: './Home' }, // 增加 Home 路由
26 | // user
27 | {
28 | path: '/user',
29 | ...
30 | },
31 | // app
32 | {
33 | - path: '/',
34 | + path: '/dashboard', // 更改 dashboard 路由;
35 | component: '../layouts/BasicLayout',
36 | Routes: ['src/pages/Authorized'],
37 | authority: ['admin', 'user'],
38 | ...
39 | },
40 | ];
41 | ```
42 |
43 | ## 安装依赖
44 |
45 | 详细参考[开始使用里的安装依赖](docs/use/getting-started#安装依赖);
46 |
47 | ## CSS Modules
48 |
49 | 多方案请查看 [umi 里使用的 css module](/docs/use/umi#CSS-Modules);
50 |
51 | 这里推荐使用 css-module 的 global;
52 |
53 | antMotionStyle.less 如下
54 |
55 | ```
56 | :global {
57 | @import './common.less';
58 | @import './custom.less';
59 | @import './content.less';
60 | @import './nav0.less';
61 | @import './banner0.less';
62 | ...
63 | }
64 | ```
65 |
66 | ## 暂时先删除换肤插件
67 |
68 | 由于换肤插件需要重新 build 全部的 less, 暂时不支持 landing 的 less,所以我们先暂时删除换肤插件。
69 |
70 | 文件目录:`config/config.js`;
71 |
72 | 删除 `webpackPlugin` 相关的代码:
73 | ```jsx
74 | // https://umijs.org/config/
75 | import os from 'os';
76 | import pageRoutes from './router.config';
77 | - import webpackPlugin from './plugin.config';
78 | import defaultSettings from '../src/defaultSettings';
79 |
80 | ...
81 |
82 | export default {
83 | // add for transfer to umi
84 | ...
85 | manifest: {
86 | basePath: '/',
87 | },
88 |
89 | - chainWebpack: webpackPlugin,
90 | };
91 |
92 | ```
--------------------------------------------------------------------------------
/documentation.md:
--------------------------------------------------------------------------------
1 | # 如何使用:
2 |
3 | - umi 里如何使用[请查看](https://landing.ant.design/docs/use/umi)。
4 | - 其它脚手架使用[请查看](https://landing.ant.design/docs/use/getting-started)。
5 |
--------------------------------------------------------------------------------
/index.text:
--------------------------------------------------------------------------------
1 | /* eslint no-undef: 0 */
2 | /* eslint arrow-parens: 0 */
3 | import React from 'react';
4 | import { enquireScreen } from 'enquire-js';
5 | &scrollAnim&
6 | &import&
7 | &dataSource&
8 | import './less/antMotionStyle.less';
9 |
10 | let isMobile;
11 | enquireScreen((b) => {
12 | isMobile = b;
13 | });
14 |
15 | const { location = {} } = typeof window !== 'undefined' ? window : {};
16 |
17 | export default class Home extends React.Component {
18 | constructor(props) {
19 | super(props);
20 | this.state = {
21 | isMobile,
22 | show: !location.port,// 如果不是 dva 2.0 请删除
23 | };
24 | }
25 |
26 | componentDidMount() {
27 | &scrollScreen-pragma&
28 | // 适配手机屏幕;
29 | enquireScreen((b) => {
30 | this.setState({ isMobile: !!b });
31 | });
32 | // dva 2.0 样式在组件渲染之后动态加载,导致滚动组件不生效;线上不影响;
33 | /* 如果不是 dva 2.0 请删除 start */
34 | if (location.port) {
35 | // 样式 build 时间在 200-300ms 之间;
36 | setTimeout(() => {
37 | this.setState({
38 | show: true,
39 | });
40 | &scrollScreen&
41 | }, 500);
42 | }
43 | /* 如果不是 dva 2.0 请删除 end */
44 | }
45 |
46 | render() {
47 | &children&
48 | return (
49 | 9 | 你要找的页面不存在 10 | {' '} 11 | 返回首页 12 |
13 |
15 |
11 | 你要找的页面不存在 12 | {' '} 13 | 14 | 返回首页 15 | 16 |
17 |{dataSource.Content.children.content.children}
74 |11 | 你要找的页面不存在 12 | 返回首页 13 |
14 |{item.content}
18 |{item.content}
25 |