diff --git a/nico.js b/nico.js index 46b7d682ce..4d523e84c4 100644 --- a/nico.js +++ b/nico.js @@ -6,7 +6,7 @@ var inspect = require('util').inspect; var Busboy = require('busboy'); var chalk = require('chalk'); var webpackMiddleware = require('webpack-dev-middleware'); -var webpackConfig = require('./webpack.deploy.config'); +var webpackConfig = require('./webpack.config'); var webpackCompiler = webpack(webpackConfig); var handler; diff --git a/scripts/demo.js b/scripts/demo.js index ac1fe71eda..284d8359f9 100644 --- a/scripts/demo.js +++ b/scripts/demo.js @@ -36,6 +36,7 @@ window.ReactDOM = ReactDOM; window['object-assign'] = require('object-assign'); window['classnames'] = require('classnames'); window['reqwest'] = require('reqwest'); +require('./home')(); antd.DatePicker.locale = { en_US: require('../components/date-picker/locale/en_US'), diff --git a/scripts/home.js b/scripts/home.js index 0ed88c13ff..2b2b8eacc0 100644 --- a/scripts/home.js +++ b/scripts/home.js @@ -4,105 +4,112 @@ import { QueueAnim, Icon, Button } from '../index'; import ScrollOverPack from 'rc-scroll-anim/lib/ScrollOverPack'; import TweenOne from 'rc-tween-one'; -// 导航处理 -function scrollNavEvent() { - const scrollTop = document.body.scrollTop || document.documentElement.scrollTop; - const clientHeight = document.documentElement.clientHeight; - if (scrollTop >= clientHeight) { - header.className = header.className.indexOf('home-nav-bottom') >= 0 ? header.className : header.className + ' home-nav-bottom'; - } else { - header.className = header.className.replace(/home-nav-bottom/ig, ''); - } -} - -$(window).off('scroll.scrollNavEvent'); -$(window).on('scroll.scrollNavEvent', scrollNavEvent); - -class Banner extends React.Component { - constructor() { - super(...arguments); - } - - typeFunc(a) { - if (a.key === 'line') { - return 'right'; - } else if (a.key === 'button') { - return 'bottom'; +module.exports = function() { + InstantClickChangeFns.push(function() { + if (!document.getElementById('banner')) { + return; + } + // 导航处理 + function scrollNavEvent() { + const scrollTop = document.body.scrollTop || document.documentElement.scrollTop; + const clientHeight = document.documentElement.clientHeight; + if (scrollTop >= clientHeight) { + header.className = header.className.indexOf('home-nav-bottom') >= 0 ? header.className : header.className + ' home-nav-bottom'; + } else { + header.className = header.className.replace(/home-nav-bottom/ig, ''); + } } - return 'left'; - } - render() { - return ( -
DESIGN
-一个 UI 设计语言
- -DESIGN
+一个 UI 设计语言
+ +近一年的中后台设计实践,积累了大量的优秀案例。
+总结中后台设计中反复出现的问题,并提供相应的解决方案。
+丰富、灵活、实用的基础组件,为业务产品提供强有力的设计支持。
+ +这是一套致力于提升『用户』和『设计者』使用体验的中后台设计语言。
+近一年的中后台设计实践,积累了大量的优秀案例。
- -总结中后台设计中反复出现的问题,并提供相应的解决方案。
-丰富、灵活、实用的基础组件,为业务产品提供强有力的设计支持。
- -这是一套致力于提升『用户』和『设计者』使用体验的中后台设计语言。
-