diff --git a/components/layout/index.en-US.md b/components/layout/index.en-US.md index d5d0c391f5..843c57d367 100644 --- a/components/layout/index.en-US.md +++ b/components/layout/index.en-US.md @@ -11,23 +11,23 @@ Handling the overall layout of a page. ### Size -The first level of the navigation is placed near by a logo inclined left, and the secondary menu is placed inclined right. +The first level navigation is inclined left near a logo, and the secondary menu is inclined right. -- Top Navigation (almost systems): the height of the first level navigation `64px`, the second level of navigation `48px`. -- Top Navigation(contents page): the height of the first level navigation `80px`, the second level of navigation `56px`. +- Top Navigation (almost systems): the height of the first level navigation `64px`, the second level navigation `48px`. +- Top Navigation(contents page): the height of the first level navigation `80px`, the second level navigation `56px`. - Calculation formula of a top navigation: `48+8n`. -- Calculation formula a aside navigation: `200+8n`. +- Calculation formula of an aside navigation: `200+8n`. ### Interaction rules - The first level navigation and the last level navigation should be distincted by visualization; - The current item should have the highest priority of visualization; -- When the current navigation item is collapsed, the stlye of the current navigation item will be applied to the parent level of it; -- The left side navigation bar support for both the according and the expanding style, you can choose the one of it case by case. +- When the current navigation item is collapsed, the stlye of the current navigation item will be applied to its parent level; +- The left side navigation bar has support for both the accordion and expanding styles, you can choose the one that fits your case best. ## Visualization rules - Style of a navigation should conform to the level of it. + Style of a navigation should conform to the its level. - **Emphasis by colorblock** @@ -35,7 +35,7 @@ The first level of the navigation is placed near by a logo inclined left, and th - **The highlight match stick** - When background color is a light color, you can use this pattern for the current page navigation item, we recommed to use it for the last item of the navigation path. + When background color is a light color, you can use this pattern for the current page navigation item, we recommed using it for the last item of the navigation path. - **Hightlighted font** @@ -43,7 +43,7 @@ The first level of the navigation is placed near by a logo inclined left, and th - **Enlarge the size of the font** - `12px`、`14px` is a standard font size of navigations,14 is used for the first and the second level of the navigation. You can choose a approprigate font size in terms of the level of your navigation. + `12px`、`14px` is a standard font size of navigations,`14px` is used for the first and the second level of the navigation. You can choose a approprigate font size in terms of the level of your navigation. ## Component Overview @@ -53,7 +53,7 @@ The first level of the navigation is placed near by a logo inclined left, and th - `Content`: The content layout with default style, in which any element can be nested, and must be placed in `Layout`. - `Footer`: The bottom layout with default style, in which any element can be nested, and must be placed in `Layout`. -> Base on `flex layout`, please pay attention to the [compatibility](http://caniuse.com/#search=flex). +> Based on `flex layout`, please pay attention to the [compatibility](http://caniuse.com/#search=flex). ## API @@ -75,10 +75,10 @@ The wrapper. Property | Description | Type | Default -----|-----|-----|------ -style | to custom the styles | object | - +style | to customize the styles | object | - className | container className | string | - -> API of `Layout.Header` `Layout.Footer` `Layout.Content` is the same with `Layout`. +> APIs of `Layout.Header` `Layout.Footer` `Layout.Content` are the same as that of `Layout`. ### Layout.Sider @@ -90,12 +90,12 @@ collapsible | whether can be collapsed | boolean | false defaultCollapsed | to set the initial status | boolean | false | reverseArrow | reverse direction of arrow, for a sider that expands from the right | boolean | false | collapsed | to set the current status | boolean | - -onCollapse | the callback function, can be executed by clicking the trigger or activating the responsive layout | (collapsed, type) => {} | - +onCollapse | the callback function, executed by clicking the trigger or activating the responsive layout | (collapsed, type) => {} | - trigger | specify the customized trigger, set to null to hide the trigger | string\|ReactNode| - | width | width of the sidebar | number\|string | 200 collapsedWidth | width of the collapsed sidebar, by setting to `0` a special trigger will appear | number | 64 breakpoint | breakpoint of the responsive layout | Enum { 'xs', 'sm', 'md', 'lg', 'xl' } | - | -style | to custom the styles | object | - +style | to customize the styles | object | - className | container className | string | - #### breakpoint width diff --git a/components/steps/index.en-US.md b/components/steps/index.en-US.md index 72de37df58..bc7efbb850 100644 --- a/components/steps/index.en-US.md +++ b/components/steps/index.en-US.md @@ -30,7 +30,7 @@ Property | Description | Type | Default current | to set the current step, counting from 0. You can overwrite this state by using `status` of `Step` | number | 0 status | to specify the status of current step, can be set to one of the following values: `wait` `process` `finish` `error` | string | `process` size | to specify the size of the step bar, `default` and `small` are currently supported | string | `default` -direction | to specify the direction of the step bar, `horizontal` and `vertical` are currently supported | string | horizontal +direction | to specify the direction of the step bar, `horizontal` and `vertical` are currently supported | string | `horizontal` progressDot | Steps with progress dot style, customize the progress dot by setting it to a function | Boolean or (iconDot, {index, status, title, description}) => ReactNode | false ### Steps.Step @@ -39,7 +39,7 @@ A single step in the step bar. Property | Description | Type | Default -----|-----|-----|------ -status | to specify the status. It will be automatically set by `current` of `Steps` if not configured. Optional values are: `wait` `process` `finish` `error` | string | wait +status | to specify the status. It will be automatically set by `current` of `Steps` if not configured. Optional values are: `wait` `process` `finish` `error` | string | `wait` title | title of the step | string\|ReactNode | - -description | detail of the step, optional property | string\|ReactNode | - +description | description of the step, optional property | string\|ReactNode | - icon | icon of the step, optional property | string\|ReactNode | - diff --git a/package.json b/package.json index 79b84dab5f..737d01ce22 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "babel-preset-react": "^6.16.0", "babel-preset-stage-0": "^6.16.0", "bezier-easing": "^2.0.3", - "bisheng": "^0.24.0", + "bisheng": "^0.25.0", "bisheng-plugin-antd": "^0.15.0", "bisheng-plugin-description": "^0.1.1", "bisheng-plugin-react": "^0.5.0", @@ -156,8 +156,8 @@ "dist": "antd-tools run dist", "compile": "antd-tools run compile", "tsc": "tsc", - "start": "bisheng start -c ./site/bisheng.config.js --no-livereload", - "site": "bisheng build --ssr -c ./site/bisheng.config.js", + "start": "cross-env NODE_ENV=development bisheng start -c ./site/bisheng.config.js --no-livereload", + "site": "cross-env NODE_ENV=production bisheng build --ssr -c ./site/bisheng.config.js", "deploy": "antd-tools run clean && npm run site && bisheng gh-pages --push-only", "pub": "antd-tools run pub", "prepublish": "antd-tools run guard", diff --git a/site/bisheng.config.js b/site/bisheng.config.js index 2a820dfe46..6cb560cc9c 100644 --- a/site/bisheng.config.js +++ b/site/bisheng.config.js @@ -1,6 +1,8 @@ const path = require('path'); const CSSSplitWebpackPlugin = require('css-split-webpack-plugin').default; +const isDev = process.env.NODE_ENV === 'development'; + module.exports = { port: 8001, source: { @@ -61,6 +63,8 @@ module.exports = { }; config.externals = { + react: 'React', + 'react-dom': 'ReactDOM', 'react-router-dom': 'ReactRouterDOM', }; @@ -76,4 +80,7 @@ module.exports = { return config; }, + htmlTemplateExtraData: { + isDev, + }, }; diff --git a/site/theme/static/template.html b/site/theme/static/template.html index 6664a229ae..92cd4abd30 100644 --- a/site/theme/static/template.html +++ b/site/theme/static/template.html @@ -110,6 +110,11 @@
+ {% if isDev %} + + {% else %} + + {% endif %} {{ content | safe }}