diff --git a/site/common/styles/common.less b/site/common/styles/common.less index 680b8ed06b..bcae7aaab1 100644 --- a/site/common/styles/common.less +++ b/site/common/styles/common.less @@ -16,6 +16,10 @@ overflow: hidden; } +.sidebar { + padding-bottom: 50px; +} + .sidebar .chinese { font-size: 12px; margin-left: 6px; diff --git a/site/component/Demo/index.jsx b/site/component/Demo/index.jsx index 5734e53fec..ebfa9f9583 100644 --- a/site/component/Demo/index.jsx +++ b/site/component/Demo/index.jsx @@ -20,13 +20,18 @@ export default class Demo extends React.Component { } render() { - const { id, preview, title, intro, code, expand } = this.props; + const { id, preview, title, intro, code, style, expand } = this.props; const introChildren = intro.map(utils.objectToComponent); const highlightedCode = hljs.highlight('javascript', code).value; return (
{ preview() } + { + !!style ? +