From 3086068618505f318dbd42005dbe5bcd15d66fee Mon Sep 17 00:00:00 2001 From: simaQ Date: Thu, 9 Jul 2015 17:19:01 +0800 Subject: [PATCH 1/4] add input status mixins --- style/mixins/input.less | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/style/mixins/input.less b/style/mixins/input.less index d4bd78826d..7c85bcabda 100644 --- a/style/mixins/input.less +++ b/style/mixins/input.less @@ -11,6 +11,20 @@ font-size: @input-font-size-sm; } +// input status +// == when focus or actived +.active(@color: @input-hover-border-color) { + border-color: @color; + outline: 0; + box-shadow: 0 0 3px tint(@color, 20%); +} + +// == when hoverd +.hover(@color: @input-hover-border-color ) { + border-color: @color; +} + + // Basic style for input .input() { position: relative; @@ -30,13 +44,11 @@ .transition(~"border .3s @{ease-in-out}, background .3s @{ease-in-out}, box-shadow .3s @{ease-in-out}"); &:hover { - border-color: @input-hover-border-color; + .hover(); } &:focus { - border-color: @input-focus-border-color; - outline: 0; - box-shadow: 0 0 3px tint(@input-focus-border-color, 20%); + .active(); } &[disabled], @@ -44,7 +56,7 @@ background-color: @input-disabled-bg; opacity: 1; &:hover { - border-color: @input-border-color; + .hover(@input-border-color); } } From fc85fa836b1bf4bc5e92c9d31d642008c9964e13 Mon Sep 17 00:00:00 2001 From: yiminghe Date: Thu, 9 Jul 2015 17:47:21 +0800 Subject: [PATCH 2/4] use ie8 safe react-router --- package.json | 1 - scripts/demo.js | 3 +- site/templates/layout.html | 101 +++++++++++++++--------------- style/components/inputNumber.less | 6 +- style/components/select.less | 15 +++-- 5 files changed, 65 insertions(+), 61 deletions(-) diff --git a/package.json b/package.json index a1209db34f..02bc0d62ad 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,6 @@ "lodash": "^3.10.0", "nico-jsx": "~0.5.8", "precommit-hook": "^1.0.7", - "react-router": "~0.13.3", "webpack": "^1.10.1", "webpack-dev-middleware": "^1.2.0" }, diff --git a/scripts/demo.js b/scripts/demo.js index 43d7be9c76..d2bbc2ae20 100644 --- a/scripts/demo.js +++ b/scripts/demo.js @@ -1,3 +1,2 @@ -window['react-router'] = require('react-router'); - window['css-animation'] = require('css-animation'); +window['react-router'] = window.ReactRouter; diff --git a/site/templates/layout.html b/site/templates/layout.html index 3c9c786863..333152c4ce 100644 --- a/site/templates/layout.html +++ b/site/templates/layout.html @@ -1,64 +1,65 @@ - - - - - - {% block title %}{{ config.site.name }} - {{ config.site.description }}{% endblock %} - - - - - {% block styles %}{% endblock %} - - - - - - {% block scripts %}{% endblock %} + + + + + + {% block title %}{{ config.site.name }} - {{ config.site.description }}{% endblock %} + + + + + {% block styles %}{% endblock %} + + + + + + {% block scripts %}{% endblock %} - +
{% block aside %}{% endblock %} {% block content %}{% endblock %} -
- {%- include "footer.html" %} + +{%- include "footer.html" %} diff --git a/style/components/inputNumber.less b/style/components/inputNumber.less index 3f5580f212..96276075e9 100644 --- a/style/components/inputNumber.less +++ b/style/components/inputNumber.less @@ -80,10 +80,11 @@ cursor: pointer; &-inner { .iconfont-mixin(); + transform: rotate(270deg) scale(0.8); + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); top:-2px; &:before { content: "\e611"; - transform: rotate(270deg) scale(0.8); } } } @@ -92,9 +93,10 @@ cursor: pointer; &-inner { .iconfont-mixin(); + transform: rotate(90deg) scale(0.8); + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); &:before { content: "\e611"; - transform: rotate(90deg) scale(0.8); } } } diff --git a/style/components/select.less b/style/components/select.less index 7661a41ce1..2bbefc523d 100644 --- a/style/components/select.less +++ b/style/components/select.less @@ -30,19 +30,22 @@ // arrow &-arrow { + .iconfont-mixin(); height: 26px; position: absolute; top: 1px; right: 1px; - width: 20px; + width: 26px; + line-height: 26px; + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); + transform: rotate(90deg); + + * { + display: none; + } - font-family: 'anticon'; &:before { content: '\e611'; - .rotate(90deg); - position: absolute; - top: 4px; - left: 3px; } } From bb5a6d9c29d0aa80b9e2510470c1476d14c1bc22 Mon Sep 17 00:00:00 2001 From: yiminghe Date: Thu, 9 Jul 2015 18:23:34 +0800 Subject: [PATCH 3/4] fix breadcrumb warning --- components/breadcrumb/demo/router.md | 6 ------ components/breadcrumb/index.jsx | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/components/breadcrumb/demo/router.md b/components/breadcrumb/demo/router.md index 85a3cf8c06..0230435677 100644 --- a/components/breadcrumb/demo/router.md +++ b/components/breadcrumb/demo/router.md @@ -22,12 +22,6 @@ var Apps = React.createClass({ } }); -var App = React.createClass({ - render() { - return
; - } -}); - var App = React.createClass({ render() { return (
diff --git a/components/breadcrumb/index.jsx b/components/breadcrumb/index.jsx index 1ae4ef9dcf..f7cf1fb8b8 100644 --- a/components/breadcrumb/index.jsx +++ b/components/breadcrumb/index.jsx @@ -17,7 +17,7 @@ let BreadcrumbItem = React.createClass({ let Breadcrumb = React.createClass({ contextTypes: { - router: React.PropTypes.func.isRequired + router: React.PropTypes.func }, render() { var crumbs, routes, params; @@ -35,7 +35,7 @@ let Breadcrumb = React.createClass({ } else { link = {name}; } - return {link}; + return {link}; }); } else { crumbs = this.props.children; From c27921f94f2aa6ee6a1863405cb3529634856922 Mon Sep 17 00:00:00 2001 From: yiminghe Date: Thu, 9 Jul 2015 18:24:29 +0800 Subject: [PATCH 4/4] add console --- site/templates/layout.html | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/site/templates/layout.html b/site/templates/layout.html index 333152c4ce..6d22f97e5c 100644 --- a/site/templates/layout.html +++ b/site/templates/layout.html @@ -14,6 +14,25 @@ {% block styles %}{% endblock %} +