From a2ad793ff7a0de2de24089cbf4d589e2e82323ad Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 9 Jun 2015 17:30:03 +0800 Subject: [PATCH 1/8] disable unfinished link in top nav --- site/templates/layout.html | 9 +++------ static/style.css | 6 ++++++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/site/templates/layout.html b/site/templates/layout.html index 8aa57f5eac..2372323ae5 100644 --- a/site/templates/layout.html +++ b/site/templates/layout.html @@ -45,16 +45,13 @@ 组件
  • - 设计 + 设计
  • - 模式 + 模式
  • - 案例 -
  • -
  • - 下载 + 案例
  • diff --git a/static/style.css b/static/style.css index 25f5d5f60c..6f4cc958cc 100644 --- a/static/style.css +++ b/static/style.css @@ -247,6 +247,12 @@ a.logo { display: block; } +.nav ul li a.disabled { + cursor: not-allowed; + color: #ddd !important; + pointer-events: none; +} + .nav ul li.current a { color: #71B5DE; font-weight: bold; From 38a6eaecf670403706c44ac84cedfd255a59c0f0 Mon Sep 17 00:00:00 2001 From: yiminghe Date: Tue, 9 Jun 2015 17:44:22 +0800 Subject: [PATCH 2/8] fix tooltip --- components/tooltip/index.jsx | 10 ++-------- style/components/tooltip.less | 2 ++ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/components/tooltip/index.jsx b/components/tooltip/index.jsx index d899d805ee..b051335eb2 100644 --- a/components/tooltip/index.jsx +++ b/components/tooltip/index.jsx @@ -2,12 +2,6 @@ var React = require('react'); var Tooltip = require('rc-tooltip'); module.exports = React.createClass({ - getInitialState: function () { - var state = {}; - state.placement = this.props.placement; - state.title = this.props.title; - return state; - }, getDefaultProps: function () { return { placement: 'top' @@ -15,10 +9,10 @@ module.exports = React.createClass({ }, render: function() { return ( - + overlay={this.props.title}> {this.props.children} ); diff --git a/style/components/tooltip.less b/style/components/tooltip.less index f68d2b459c..3dc03471c7 100644 --- a/style/components/tooltip.less +++ b/style/components/tooltip.less @@ -24,6 +24,8 @@ z-index: 1070; display: block; visibility: visible; + left:-9999px; + top:-9999px; font-size: @font-size-base; line-height: 1.5; From 5eda4608f76480b26333d60eeeac977bb5d34868 Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 9 Jun 2015 17:54:19 +0800 Subject: [PATCH 3/8] remove font-family in calendar style --- style/components/datepicker/Calendar.less | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/style/components/datepicker/Calendar.less b/style/components/datepicker/Calendar.less index 9a84fccc34..b9052259ff 100644 --- a/style/components/datepicker/Calendar.less +++ b/style/components/datepicker/Calendar.less @@ -1,7 +1,6 @@ .@{prefixCalendarClass} { position: relative; outline: none; - font-family: Arial, "Hiragino Sans GB", "Microsoft Yahei", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; width: 253px; border: 1px solid #ccc; list-style: none; @@ -193,4 +192,4 @@ color: #23c0fa; } } -} \ No newline at end of file +} From 73e1b08de9ff949a2b913d913ee6ee24f7711fa9 Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 9 Jun 2015 17:58:28 +0800 Subject: [PATCH 4/8] fix variable in tooltip --- style/components/tooltip.less | 8 ++++---- style/themes/default/custom.less | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/style/components/tooltip.less b/style/components/tooltip.less index 3dc03471c7..29c2da4b02 100644 --- a/style/components/tooltip.less +++ b/style/components/tooltip.less @@ -24,10 +24,10 @@ z-index: 1070; display: block; visibility: visible; - left:-9999px; - top:-9999px; + left: -9999px; + top: -9999px; font-size: @font-size-base; - line-height: 1.5; + line-height: @line-height-base; &-placement-top { margin-top: -3px; padding: @tooltip-arrow-width 0; } &-placement-right { margin-left: 3px; padding: 0 @tooltip-arrow-width; } @@ -43,7 +43,7 @@ text-align: left; text-decoration: none; background-color: @tooltip-bg; - border-radius: 6px; + border-radius: @border-radius-base; box-shadow: 0 0 4px rgba(0,0,0,0.4); } diff --git a/style/themes/default/custom.less b/style/themes/default/custom.less index 838e5056c7..69abbc4203 100644 --- a/style/themes/default/custom.less +++ b/style/themes/default/custom.less @@ -79,3 +79,5 @@ @btn-circle-size-lg : 32px; @btn-circle-size-sm : 22px; +@border-radius-base : 6px; + From 279091f49ab11c1b32fb1603d5aaa0993aeb5be2 Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 9 Jun 2015 18:03:50 +0800 Subject: [PATCH 5/8] update npmignore --- .npmignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.npmignore b/.npmignore index d1ed422d0a..039dce92d1 100644 --- a/.npmignore +++ b/.npmignore @@ -4,3 +4,4 @@ node_modules theme static _site +site From 88800524ddca78dce75c66baf295588521fd69ee Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 9 Jun 2015 18:04:06 +0800 Subject: [PATCH 6/8] border-radius-base --- style/themes/default/custom.less | 1 - 1 file changed, 1 deletion(-) diff --git a/style/themes/default/custom.less b/style/themes/default/custom.less index 69abbc4203..3b5db49339 100644 --- a/style/themes/default/custom.less +++ b/style/themes/default/custom.less @@ -80,4 +80,3 @@ @btn-circle-size-sm : 22px; @border-radius-base : 6px; - From 7e142a7aa56459aa19dd2a5a8ce6ecac72983ce8 Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 9 Jun 2015 18:08:56 +0800 Subject: [PATCH 7/8] update Dropdown demo code style --- components/dropdown/demo/event.md | 6 ++---- components/dropdown/demo/trigger.md | 26 ++++++++++++-------------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/components/dropdown/demo/event.md b/components/dropdown/demo/event.md index 344aea196b..b153c0dd15 100644 --- a/components/dropdown/demo/event.md +++ b/components/dropdown/demo/event.md @@ -9,10 +9,9 @@ ````jsx var Menu = antd.Menu; var Dropdown = antd.Dropdown; - -function onClick(key){ +var onClick = function (key){ alert('选中了菜单' + key); -} +}; var menu = 第一个菜单项 @@ -21,7 +20,6 @@ var menu = 第四个菜单项 ; - React.render( - - - - - -, document.getElementById('components-dropdown-demo-trigger')); +React.render(
    + + + + + + +
    , document.getElementById('components-dropdown-demo-trigger')); ```` From b4bb565422e23d79f66edf81e4fe0f2abc90e43d Mon Sep 17 00:00:00 2001 From: simaQ Date: Tue, 9 Jun 2015 18:09:47 +0800 Subject: [PATCH 8/8] clean fc- prefix --- style/core/iconfont.less | 2 +- style/core/motion.less | 184 +++++++++++++++---------------- style/mixins/button.less | 4 +- style/themes/default/custom.less | 38 +++---- 4 files changed, 114 insertions(+), 114 deletions(-) diff --git a/style/core/iconfont.less b/style/core/iconfont.less index fbf3a593a3..88dd28c702 100644 --- a/style/core/iconfont.less +++ b/style/core/iconfont.less @@ -156,7 +156,7 @@ .@{iconfont-css-prefix}-windows:before {content:"\e66c";} .@{iconfont-css-prefix}-loading:before { display: inline-block; - .animation(loadingCircle @fc-duration-1000 infinite linear); + .animation(loadingCircle @duration-1000 infinite linear); content:"\e610"; } diff --git a/style/core/motion.less b/style/core/motion.less index e5d05ecab4..c5651b6387 100644 --- a/style/core/motion.less +++ b/style/core/motion.less @@ -5,10 +5,10 @@ // Fade - 透明度从 0 到 1,从 1 到 0 .fade { - -webkit-animation-timing-function: @fc-ease-in; - -webkit-animation-duration: @fc-duration-600; - animation-timing-function: @fc-ease-in; - animation-duration: @fc-duration-600; + -webkit-animation-timing-function: @ease-in; + -webkit-animation-duration: @duration-600; + animation-timing-function: @ease-in; + animation-duration: @duration-600; &.ng-enter, &.fade-add, @@ -88,12 +88,12 @@ // zoom - 从中心点放大、缩小 .zoom { - -webkit-animation-timing-function: @fc-ease-in; + -webkit-animation-timing-function: @ease-in; -webkit-animation-fill-mode: backwards; - -webkit-animation-duration: @fc-duration-600; - animation-timing-function: @fc-ease-in; + -webkit-animation-duration: @duration-600; + animation-timing-function: @ease-in; animation-fill-mode: backwards; - animation-duration: @fc-duration-600; + animation-duration: @duration-600; &.ng-enter, &.zoom-add, @@ -134,12 +134,12 @@ } .zoom-left { - -webkit-animation-timing-function: @fc-ease-in-out; + -webkit-animation-timing-function: @ease-in-out; -webkit-animation-fill-mode: backwards; - -webkit-animation-duration: @fc-duration-500; - animation-timing-function: @fc-ease-in-out; + -webkit-animation-duration: @duration-500; + animation-timing-function: @ease-in-out; animation-fill-mode: backwards; - animation-duration: @fc-duration-500; + animation-duration: @duration-500; &.ng-enter, &.zoom-left-add, @@ -179,12 +179,12 @@ } } .zoom-right { - -webkit-animation-timing-function: @fc-ease-in-out; + -webkit-animation-timing-function: @ease-in-out; -webkit-animation-fill-mode: backwards; - -webkit-animation-duration: @fc-duration-500; - animation-timing-function: @fc-ease-in-out; + -webkit-animation-duration: @duration-500; + animation-timing-function: @ease-in-out; animation-fill-mode: backwards; - animation-duration: @fc-duration-500; + animation-duration: @duration-500; &.ng-enter, &.zoom-right-add, @@ -225,12 +225,12 @@ } .zoom-up { - -webkit-animation-timing-function: @fc-ease-in-out; + -webkit-animation-timing-function: @ease-in-out; -webkit-animation-fill-mode: backwards; - -webkit-animation-duration: @fc-duration-500; - animation-timing-function: @fc-ease-in-out; + -webkit-animation-duration: @duration-500; + animation-timing-function: @ease-in-out; animation-fill-mode: backwards; - animation-duration: @fc-duration-500; + animation-duration: @duration-500; &.ng-enter, &.zoom-up-add, @@ -271,12 +271,12 @@ } .zoom-down { - -webkit-animation-timing-function: @fc-ease-in-out; + -webkit-animation-timing-function: @ease-in-out; -webkit-animation-fill-mode: backwards; - -webkit-animation-duration: @fc-duration-500; - animation-timing-function: @fc-ease-in-out; + -webkit-animation-duration: @duration-500; + animation-timing-function: @ease-in-out; animation-fill-mode: backwards; - animation-duration: @fc-duration-500; + animation-duration: @duration-500; &.ng-enter, &.zoom-down-add, @@ -317,12 +317,12 @@ } .zoom-arr12 { - -webkit-animation-timing-function: @fc-ease-in; + -webkit-animation-timing-function: @ease-in; -webkit-animation-fill-mode: backwards; - -webkit-animation-duration: @fc-duration-500; - animation-timing-function: @fc-ease-in; + -webkit-animation-duration: @duration-500; + animation-timing-function: @ease-in; animation-fill-mode: backwards; - animation-duration: @fc-duration-500; + animation-duration: @duration-500; &.ng-enter, &.zoom-arr12-add, @@ -345,12 +345,12 @@ } .zoom-arr1 { - -webkit-animation-timing-function: @fc-ease-in; + -webkit-animation-timing-function: @ease-in; -webkit-animation-fill-mode: backwards; - -webkit-animation-duration: @fc-duration-500; - animation-timing-function: @fc-ease-in; + -webkit-animation-duration: @duration-500; + animation-timing-function: @ease-in; animation-fill-mode: backwards; - animation-duration: @fc-duration-500; + animation-duration: @duration-500; &.ng-enter, &.zoom-arr1-add, @@ -373,12 +373,12 @@ } .zoom-arr3 { - -webkit-animation-timing-function: @fc-ease-in; + -webkit-animation-timing-function: @ease-in; -webkit-animation-fill-mode: backwards; - -webkit-animation-duration: @fc-duration-500; - animation-timing-function: @fc-ease-in; + -webkit-animation-duration: @duration-500; + animation-timing-function: @ease-in; animation-fill-mode: backwards; - animation-duration: @fc-duration-500; + animation-duration: @duration-500; &.ng-enter, &.zoom-arr3-add, @@ -401,12 +401,12 @@ } .zoom-arr5 { - -webkit-animation-timing-function: @fc-ease-in; + -webkit-animation-timing-function: @ease-in; -webkit-animation-fill-mode: backwards; - -webkit-animation-duration: @fc-duration-500; - animation-timing-function: @fc-ease-in; + -webkit-animation-duration: @duration-500; + animation-timing-function: @ease-in; animation-fill-mode: backwards; - animation-duration: @fc-duration-500; + animation-duration: @duration-500; &.ng-enter, &.zoom-arr5-add, @@ -429,12 +429,12 @@ } .zoom-arr6 { - -webkit-animation-timing-function: @fc-ease-in; + -webkit-animation-timing-function: @ease-in; -webkit-animation-fill-mode: backwards; - -webkit-animation-duration: @fc-duration-500; - animation-timing-function: @fc-ease-in; + -webkit-animation-duration: @duration-500; + animation-timing-function: @ease-in; animation-fill-mode: backwards; - animation-duration: @fc-duration-500; + animation-duration: @duration-500; &.ng-enter, &.zoom-arr6-add, @@ -456,12 +456,12 @@ } } .zoom-arr7 { - -webkit-animation-timing-function: @fc-ease-in; + -webkit-animation-timing-function: @ease-in; -webkit-animation-fill-mode: backwards; - -webkit-animation-duration: @fc-duration-500; - animation-timing-function: @fc-ease-in; + -webkit-animation-duration: @duration-500; + animation-timing-function: @ease-in; animation-fill-mode: backwards; - animation-duration: @fc-duration-500; + animation-duration: @duration-500; &.ng-enter, &.zoom-arr7-add, @@ -485,12 +485,12 @@ } .zoom-arr9 { - -webkit-animation-timing-function: @fc-ease-in; + -webkit-animation-timing-function: @ease-in; -webkit-animation-fill-mode: backwards; - -webkit-animation-duration: @fc-duration-500; - animation-timing-function: @fc-ease-in; + -webkit-animation-duration: @duration-500; + animation-timing-function: @ease-in; animation-fill-mode: backwards; - animation-duration: @fc-duration-500; + animation-duration: @duration-500; &.ng-enter, &.zoom-arr9-add, @@ -512,12 +512,12 @@ } } .zoom-arr11 { - -webkit-animation-timing-function: @fc-ease-in; + -webkit-animation-timing-function: @ease-in; -webkit-animation-fill-mode: backwards; - -webkit-animation-duration: @fc-duration-500; - animation-timing-function: @fc-ease-in; + -webkit-animation-duration: @duration-500; + animation-timing-function: @ease-in; animation-fill-mode: backwards; - animation-duration: @fc-duration-500; + animation-duration: @duration-500; &.ng-enter, &.zoom-arr11-add, @@ -983,12 +983,12 @@ } // puff - 从本身放大、缩小 .puff { - -webkit-animation-timing-function: @fc-ease-in; + -webkit-animation-timing-function: @ease-in; -webkit-animation-fill-mode: backwards; - -webkit-animation-duration: @fc-duration-500; - animation-timing-function: @fc-ease-in; + -webkit-animation-duration: @duration-500; + animation-timing-function: @ease-in; animation-fill-mode: backwards; - animation-duration: @fc-duration-500; + animation-duration: @duration-500; &.ng-enter, &.puff-add, @@ -1093,12 +1093,12 @@ .rotate-down { -webkit-backface-visibility: visible !important; backface-visibility: visible !important; - -webkit-animation-timing-function: @fc-ease-out; + -webkit-animation-timing-function: @ease-out; -webkit-animation-fill-mode: backwards; - -webkit-animation-duration: @fc-duration-400; - animation-timing-function: @fc-ease-out; + -webkit-animation-duration: @duration-400; + animation-timing-function: @ease-out; animation-fill-mode: backwards; - animation-duration: @fc-duration-400; + animation-duration: @duration-400; &.ng-enter, &.rotate-down-add, @@ -1143,12 +1143,12 @@ .rotate-up { -webkit-backface-visibility: visible !important; backface-visibility: visible !important; - -webkit-animation-timing-function: @fc-ease-out; + -webkit-animation-timing-function: @ease-out; -webkit-animation-fill-mode: backwards; - -webkit-animation-duration: @fc-duration-400; - animation-timing-function: @fc-ease-out; + -webkit-animation-duration: @duration-400; + animation-timing-function: @ease-out; animation-fill-mode: backwards; - animation-duration: @fc-duration-400; + animation-duration: @duration-400; &.ng-enter, &.rotate-up-add, @@ -1189,12 +1189,12 @@ .rotate-left { -webkit-backface-visibility: visible !important; backface-visibility: visible !important; - -webkit-animation-timing-function: @fc-ease-out; + -webkit-animation-timing-function: @ease-out; -webkit-animation-fill-mode: backwards; - -webkit-animation-duration: @fc-duration-400; - animation-timing-function: @fc-ease-out; + -webkit-animation-duration: @duration-400; + animation-timing-function: @ease-out; animation-fill-mode: backwards; - animation-duration: @fc-duration-400; + animation-duration: @duration-400; &.ng-enter, &.rotate-left-add, @@ -1236,12 +1236,12 @@ .rotate-right { -webkit-backface-visibility: visible !important; backface-visibility: visible !important; - -webkit-animation-timing-function: @fc-ease-out; + -webkit-animation-timing-function: @ease-out; -webkit-animation-fill-mode: backwards; - -webkit-animation-duration: @fc-duration-400; - animation-timing-function: @fc-ease-out; + -webkit-animation-duration: @duration-400; + animation-timing-function: @ease-out; animation-fill-mode: backwards; - animation-duration: @fc-duration-400; + animation-duration: @duration-400; &.ng-enter, &.rotate-right-add, @@ -1494,12 +1494,12 @@ // Slide - 滑动 .slide-down { - -webkit-animation-timing-function: @fc-ease-in; + -webkit-animation-timing-function: @ease-in; -webkit-animation-fill-mode: backwards; - -webkit-animation-duration: @fc-duration-600; - animation-timing-function: @fc-ease-in; + -webkit-animation-duration: @duration-600; + animation-timing-function: @ease-in; animation-fill-mode: backwards; - animation-duration: @fc-duration-600; + animation-duration: @duration-600; &.ng-enter, &.slide-down-add, @@ -1539,12 +1539,12 @@ } } .slide-left { - -webkit-animation-timing-function: @fc-ease-in; + -webkit-animation-timing-function: @ease-in; -webkit-animation-fill-mode: backwards; - -webkit-animation-duration: @fc-duration-600; - animation-timing-function: @fc-ease-in; + -webkit-animation-duration: @duration-600; + animation-timing-function: @ease-in; animation-fill-mode: backwards; - animation-duration: @fc-duration-600; + animation-duration: @duration-600; &.ng-enter, &.slide-left-add, @@ -1584,12 +1584,12 @@ } } .slide-right { - -webkit-animation-timing-function: @fc-ease-in; + -webkit-animation-timing-function: @ease-in; -webkit-animation-fill-mode: backwards; - -webkit-animation-duration: @fc-duration-600; - animation-timing-function: @fc-ease-in; + -webkit-animation-duration: @duration-600; + animation-timing-function: @ease-in; animation-fill-mode: backwards; - animation-duration: @fc-duration-600; + animation-duration: @duration-600; &.ng-enter, &.slide-right-add, @@ -1629,12 +1629,12 @@ } } .slide-up { - -webkit-animation-timing-function: @fc-ease-in; + -webkit-animation-timing-function: @ease-in; -webkit-animation-fill-mode: backwards; - -webkit-animation-duration: @fc-duration-600; - animation-timing-function: @fc-ease-in; + -webkit-animation-duration: @duration-600; + animation-timing-function: @ease-in; animation-fill-mode: backwards; - animation-duration: @fc-duration-600; + animation-duration: @duration-600; &.ng-enter, &.slide-up-add, diff --git a/style/mixins/button.less b/style/mixins/button.less index 0be3f01bc5..b503c74043 100644 --- a/style/mixins/button.less +++ b/style/mixins/button.less @@ -88,7 +88,7 @@ line-height: @line-height-base; .button-size(@btn-padding-base; @font-size-base; @btn-border-radius-base); .user-select(none); - .transition(all .4s @fc-ease-in-out); + .transition(all .4s @ease-in-out); -webkit-transform: translate3d(0, 0, 0); > .@{iconfont-css-prefix} { @@ -196,7 +196,7 @@ border-radius: 50% 50%; content: " "; .scale(0, 0); - .transition(all @fc-duration-300 @fc-ease-in-out); + .transition(all @duration-300 @ease-in-out); z-index: 0; background-color: @primary-color; } diff --git a/style/themes/default/custom.less b/style/themes/default/custom.less index 3b5db49339..d8d79ce20d 100644 --- a/style/themes/default/custom.less +++ b/style/themes/default/custom.less @@ -26,25 +26,25 @@ @cursor-disabled : not-allowed; // Animation -@fc-duration-300 : .3s; -@fc-duration-400 : .4s; -@fc-duration-500 : .5s; -@fc-duration-600 : .6s; -@fc-duration-700 : .7s; -@fc-duration-800 : .8s; -@fc-duration-900 : .9s; -@fc-duration-1000 : 1.0s; -@fc-duration-1100 : 1.1s; -@fc-duration-1200 : 1.2s; -@fc-ease-out : cubic-bezier(0.25, 0.8, 0.25, 1); -@fc-ease-in : cubic-bezier(0.55, 0, 0.55, 0.2); -@fc-ease-in-out : cubic-bezier(0.35, 0, 0.25, 1); -@fc-ease-out-back : cubic-bezier(0.18, 0.89, 0.32, 1.28); -@fc-ease-in-back : cubic-bezier(0.6, -0.3, 0.74, 0.05); -@fc-ease-in-out-back : cubic-bezier(0.68, -0.55, 0.27, 1.55); -@fc-ease-out-circ : cubic-bezier(0.08, 0.82, 0.17, 1); -@fc-ease-in-circ : cubic-bezier(0.6, 0.04, 0.98, 0.34); -@fc-ease-in-out-circ : cubic-bezier(0.78, 0.14, 0.15, 0.86); +@duration-300 : .3s; +@duration-400 : .4s; +@duration-500 : .5s; +@duration-600 : .6s; +@duration-700 : .7s; +@duration-800 : .8s; +@duration-900 : .9s; +@duration-1000 : 1.0s; +@duration-1100 : 1.1s; +@duration-1200 : 1.2s; +@ease-out : cubic-bezier(0.25, 0.8, 0.25, 1); +@ease-in : cubic-bezier(0.55, 0, 0.55, 0.2); +@ease-in-out : cubic-bezier(0.35, 0, 0.25, 1); +@ease-out-back : cubic-bezier(0.18, 0.89, 0.32, 1.28); +@ease-in-back : cubic-bezier(0.6, -0.3, 0.74, 0.05); +@ease-in-out-back : cubic-bezier(0.68, -0.55, 0.27, 1.55); +@ease-out-circ : cubic-bezier(0.08, 0.82, 0.17, 1); +@ease-in-circ : cubic-bezier(0.6, 0.04, 0.98, 0.34); +@ease-in-out-circ : cubic-bezier(0.78, 0.14, 0.15, 0.86); // BUTTONS @btn-font-weight : normal;