diff --git a/css/basic-elem.css b/css/basic-elem.css index 5dc37b0..6d4fed6 100644 --- a/css/basic-elem.css +++ b/css/basic-elem.css @@ -1 +1 @@ -.do-ui-button{display:inline-block;padding:0 5px;border:1px solid #ddd;text-align:center;font-size:12px;background:none;cursor:pointer;transition:all .1s ease-in-out}.do-ui-button.medium{min-width:100px;height:35px;padding:0 8px;line-height:35px;font-size:15px}.do-ui-button.large{min-width:150px;height:50px;padding:0 13px;line-height:50px;font-size:18px}.do-ui-button.radius-3{border-radius:3px}.do-ui-button.radius-5{border-radius:5px}.do-ui-button.green{border:0;background:#1abc9c;color:#fff}.do-ui-button.green:hover{background:#48c9b0}.do-ui-button.green:active{background:#16a085}.do-ui-button.blue{border:0;background:#3498db;color:#fff}.do-ui-button.blue:hover{background:#5dade2}.do-ui-button.blue:active{background:#2c81ba}.do-ui-button.red{border:0;background:#e74c3c;color:#fff}.do-ui-button.red:hover{background:#ec7063}.do-ui-button.red:active{background:#c54133}.do-ui-button.orange{border:0;background:#f39c12;color:#fff}.do-ui-button.orange:hover{background:#fbbb56}.do-ui-button.orange:active{background:#e67e22}.do-ui-button.plain{border:0;background:#e7e8eb;color:#34495e}.do-ui-button.plain:hover{background:#ecf0f1}.do-ui-button.plain:active{background:#bdc3c7}.do-ui-button.grey{border:0;background:#34495e;color:#fff}.do-ui-button.grey:hover{background:#5d6d7e}.do-ui-button.grey:active{background:#2c3e50}.do-ui-button.disabled{border-color:#e7e8eb;color:#bdc3c7;cursor:not-allowed}.do-ui-button.medium.with-style,.do-ui-button.large.with-style{position:relative;padding-right:43px}.do-ui-button.medium.with-style::after,.do-ui-button.large.with-style::after{position:absolute;right:0;top:0;width:35px;text-align:center;background:rgba(0,0,0,0.2);font-family:"ui font" !important;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.do-ui-button.large.with-style{padding-right:58px}.do-ui-button.large.with-style::after{width:50px}.do-ui-button.icon-del::after{content:"\e6f0"}.do-ui-button.icon-add::after{content:"\e64c"}.do-ui-button.icon-send::after{content:"\e64b"}.do-ui-button.icon-confirm::after{content:"\e60f"}.do-ui-button.icon-share::after{content:"\e631"}.do-ui-button.icon-bad::after{content:"\e8ee"}.do-ui-button.icon-good::after{content:"\e62d"}.do-ui-button.icon-download::after{content:"\e611"}.do-ui-button.icon-upload::after{content:"\e6f7"}.do-ui-button.icon-mac::after{content:"\e60a"}.do-ui-button.icon-ios::after{content:"\e609"}.do-ui-button.icon-windows::after{content:"\e601"}.do-ui-button.icon-linux::after{content:"\e602"}.do-ui-button.icon-android::after{content:"\e600"}.do-ui-input{position:relative;min-height:30px;padding:0 5px;border:1px solid #bdc3c7;background:#fff;color:#34495e;outline:none;transition:all .1s ease-in-out}.do-ui-input::-webkit-input-placeholder{color:#bdc3c7}.do-ui-input.area{padding:5px}.do-ui-input.radius-3{border-radius:3px}.do-ui-input.radius-5{border-radius:5px}.do-ui-input:focus,.do-ui-input:hover{border-color:#1abc9c;color:#1abc9c}.do-ui-input.alert{border-color:#e74c3c;color:#e74c3c}.do-ui-input.alert input{color:#e74c3c}.do-ui-input.disabled{border-color:transparent;background:#e7e8eb;color:#bdc3c7}.do-ui-input.with-style{display:inline-block;padding:0}.do-ui-input.with-style input{width:100%;height:100%;min-height:30px;padding:0 30px 0 5px;border:0;background:transparent}.do-ui-input.with-style::after{position:absolute;right:0;top:0;width:35px;height:30px;line-height:30px;text-align:center;font-family:"ui font" !important;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.do-ui-input.with-style.icon-user::after{content:"\e6f4"}.do-ui-input.with-style.icon-pwd::after{content:"\e655"}.do-ui-input.with-style.icon-mail::after{content:"\e66e"}.do-ui-input.with-style.icon-date::after{content:"\e650"}.do-ui-input.with-style.icon-phone::after{content:"\e651"}.do-ui-select{display:inline-block;min-height:30px;padding:0 25px 0 5px;border:1px solid #bdc3c7;background:#fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAQCAMAAADOBMQXAAAAFVBMVEUAAAD///8wMDAwMDAyMjIzMzMyMjLeZPLMAAAAB3RSTlMAABAwkLDARx1RgwAAAD9JREFUeAGlz0UChFAAgFB+3v/GMwZ2K8u3g7DXI40s6zWnuaXaK7IYVVlElUV14lQik8opw6SyiCqLXB9/0D/ZNQE+FhzMpgAAAABJRU5ErkJggg==) no-repeat right 6px;color:#34495e;outline:none;-webkit-appearance:none;-moz-appearance:none;transition:all .1s ease-in-out}.do-ui-select::-ms-expand{display:none}.do-ui-select.radius-3{border-radius:3px}.do-ui-select.radius-5{border-radius:5px}.do-ui-select:focus{border-color:#1abc9c}.do-ui-select.alert{border-color:#e74c3c;color:#e74c3c}.do-ui-select.disabled{border-color:transparent;background:#e7e8eb;color:#bdc3c7}.do-ui-radio,.do-ui-checkbox{display:inline-block;position:relative;width:auto;height:auto;min-height:30px;padding-left:35px;line-height:30px;border-radius:3px;color:#34495e}.do-ui-radio{padding-left:50px}.do-ui-radio>input{position:absolute;left:10px;top:10px;width:35px;height:10px;border-radius:10px;border:0;background:#bdc3c7;-webkit-appearance:none;-moz-appearance:none}.do-ui-radio>input:checked{background:#bdc3c7}.do-ui-radio>input:disabled{background:#ecf0f1}.do-ui-radio>input:disabled:checked{background:#bdc3c7}.do-ui-radio>input::after{position:absolute;display:block;left:-2px;top:-5px;width:20px;height:20px;border-radius:50%;content:"";background:#ecf0f1;box-shadow:0 1px 2px rgba(0,0,0,0.2)}.do-ui-radio>input:checked::after{left:auto;right:-2px;background:#5d6d7e}.do-ui-radio>input:checked:disabled::after{background:#bdc3c7}.do-ui-radio.green>input:checked{background:#48c9b0}.do-ui-radio.green>input:checked::after{background:#16a085}.do-ui-radio.blue>input:checked{background:#5dade2}.do-ui-radio.blue>input:checked::after{background:#2c81ba}.do-ui-radio.red>input:checked{background:#ec7063}.do-ui-radio.red>input:checked::after{background:#c54133}.do-ui-radio.orange>input:checked{background:#fbbb56}.do-ui-radio.orange>input:checked::after{background:#e67e22}.do-ui-radio.grey>input:checked{background:#5d6d7e}.do-ui-radio.grey>input:checked::after{background:#2c3e50}.do-ui-radio.disabled{color:#bdc3c7}.do-ui-checkbox>input{position:absolute;left:2px;top:2px;width:26px;height:26px;line-height:22px;border:2px solid #bdc3c7;border-radius:3px;text-align:center;font-size:18px;font-family:"ui font" !important;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-appearance:none;-moz-appearance:none}.do-ui-checkbox>input:checked::after{content:"\e60f"}.do-ui-checkbox>input:disabled{border-color:#bdc3c7;color:#bdc3c7}.do-ui-checkbox.green>input{color:#1abc9c !important;border-color:#1abc9c}.do-ui-checkbox.blue>input{color:#3498db !important;border-color:#3498db}.do-ui-checkbox.red>input{color:#e74c3c !important;border-color:#e74c3c}.do-ui-checkbox.orange>input{color:#f39c12 !important;border-color:#f39c12}.do-ui-checkbox.grey>input{color:#34495e !important;border-color:#34495e}.do-ui-checkbox.disabled{color:#bdc3c7}.do-ui-checkbox.with-style{padding-left:5px;padding-right:35px;line-height:26px;border:2px solid #e7e8eb;background:#e7e8eb;text-align:center}.do-ui-checkbox.with-style>input{left:auto;right:0;top:0;line-height:26px;border:0;background:#fff;color:#5d6d7e}.do-ui-checkbox.with-style>input:disabled{color:#bdc3c7 !important}.do-ui-checkbox.with-style.green{border-color:#1abc9c;background:#1abc9c;color:#fff}.do-ui-checkbox.with-style.blue{border-color:#3498db;background:#3498db;color:#fff}.do-ui-checkbox.with-style.red{border-color:#e74c3c;background:#e74c3c;color:#fff}.do-ui-checkbox.with-style.orange{border-color:#f39c12;background:#f39c12;color:#fff}.do-ui-checkbox.with-style.grey{border-color:#34495e;background:#34495e;color:#fff}.do-ui-checkbox.with-style.disabled{border-color:#e7e8eb;background:#e7e8eb;color:#bdc3c7}.do-ui-quote{display:block;position:relative;min-height:60px;margin:10px 0;padding:15px 5px 5px 50px;border:1px solid #ddd;border-radius:10px;background:#f7f7f7;word-break:break-all}.do-ui-quote::before{position:absolute;left:8px;top:0;font:30px/1.5 "ui font";color:#bdc3c7;content:"\e61b"}.do-ui-warn,.do-ui-mark{display:inline-block;position:relative;min-height:50px;margin:10px 0;padding:8px 8px 8px 50px;border:1px solid #f39c12;border-radius:10px;background:#fffbed;color:#e67e22;word-break:break-all}.do-ui-warn p,.do-ui-mark p{margin:0 !important}.do-ui-warn::before,.do-ui-mark::before{position:absolute;left:8px;top:0;font:30px/1.5 "ui font";color:#e74c3c;content:"\e6f6"}.do-ui-mark{border-color:#48c9b0;color:#16a085;background:#edfbf8}.do-ui-mark::before{color:#16a085;content:"\e657"} +.do-ui-button{display:inline-block;padding:0 5px;border:1px solid #ddd;text-align:center;font-size:12px;background:none;cursor:pointer;transition:all .1s ease-in-out}.do-ui-button.medium{min-width:100px;height:35px;padding:0 8px;line-height:35px;font-size:15px}.do-ui-button.large{min-width:150px;height:50px;padding:0 13px;line-height:50px;font-size:18px}.do-ui-button.radius-3{border-radius:3px}.do-ui-button.radius-5{border-radius:5px}.do-ui-button.teal{border:0;background:#1abc9c;color:#fff}.do-ui-button.teal:hover{background:#48c9b0}.do-ui-button.teal:active{background:#16a085}.do-ui-button.green{border:0;background:#4caf50;color:#fff}.do-ui-button.green:hover{background:#81c784}.do-ui-button.green:active{background:#388e3c}.do-ui-button.blue{border:0;background:#2196f3;color:#fff}.do-ui-button.blue:hover{background:#64b5f6}.do-ui-button.blue:active{background:#1976d2}.do-ui-button.purple{border:0;background:#651fff;color:#fff}.do-ui-button.purple:hover{background:#7c4dff}.do-ui-button.purple:active{background:#6200ea}.do-ui-button.red{border:0;background:#ff5722;color:#fff}.do-ui-button.red:hover{background:#ff7043}.do-ui-button.red:active{background:#e64a19}.do-ui-button.orange{border:0;background:#ff9800;color:#fff}.do-ui-button.orange:hover{background:#ffa726}.do-ui-button.orange:active{background:#f57c00}.do-ui-button.plain{border:0;background:#e7e8eb;color:#546e7a}.do-ui-button.plain:hover{background:#ecf0f1}.do-ui-button.plain:active{background:#bdc3c7}.do-ui-button.grey{border:0;background:#546e7a;color:#fff}.do-ui-button.grey:hover{background:#607d8b}.do-ui-button.grey:active{background:#37474f}.do-ui-button.disabled{border-color:#e7e8eb;color:#bdc3c7;cursor:not-allowed}.do-ui-button.medium.with-style,.do-ui-button.large.with-style{position:relative;padding-right:43px}.do-ui-button.medium.with-style::after,.do-ui-button.large.with-style::after{position:absolute;right:0;top:0;width:35px;text-align:center;background:rgba(0,0,0,0.2);font-family:"ui font" !important;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.do-ui-button.large.with-style{padding-right:58px}.do-ui-button.large.with-style::after{width:50px}.do-ui-button.icon-del::after{content:"\e6f0"}.do-ui-button.icon-add::after{content:"\e64c"}.do-ui-button.icon-send::after{content:"\e64b"}.do-ui-button.icon-confirm::after{content:"\e60f"}.do-ui-button.icon-share::after{content:"\e631"}.do-ui-button.icon-bad::after{content:"\e8ee"}.do-ui-button.icon-good::after{content:"\e62d"}.do-ui-button.icon-download::after{content:"\e611"}.do-ui-button.icon-upload::after{content:"\e6f7"}.do-ui-button.icon-mac::after{content:"\e60a"}.do-ui-button.icon-ios::after{content:"\e609"}.do-ui-button.icon-windows::after{content:"\e601"}.do-ui-button.icon-linux::after{content:"\e602"}.do-ui-button.icon-android::after{content:"\e600"}.do-ui-input{position:relative;min-height:30px;padding:0 5px;border:1px solid #bdc3c7;background:#fff;color:#546e7a;outline:none;transition:all .1s ease-in-out}.do-ui-input::-webkit-input-placeholder{color:#bdc3c7}.do-ui-input.area{padding:5px}.do-ui-input.radius-3{border-radius:3px}.do-ui-input.radius-5{border-radius:5px}.do-ui-input:focus,.do-ui-input:hover{border-color:#1abc9c}.do-ui-input.alert{border-color:#ff5722;color:#ff5722}.do-ui-input.alert input{color:#ff5722}.do-ui-input.disabled{border-color:transparent;background:#e7e8eb;color:#bdc3c7}.do-ui-input.with-style{display:inline-block;padding:0}.do-ui-input.with-style input{width:100%;height:100%;min-height:30px;padding:0 30px 0 5px;border:0;background:transparent}.do-ui-input.with-style::after{position:absolute;right:0;top:0;width:35px;height:30px;line-height:30px;text-align:center;font-family:"ui font" !important;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.do-ui-input.with-style.icon-user::after{content:"\e6f4"}.do-ui-input.with-style.icon-pwd::after{content:"\e655"}.do-ui-input.with-style.icon-mail::after{content:"\e66e"}.do-ui-input.with-style.icon-date::after{content:"\e650"}.do-ui-input.with-style.icon-phone::after{content:"\e651"}.do-ui-select{display:inline-block;min-height:30px;padding:0 30px 0 10px;border:0;border-bottom:1px solid #e7e7e7;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAMAAABV0m3JAAAADFBMVEUAAAD///+Pj4+JiYkxcGihAAAABHRSTlMAABBwqVQF9wAAADNJREFUeNqlzjEOACAMw8DQ/v/PSE5FFhaEx5usdekBuzRVH0RtCqJYELUFrVjQigX/5jdvzgDh9izlMQAAAABJRU5ErkJggg==) no-repeat right 8px;color:#546e7a;outline:none;-webkit-appearance:none;-moz-appearance:none;transition:all .1s ease-in-out}.do-ui-select::-ms-expand{display:none}.do-ui-select:focus{border-color:#1abc9c}.do-ui-select.alert{border-color:#ff5722;color:#ff5722}.do-ui-select.disabled{border-color:transparent;background:#e7e8eb;color:#bdc3c7}.do-ui-radio,.do-ui-checkbox{display:inline-block;position:relative;width:auto;height:auto;min-height:30px;padding-left:35px;line-height:30px;border-radius:3px;color:#546e7a}.do-ui-radio{padding-left:50px}.do-ui-radio>input{position:absolute;left:10px;top:10px;width:35px;height:10px;border-radius:10px;border:0;background:#bdc3c7;-webkit-appearance:none;-moz-appearance:none}.do-ui-radio>input:checked{background:#bdc3c7}.do-ui-radio>input:disabled{background:#ecf0f1}.do-ui-radio>input:disabled:checked{background:#bdc3c7}.do-ui-radio>input::after{position:absolute;display:block;left:-2px;top:-5px;width:20px;height:20px;border-radius:50%;content:"";background:#ecf0f1;box-shadow:0 1px 2px rgba(0,0,0,0.2)}.do-ui-radio>input:checked::after{left:auto;right:-2px;background:#607d8b}.do-ui-radio>input:checked:disabled::after{background:#bdc3c7}.do-ui-radio.green>input:checked{background:#81c784}.do-ui-radio.green>input:checked::after{background:#388e3c}.do-ui-radio.teal>input:checked{background:#81c784}.do-ui-radio.teal>input:checked::after{background:#16a085}.do-ui-radio.blue>input:checked{background:#64b5f6}.do-ui-radio.blue>input:checked::after{background:#1976d2}.do-ui-radio.purple>input:checked{background:#64b5f6}.do-ui-radio.purple>input:checked::after{background:#6200ea}.do-ui-radio.red>input:checked{background:#ff7043}.do-ui-radio.red>input:checked::after{background:#e64a19}.do-ui-radio.orange>input:checked{background:#ffa726}.do-ui-radio.orange>input:checked::after{background:#f57c00}.do-ui-radio.grey>input:checked{background:#607d8b}.do-ui-radio.grey>input:checked::after{background:#37474f}.do-ui-radio.disabled{color:#bdc3c7}.do-ui-checkbox>input{position:absolute;left:2px;top:2px;width:26px;height:26px;line-height:22px;border:2px solid #bdc3c7;border-radius:3px;text-align:center;font-size:18px;font-family:"ui font" !important;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-appearance:none;-moz-appearance:none}.do-ui-checkbox>input:checked::after{content:"\e60f"}.do-ui-checkbox>input:disabled{border-color:#bdc3c7;color:#bdc3c7}.do-ui-checkbox.green>input{color:#4caf50 !important;border-color:#4caf50}.do-ui-checkbox.teal>input{color:#1abc9c !important;border-color:#1abc9c}.do-ui-checkbox.purple>input{color:#651fff !important;border-color:#651fff}.do-ui-checkbox.blue>input{color:#2196f3 !important;border-color:#2196f3}.do-ui-checkbox.red>input{color:#ff5722 !important;border-color:#ff5722}.do-ui-checkbox.orange>input{color:#ff9800 !important;border-color:#ff9800}.do-ui-checkbox.grey>input{color:#546e7a !important;border-color:#546e7a}.do-ui-checkbox.disabled{color:#bdc3c7}.do-ui-checkbox.with-style{padding-left:5px;padding-right:35px;line-height:26px;border:2px solid #e7e8eb;background:#e7e8eb;text-align:center}.do-ui-checkbox.with-style>input{left:auto;right:0;top:0;line-height:26px;border:0;background:#fff;color:#607d8b}.do-ui-checkbox.with-style>input:disabled{color:#bdc3c7 !important}.do-ui-checkbox.with-style.green{border-color:#4caf50;background:#4caf50;color:#fff}.do-ui-checkbox.with-style.teal{border-color:#1abc9c;background:#1abc9c;color:#fff}.do-ui-checkbox.with-style.purple{border-color:#651fff;background:#651fff;color:#fff}.do-ui-checkbox.with-style.blue{border-color:#2196f3;background:#2196f3;color:#fff}.do-ui-checkbox.with-style.red{border-color:#ff5722;background:#ff5722;color:#fff}.do-ui-checkbox.with-style.orange{border-color:#ff9800;background:#ff9800;color:#fff}.do-ui-checkbox.with-style.grey{border-color:#546e7a;background:#546e7a;color:#fff}.do-ui-checkbox.with-style.disabled{border-color:#e7e8eb;background:#e7e8eb;color:#bdc3c7}.do-ui-quote{display:block;position:relative;min-height:60px;margin:10px 0;padding:15px 5px 5px 50px;border:1px solid #ddd;border-radius:10px;background:#f7f7f7;word-break:break-all}.do-ui-quote::before{position:absolute;left:8px;top:0;font:30px/1.5 "ui font";color:#bdc3c7;content:"\e61b"}.do-ui-warn,.do-ui-mark{display:inline-block;position:relative;min-height:40px;margin:5px 0;padding:5px 8px 5px 50px;border:1px solid #ff9800;border-radius:5px;background:#fffbed;color:#f57c00;word-break:break-all}.do-ui-warn p,.do-ui-mark p{margin:0 !important}.do-ui-warn::before,.do-ui-mark::before{position:absolute;left:15px;top:5px;font:20px/1.5 "ui font";color:#ff5722;content:"\e6f6"}.do-ui-mark{border-color:#48c9b0;color:#16a085;background:#edfbf8}.do-ui-mark::before{color:#16a085;content:"\e657"} diff --git a/css/basic-elem.scss b/css/basic-elem.scss index 58827f0..2f65fe9 100644 --- a/css/basic-elem.scss +++ b/css/basic-elem.scss @@ -16,13 +16,19 @@ &.large {min-width:150px;height:50px;padding:0 13px;line-height:50px;font-size:18px;} &.radius-3 {border-radius:3px;} &.radius-5 {border-radius:5px;} - + + &.teal {border:0;background:nth($ct, 1);color:#fff;} + &.teal:hover {background:nth($ct, 2);} + &.teal:active {background:nth($ct, 3);} &.green {border:0;background:nth($cg, 1);color:#fff;} &.green:hover {background:nth($cg, 2);} &.green:active {background:nth($cg, 3);} &.blue {border:0;background:nth($cb, 1);color:#fff;} &.blue:hover {background:nth($cb, 2);} &.blue:active {background:nth($cb, 3);} + &.purple {border:0;background:nth($cpp, 1);color:#fff;} + &.purple:hover {background:nth($cpp, 2);} + &.purple:active {background:nth($cpp, 3);} &.red {border:0;background:nth($cr, 1);color:#fff;} &.red:hover {background:nth($cr, 2);} &.red:active {background:nth($cr, 3);} @@ -81,7 +87,7 @@ &.radius-3 {border-radius:3px;} &.radius-5 {border-radius:5px;} - &:focus,&:hover {border-color:nth($cg, 1);color:nth($cg, 1);} + &:focus,&:hover {border-color:nth($ct, 1);} &.alert {border-color:nth($cr, 1);color:nth($cr, 1); input {color:nth($cr, 1);} } @@ -103,13 +109,11 @@ /* select框 */ -.do-ui-select {display:inline-block;min-height:30px;padding:0 25px 0 5px;border:1px solid nth($cp, 3);background:#fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAQCAMAAADOBMQXAAAAFVBMVEUAAAD///8wMDAwMDAyMjIzMzMyMjLeZPLMAAAAB3RSTlMAABAwkLDARx1RgwAAAD9JREFUeAGlz0UChFAAgFB+3v/GMwZ2K8u3g7DXI40s6zWnuaXaK7IYVVlElUV14lQik8opw6SyiCqLXB9/0D/ZNQE+FhzMpgAAAABJRU5ErkJggg==) no-repeat right 6px;color:nth($cgr, 1);outline:none;-webkit-appearance:none;-moz-appearance: none;@include ts; +.do-ui-select {display:inline-block;min-height:30px;padding:0 30px 0 10px;border:0;border-bottom:1px solid #e7e7e7;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAMAAABV0m3JAAAADFBMVEUAAAD///+Pj4+JiYkxcGihAAAABHRSTlMAABBwqVQF9wAAADNJREFUeNqlzjEOACAMw8DQ/v/PSE5FFhaEx5usdekBuzRVH0RtCqJYELUFrVjQigX/5jdvzgDh9izlMQAAAABJRU5ErkJggg==) no-repeat right 8px;color:nth($cgr, 1);outline:none;-webkit-appearance:none;-moz-appearance: none;@include ts; &::-ms-expand {display:none;} - &.radius-3 {border-radius:3px;} - &.radius-5 {border-radius:5px;} - &:focus {border-color:nth($cg, 1);} + &:focus {border-color:nth($ct, 1);} &.alert {border-color:nth($cr, 1);color:nth($cr, 1)} &.disabled {border-color:transparent;background:nth($cp, 1);color:nth($cp, 3)} } @@ -133,9 +137,15 @@ &.green >input:checked {background:nth($cg, 2); &::after {background:nth($cg, 3);} } + &.teal >input:checked {background:nth($cg, 2); + &::after {background:nth($ct, 3);} + } &.blue >input:checked {background:nth($cb, 2); &::after {background:nth($cb, 3);} } + &.purple >input:checked {background:nth($cb, 2); + &::after {background:nth($cpp, 3);} + } &.red >input:checked {background:nth($cr, 2); &::after {background:nth($cr, 3);} } @@ -154,6 +164,8 @@ &:disabled {border-color:nth($cp, 3);color:nth($cp, 3);} } &.green >input {color:nth($cg, 1)!important;border-color:nth($cg, 1)} + &.teal >input {color:nth($ct, 1)!important;border-color:nth($ct, 1)} + &.purple >input {color:nth($cpp, 1)!important;border-color:nth($cpp, 1)} &.blue >input {color:nth($cb, 1)!important;border-color:nth($cb, 1)} &.red >input {color:nth($cr, 1)!important;border-color:nth($cr, 1)} &.orange >input {color:nth($co, 1)!important;border-color:nth($co, 1)} @@ -169,6 +181,8 @@ } &.green {border-color:nth($cg, 1);background:nth($cg, 1);color:#fff;} + &.teal {border-color:nth($ct, 1);background:nth($ct, 1);color:#fff;} + &.purple {border-color:nth($cpp, 1);background:nth($cpp, 1);color:#fff;} &.blue {border-color:nth($cb, 1);background:nth($cb, 1);color:#fff;} &.red {border-color:nth($cr, 1);background:nth($cr, 1);color:#fff;} &.orange {border-color:nth($co, 1);background:nth($co, 1);color:#fff;} @@ -185,12 +199,12 @@ } /* 提醒文本 */ -.do-ui-warn,.do-ui-mark {display:inline-block;position:relative;min-height:50px;margin:10px 0;padding:8px 8px 8px 50px;border:1px solid nth($co, 1);border-radius:10px;background:#fffbed;color:nth($co, 3);word-break: break-all; +.do-ui-warn,.do-ui-mark {display:inline-block;position:relative;min-height:40px;margin:5px 0;padding:5px 8px 5px 50px;border:1px solid nth($co, 1);border-radius:5px;background:#fffbed;color:nth($co, 3);word-break: break-all; p {margin:0!important;} - &::before {position:absolute;left:8px;top:0;font:30px/1.5 "ui font";color:nth($cr, 1);content:"\e6f6";} + &::before {position:absolute;left:15px;top:5px;font:20px/1.5 "ui font";color:nth($cr, 1);content:"\e6f6";} } -.do-ui-mark {border-color:nth($cg, 2);color:nth($cg, 3);background:#edfbf8; +.do-ui-mark {border-color:nth($ct, 2);color:nth($ct, 3);background:#edfbf8; - &::before {color:nth($cg, 3);content:"\e657";} + &::before {color:nth($ct, 3);content:"\e657";} } \ No newline at end of file diff --git a/css/var.scss b/css/var.scss index 4f6c98d..a0df148 100644 --- a/css/var.scss +++ b/css/var.scss @@ -1,9 +1,11 @@ -$cg: #1abc9c #48c9b0 #16a085; -$cb: #3498db #5dade2 #2c81ba; -$cr: #e74c3c #ec7063 #c54133; -$co: #f39c12 #fbbb56 #e67e22; +$ct: #1abc9c #48c9b0 #16a085; +$cg: #4caf50 #81c784 #388e3c; +$cpp: #651fff #7c4dff #6200ea; +$cb: #2196f3 #64b5f6 #1976d2; +$cr: #ff5722 #ff7043 #e64a19; +$co: #ff9800 #ffa726 #f57c00; $cp: #e7e8eb #ecf0f1 #bdc3c7; -$cgr: #34495e #5d6d7e #2c3e50; +$cgr: #546e7a #607d8b #37474f; @mixin ts($c: all, $t: .1s, $m: ease-in-out){ transition:$c $t $m; diff --git a/js/lib/datepicker/style.css b/js/lib/datepicker/style.css index 522493c..67313c5 100644 --- a/js/lib/datepicker/style.css +++ b/js/lib/datepicker/style.css @@ -1 +1 @@ -.do-datepicker{position:relative;z-index:65534;width:100%;height:100%}.do-datepicker a{text-decoration:none}.do-datepicker .date-input{display:block;width:100%;height:100%;padding:0 5px;line-height:18px;border:1px solid #e7e8eb;transition:all .1s ease-in-out}.do-datepicker .date-input:focus{border-color:#1abc9c}.do-datepicker .calendar-box{position:absolute;left:0;top:100%;width:267px;height:auto;min-height:60px;padding:10px;line-height:35px;border:1px solid #ddd;background:#fff;font-size:14px;color:#34495e;text-align:center;box-shadow:0 1px 5px rgba(0,0,0,0.1)}.do-datepicker .calendar-box dt.title{width:100%;height:35px;background:#e7e8eb}.do-datepicker .calendar-box dd.contrl{position:relative;width:90%;height:35px;margin:0 5%}.do-datepicker .calendar-box dd.contrl a{position:absolute;left:0;top:0;width:35px;height:35px;color:#34495e;font-weight:bold}.do-datepicker .calendar-box dd.contrl a:hover{color:#1abc9c}.do-datepicker .calendar-box dd.contrl a.prev-month{left:35px}.do-datepicker .calendar-box dd.contrl a.next-month{left:auto;right:35px}.do-datepicker .calendar-box dd.contrl a.next-year{left:auto;right:0}.do-datepicker .calendar-box dd.calendar{width:100%;height:auto}.do-datepicker .calendar-box dd.calendar .week{width:100%;height:35px;margin-bottom:5px;border-bottom:1px solid #eee}.do-datepicker .calendar-box dd.calendar span.td{float:left;width:35px}.do-datepicker .calendar-box dd.calendar .list span.td{height:30px;line-height:30px;cursor:pointer;transition:all .1s ease-in-out}.do-datepicker .calendar-box dd.calendar .list span.td:hover{background:#e7e8eb}.do-datepicker .calendar-box dd.calendar .list span.td.weeken{color:#e74c3c}.do-datepicker .calendar-box dd.calendar .list span.td.selected{background:#48c9b0;color:#fff}.do-datepicker .calendar-box dd.calendar .list span.td.disabled{color:#bdc3c7;cursor:default}.do-datepicker .calendar-box dd.calendar .list span.td.disabled:hover{background:none}.do-datepicker .calendar-box dd.time{position:relative;width:100%;height:41px;padding:5px 0;margin-top:5px;line-height:30px;border-top:1px solid #eee}.do-datepicker .calendar-box dd.time label{float:left;width:60px;height:30px}.do-datepicker .calendar-box dd.time label input{width:30px;height:30px;border:1px solid #e7e8eb;text-align:center}.do-datepicker .calendar-box dd.time .now{float:right;width:50px;height:30px;border-radius:3px;background:#1abc9c;color:#fff;text-align:center}.do-datepicker .calendar-box dd.time .now:hover{background:#48c9b0}.do-datepicker .calendar-box dd.time .now:active{background:#16a085}.do-datepicker .calendar-box dd.tips{position:absolute;z-index:65535;left:25%;top:40%;width:50%;height:30px;line-height:30px;background:rgba(0,0,0,0.7);color:#fff;font-size:12px;text-align:center} +.do-datepicker{position:relative;z-index:65534;width:100%;height:100%}.do-datepicker a{text-decoration:none}.do-datepicker .date-input{display:block;width:100%;height:100%;padding:0 5px;line-height:18px;border:1px solid #e7e8eb;transition:all .1s ease-in-out}.do-datepicker .date-input:focus{border-color:#1abc9c}.do-datepicker .calendar-box{position:absolute;left:0;top:100%;width:267px;height:auto;min-height:60px;padding:10px;line-height:35px;border:1px solid #ddd;background:#fff;font-size:14px;color:#546e7a;text-align:center;box-shadow:0 1px 5px rgba(0,0,0,0.1)}.do-datepicker .calendar-box dt.title{width:100%;height:35px;background:#e7e8eb}.do-datepicker .calendar-box dd.contrl{position:relative;width:90%;height:35px;margin:0 5%}.do-datepicker .calendar-box dd.contrl a{position:absolute;left:0;top:0;width:35px;height:35px;color:#546e7a;font-weight:bold}.do-datepicker .calendar-box dd.contrl a:hover{color:#1abc9c}.do-datepicker .calendar-box dd.contrl a.prev-month{left:35px}.do-datepicker .calendar-box dd.contrl a.next-month{left:auto;right:35px}.do-datepicker .calendar-box dd.contrl a.next-year{left:auto;right:0}.do-datepicker .calendar-box dd.calendar{width:100%;height:auto}.do-datepicker .calendar-box dd.calendar .week{width:100%;height:35px;margin-bottom:5px;border-bottom:1px solid #eee}.do-datepicker .calendar-box dd.calendar span.td{float:left;width:35px}.do-datepicker .calendar-box dd.calendar .list span.td{height:30px;line-height:30px;cursor:pointer;transition:all .1s ease-in-out}.do-datepicker .calendar-box dd.calendar .list span.td:hover{background:#e7e8eb}.do-datepicker .calendar-box dd.calendar .list span.td.weeken{color:#ff5722}.do-datepicker .calendar-box dd.calendar .list span.td.selected{background:#48c9b0;color:#fff}.do-datepicker .calendar-box dd.calendar .list span.td.disabled{color:#bdc3c7;cursor:default}.do-datepicker .calendar-box dd.calendar .list span.td.disabled:hover{background:none}.do-datepicker .calendar-box dd.time{position:relative;width:100%;height:41px;padding:5px 0;margin-top:5px;line-height:30px;border-top:1px solid #eee}.do-datepicker .calendar-box dd.time label{float:left;width:60px;height:30px}.do-datepicker .calendar-box dd.time label input{width:30px;height:30px;border:1px solid #e7e8eb;text-align:center}.do-datepicker .calendar-box dd.time .now{float:right;width:50px;height:30px;border-radius:3px;background:#1abc9c;color:#fff;text-align:center}.do-datepicker .calendar-box dd.time .now:hover{background:#48c9b0}.do-datepicker .calendar-box dd.time .now:active{background:#16a085}.do-datepicker .calendar-box dd.tips{position:absolute;z-index:65535;left:25%;top:40%;width:50%;height:30px;line-height:30px;background:rgba(0,0,0,0.7);color:#fff;font-size:12px;text-align:center} diff --git a/js/lib/datepicker/style.scss b/js/lib/datepicker/style.scss index d65e2b1..31d4c30 100644 --- a/js/lib/datepicker/style.scss +++ b/js/lib/datepicker/style.scss @@ -11,7 +11,7 @@ a {text-decoration:none;} .date-input {display:block;width:100%;height:100%;padding:0 5px;line-height:18px;border:1px solid nth($cp, 1);@include ts(); - &:focus {border-color:nth($cg, 1)} + &:focus {border-color:nth($ct, 1)} } .calendar-box {position:absolute;left:0;top:100%;width:267px;height:auto;min-height:60px;padding:10px;line-height:35px;border:1px solid #ddd;background:#fff;font-size:14px;color:nth($cgr, 1);text-align:center;box-shadow:0 1px 5px rgba(0,0,0,.1); @@ -20,7 +20,7 @@ dd.contrl {position:relative;width:90%;height:35px;margin:0 5%; a {position:absolute;left:0;top:0;width:35px;height:35px;color:nth($cgr, 1);font-weight:bold;} - a:hover {color:nth($cg, 1)} + a:hover {color:nth($ct, 1)} a.prev-month {left:35px;} a.next-month {left:auto;right:35px;} a.next-year {left:auto;right:0;} @@ -34,7 +34,7 @@ &:hover {background:nth($cp, 1);} &.weeken {color:nth($cr, 1)} - &.selected {background:nth($cg, 2);color:#fff} + &.selected {background:nth($ct, 2);color:#fff} &.disabled {color:nth($cp, 3);cursor:default;} &.disabled:hover {background:none;} } @@ -44,10 +44,10 @@ label {float:left;width:60px;height:30px; input {width:30px;height:30px;border:1px solid nth($cp, 1);text-align:center;} } - .now {float:right;width:50px;height:30px;border-radius:3px;background:nth($cg, 1);color:#fff;text-align:center; + .now {float:right;width:50px;height:30px;border-radius:3px;background:nth($ct, 1);color:#fff;text-align:center; - &:hover {background:nth($cg, 2);} - &:active {background:nth($cg, 3);} + &:hover {background:nth($ct, 2);} + &:active {background:nth($ct, 3);} } } dd.tips {position:absolute;z-index:65535;left:25%;top:40%;width:50%;height:30px;line-height:30px;background:rgba(0,0,0,.7);color:#fff;font-size:12px;text-align:center;} diff --git a/js/lib/drag/main.js b/js/lib/drag/main.js index 624b3d5..5d4a5ca 100644 --- a/js/lib/drag/main.js +++ b/js/lib/drag/main.js @@ -97,8 +97,8 @@ define(['yua'], function(){ dy = cst[5] //滚动条的偏移 - bst = document.body.scrollTop - bsl = document.body.scrollLeft + bst = $doc.scrollTop() + bsl = $doc.scrollLeft() // 计算元素的offset值, 需要修正 ox = offset.left - dx - bsl diff --git a/js/lib/layer/base.js b/js/lib/layer/base.js index dfb87e8..c1608a5 100644 --- a/js/lib/layer/base.js +++ b/js/lib/layer/base.js @@ -28,7 +28,7 @@ define(['yua', 'lib/drag/main', 'css!./skin/def'], function(yua){ shadeClose: false, //遮罩点击关闭弹窗 radius: '0px', //弹窗圆角半径 area: ['auto', 'auto'], - title: '', //弹窗主标题(在工具栏上的) + title: '提示', //弹窗主标题(在工具栏上的) menubar: true, //是否显示菜单栏 content: '', // 弹窗的内容 fixed: false, //是否固定不可拖拽 diff --git a/js/lib/layer/skin/def.css b/js/lib/layer/skin/def.css index b231d08..52c6f8b 100644 --- a/js/lib/layer/skin/def.css +++ b/js/lib/layer/skin/def.css @@ -1 +1 @@ -.do-layer{position:fixed;left:50%;top:50%;z-index:65535;width:auto;height:auto}.do-layer a{text-decoration:none}.do-layer.skin-def{color:#666;font-size:14px;box-shadow:0 0 10px rgba(0,0,0,0.3)}.do-layer.skin-def .icon-0::before{content:"\e62e";color:#e74c3c}.do-layer.skin-def .icon-1::before{content:"\e610";color:#1abc9c}.do-layer.skin-def .icon-2::before{content:"\e6f8";color:#3498db}.do-layer.skin-def .icon-3::before{content:"\e6fd";color:#f39c12}.do-layer.skin-def .icon-4::before{content:"\e6f6";color:#f39c12}.do-layer.skin-def .icon-5::before{content:"\e630";color:#1abc9c}.do-layer.skin-def .icon-6::before{content:"\e636";color:#34495e}.do-layer.skin-def .icon-7::before{content:"\e623";color:#f39c12}.do-layer.skin-def .icon-8::before{content:"\e604";color:#e74c3c}.do-layer.skin-def .icon-9::before{content:"\e605";color:#1abc9c}.do-layer.skin-def .layer-title{width:100%;height:40px;padding:0 8px;line-height:40px;background:#ecf0f1;font-size:14px;color:#34495e}.do-layer.skin-def .action-min,.do-layer.skin-def .action-close{position:absolute;display:block;top:10px;width:20px;height:20px;line-height:20px;border:0;text-align:center;cursor:pointer;color:#5d6d7e}.do-layer.skin-def .action-min:hover,.do-layer.skin-def .action-close:hover{border:1px solid #ddd;line-height:18px;color:#1abc9c}.do-layer.skin-def .action-min{right:40px}.do-layer.skin-def .action-min::before{content:"\e634"}.do-layer.skin-def .action-close{right:10px}.do-layer.skin-def .action-close::before{content:"\e687"}.do-layer.skin-def .layer-content{position:relative;width:100%;height:auto;min-height:50px;padding:10px}.do-layer.skin-def .layer-content .msg-icon{position:absolute;left:10px;top:10px;width:50px;height:auto;line-height:40px;font-size:35px;text-align:center}.do-layer.skin-def .layer-content .detail{width:auto;height:100%;margin:auto auto auto 60px;padding:5px 15px;word-break:break-all;word-wrap:break-word}.do-layer.skin-def .layer-content .detail .prompt-value{width:230px;height:30px;padding:0 8px;border:1px solid #ddd;border-radius:3px}.do-layer.skin-def .layer-content .detail .prompt-value.alert{border-color:#e74c3c}.do-layer.skin-def .layer-content .detail .prompt-value:focus{border-color:#1abc9c}.do-layer.skin-def .layer-content .detail .msg-box{line-height:30px}.do-layer.skin-def .layer-content.none-icon .detail{margin:0 auto}.do-layer.skin-def .layer-btns{width:100%;height:40px;padding:0 5px;line-height:30px;font-size:14px;color:#454545;text-align:right}.do-layer.skin-def .layer-btns a{display:inline-block;width:auto;min-width:60px;height:30px;margin:0 5px;padding:0 10px;color:#34495e;text-align:center;background:#e7e8eb}.do-layer.skin-def .layer-btns a:hover{background:#ecf0f1}.do-layer.skin-def .layer-btns a:active{background:#bdc3c7}.do-layer.type-1,.do-layer.type-2,.do-layer.type-3{max-width:600px;min-width:230px}.do-layer.type-5{visibility:hidden;min-width:75px;max-width:600px;line-height:1.5;color:#fff;background:rgba(0,0,0,0.5);opacity:0;box-shadow:none;-webkit-transition:opacity .3s ease-in-out;-moz-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out}.do-layer.type-5.active{visibility:visible;opacity:1}.do-layer.type-5 i.arrow{position:absolute;left:5px;bottom:-14px;width:0;height:0;border:6px solid transparent;border-top:8px solid rgba(0,0,0,0.5);content:""}.do-layer.type-5 .layer-content .detail{margin:0;padding:0}.do-layer.type-6{box-shadow:none;background:transparent}.do-layer.type-unspecial{min-width:10px;background:transparent}.do-layer.type-unspecial .layer-content{min-height:60px;padding:0}.do-layer.type-unspecial .layer-content .detail{margin:0;padding:0}.do-layer .loading-box{position:relative;width:100px;height:100px;margin:auto}.do-layer .loading-box .dot-box{position:absolute;display:block}.do-layer .loading-box.style-1 .dot-box,.do-layer .loading-box.style-2 .dot-box{width:70%;height:70%;margin:15%;-webkit-animation:circle 1.3s infinite linear;-moz-animation:circle 1.3s infinite linear;animation:circle 1.3s infinite linear}.do-layer .loading-box.style-1 .dot-box::after,.do-layer .loading-box.style-2 .dot-box::after{content:"\e648";font:70px/1 "ui font"}.do-layer .loading-box.style-2 .dot-box::after{content:"\e64a"}.do-layer .loading-box.style-3{height:50px}.do-layer .loading-box.style-3 .dot-box{width:100%;height:100%}.do-layer .loading-box.style-3 .dot-box i{float:left;display:block;width:10px;height:100%;margin:0 5px;background:#16a085;-webkit-animation:bounce 1s infinite ease-in-out;-moz-animation:bounce 1s infinite ease-in-out;animation:bounce 1s infinite ease-in-out;-webkit-transform:scaleY(0.6);-moz-transform:scaleY(0.6);transform:scaleY(0.6)}.do-layer .loading-box.style-3 .dot-box i:nth-child(2){-webkit-animation-delay:.1s;-moz-animation-delay:.1s;animation-delay:.1s}.do-layer .loading-box.style-3 .dot-box i:nth-child(3){-webkit-animation-delay:.2s;-moz-animation-delay:.2s;animation-delay:.2s}.do-layer .loading-box.style-3 .dot-box i:nth-child(4){-webkit-animation-delay:.3s;-moz-animation-delay:.3s;animation-delay:.3s}.do-layer .loading-box.style-3 .dot-box i:nth-child(5){-webkit-animation-delay:.4s;-moz-animation-delay:.4s;animation-delay:.4s}.do-layer .loading-box.style-4 .dot-box{width:60%;height:60%;margin:20%}.do-layer .loading-box.style-4 .dot-box i{position:absolute;display:block;width:60px;height:60px;-webkit-animation:circle2 2s infinite ease-in-out;-moz-animation:circle2 2s infinite ease-in-out;animation:circle2 2s infinite ease-in-out;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg)}.do-layer .loading-box.style-4 .dot-box i::before{display:block;width:8px;height:8px;background:#16a085;border-radius:50%;content:""}.do-layer .loading-box.style-4 .dot-box i:nth-child(2){-webkit-animation-delay:.1s;-moz-animation-delay:.1s;animation-delay:.1s}.do-layer .loading-box.style-4 .dot-box i:nth-child(3){-webkit-animation-delay:.2s;-moz-animation-delay:.2s;animation-delay:.2s}.do-layer .loading-box.style-4 .dot-box i:nth-child(4){-webkit-animation-delay:.3s;-moz-animation-delay:.3s;animation-delay:.3s}.do-layer .loading-box.style-4 .dot-box i:nth-child(5){-webkit-animation-delay:.4s;-moz-animation-delay:.4s;animation-delay:.4s}.do-layer .loading-box.style-5 .dot-box{width:90%;height:90%;margin:5%}.do-layer .loading-box.style-5 .dot-box i{float:left;display:block;width:30px;height:30px;background:#16a085;-webkit-animation:grid 1.5s infinite linear;-moz-animation:grid 1.5s infinite linear;animation:grid 1.5s infinite linear}.do-layer .loading-box.style-5 .dot-box i:nth-child(4),.do-layer .loading-box.style-5 .dot-box i:nth-child(8){-webkit-animation-delay:.2s;-moz-animation-delay:.2s;animation-delay:.2s}.do-layer .loading-box.style-5 .dot-box i:nth-child(1),.do-layer .loading-box.style-5 .dot-box i:nth-child(5),.do-layer .loading-box.style-5 .dot-box i:nth-child(9){-webkit-animation-delay:.3s;-moz-animation-delay:.3s;animation-delay:.3s}.do-layer .loading-box.style-5 .dot-box i:nth-child(2),.do-layer .loading-box.style-5 .dot-box i:nth-child(6){-webkit-animation-delay:.4s;-moz-animation-delay:.4s;animation-delay:.4s}.do-layer .loading-box.style-5 .dot-box i:nth-child(3){-webkit-animation-delay:.5s;-moz-animation-delay:.5s;animation-delay:.5s}.do-layer:active{z-index:65536}.do-layer-cover{position:fixed;left:0;top:0;z-index:65534;width:100%;height:100%;background:rgba(255,255,255,0.05)}.do-layer-cover.type-6{background:rgba(0,0,0,0.3)}@-webkit-keyframes circle{to{-webkit-transform:rotate(360deg)}}@-moz-keyframes circle{to{-moz-transform:rotate(360deg)}}@keyframes circle{to{transform:rotate(360deg)}}@-webkit-keyframes circle2{70%,to{-webkit-transform:rotate(405deg)}}@-moz-keyframes circle2{70%,to{-moz-transform:rotate(405deg)}}@keyframes circle2{70%,to{transform:rotate(405deg)}}@-webkit-keyframes bounce{25%{-webkit-transform:scaleY(1.3)}50%{-webkit-transform:scaleY(0.6)}}@-moz-keyframes bounce{25%{-moz-transform:scaleY(1.3)}50%{-moz-transform:scaleY(0.6)}}@keyframes bounce{25%{transform:scaleY(1.3)}50%{transform:scaleY(0.6)}}@-webkit-keyframes grid{36%{-webkit-transform:scale(0.1);opacity:.3}60%{-webkit-transform:scale(1);opacity:1}}@-moz-keyframes grid{36%{-moz-transform:scale(0.1);opacity:.3}60%{-moz-transform:scale(1);opacity:1}}@keyframes grid{36%{transform:scale(0.1);opacity:.3}60%{transform:scale(1);opacity:1}} +.do-layer{position:fixed;left:50%;top:50%;z-index:65535;width:auto;height:auto}.do-layer a{text-decoration:none}.do-layer.skin-def{color:#666;font-size:14px;box-shadow:0 0 10px rgba(0,0,0,0.3)}.do-layer.skin-def .icon-0::before{content:"\e62e";color:#ff5722}.do-layer.skin-def .icon-1::before{content:"\e610";color:#1abc9c}.do-layer.skin-def .icon-2::before{content:"\e6f8";color:#2196f3}.do-layer.skin-def .icon-3::before{content:"\e6fd";color:#ff9800}.do-layer.skin-def .icon-4::before{content:"\e6f6";color:#ff9800}.do-layer.skin-def .icon-5::before{content:"\e630";color:#1abc9c}.do-layer.skin-def .icon-6::before{content:"\e636";color:#546e7a}.do-layer.skin-def .icon-7::before{content:"\e623";color:#ff9800}.do-layer.skin-def .icon-8::before{content:"\e604";color:#ff5722}.do-layer.skin-def .icon-9::before{content:"\e605";color:#1abc9c}.do-layer.skin-def .layer-title{width:100%;height:43px;padding:0 8px;line-height:43px;background:#f5f5f5;font-size:16px;color:#546e7a}.do-layer.skin-def .action-min,.do-layer.skin-def .action-close{position:absolute;display:block;top:12px;width:20px;height:20px;line-height:20px;font-size:14px;text-align:center;cursor:pointer;color:#607d8b}.do-layer.skin-def .action-min:hover,.do-layer.skin-def .action-close:hover{color:#1abc9c}.do-layer.skin-def .action-min{right:40px}.do-layer.skin-def .action-min::before{content:"\e634"}.do-layer.skin-def .action-close{right:10px}.do-layer.skin-def .action-close::before{content:"\e687"}.do-layer.skin-def .layer-content{position:relative;width:100%;height:auto;min-height:50px;padding:10px}.do-layer.skin-def .layer-content .msg-icon{position:absolute;left:10px;top:10px;width:50px;height:auto;line-height:40px;font-size:35px;text-align:center}.do-layer.skin-def .layer-content .detail{width:auto;height:100%;margin:auto auto auto 60px;padding:5px 15px;word-break:break-all;word-wrap:break-word}.do-layer.skin-def .layer-content .detail .prompt-value{width:230px;height:30px;padding:0 8px;border:1px solid #ddd;border-radius:3px}.do-layer.skin-def .layer-content .detail .prompt-value.alert{border-color:#ff5722}.do-layer.skin-def .layer-content .detail .prompt-value:focus{border-color:#1abc9c}.do-layer.skin-def .layer-content .detail .msg-box{line-height:30px}.do-layer.skin-def .layer-content.none-icon .detail{margin:0 auto}.do-layer.skin-def .layer-btns{width:100%;height:40px;padding:0 5px;line-height:30px;font-size:14px;color:#454545;text-align:right}.do-layer.skin-def .layer-btns a{display:inline-block;width:auto;min-width:60px;height:30px;margin:0 5px;padding:0 10px;color:#546e7a;text-align:center;background:#e7e8eb;transition:all .1s ease-in-out}.do-layer.skin-def .layer-btns a:hover{background:#ecf0f1}.do-layer.skin-def .layer-btns a:active{background:#bdc3c7}.do-layer.type-1,.do-layer.type-2,.do-layer.type-3{max-width:600px;min-width:230px}.do-layer.type-5{visibility:hidden;min-width:75px;max-width:600px;line-height:1.5;color:#fff;background:rgba(0,0,0,0.5);opacity:0;box-shadow:none;-webkit-transition:opacity .3s ease-in-out;-moz-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out}.do-layer.type-5.active{visibility:visible;opacity:1}.do-layer.type-5 i.arrow{position:absolute;left:5px;bottom:-14px;width:0;height:0;border:6px solid transparent;border-top:8px solid rgba(0,0,0,0.5);content:""}.do-layer.type-5 .layer-content .detail{margin:0;padding:0}.do-layer.type-6{box-shadow:none;background:transparent}.do-layer.type-unspecial{min-width:10px;background:transparent}.do-layer.type-unspecial .layer-content{min-height:60px;padding:0}.do-layer.type-unspecial .layer-content .detail{margin:0;padding:0}.do-layer .loading-box{position:relative;width:100px;height:100px;margin:auto}.do-layer .loading-box .dot-box{position:absolute;display:block}.do-layer .loading-box.style-1 .dot-box,.do-layer .loading-box.style-2 .dot-box{width:70%;height:70%;margin:15%;-webkit-animation:circle 1.3s infinite linear;-moz-animation:circle 1.3s infinite linear;animation:circle 1.3s infinite linear}.do-layer .loading-box.style-1 .dot-box::after,.do-layer .loading-box.style-2 .dot-box::after{content:"\e648";font:70px/1 "ui font"}.do-layer .loading-box.style-2 .dot-box::after{content:"\e64a"}.do-layer .loading-box.style-3{height:50px}.do-layer .loading-box.style-3 .dot-box{width:100%;height:100%}.do-layer .loading-box.style-3 .dot-box i{float:left;display:block;width:10px;height:100%;margin:0 5px;background:#16a085;-webkit-animation:bounce 1s infinite ease-in-out;-moz-animation:bounce 1s infinite ease-in-out;animation:bounce 1s infinite ease-in-out;-webkit-transform:scaleY(0.6);-moz-transform:scaleY(0.6);transform:scaleY(0.6)}.do-layer .loading-box.style-3 .dot-box i:nth-child(2){-webkit-animation-delay:.1s;-moz-animation-delay:.1s;animation-delay:.1s}.do-layer .loading-box.style-3 .dot-box i:nth-child(3){-webkit-animation-delay:.2s;-moz-animation-delay:.2s;animation-delay:.2s}.do-layer .loading-box.style-3 .dot-box i:nth-child(4){-webkit-animation-delay:.3s;-moz-animation-delay:.3s;animation-delay:.3s}.do-layer .loading-box.style-3 .dot-box i:nth-child(5){-webkit-animation-delay:.4s;-moz-animation-delay:.4s;animation-delay:.4s}.do-layer .loading-box.style-4 .dot-box{width:60%;height:60%;margin:20%}.do-layer .loading-box.style-4 .dot-box i{position:absolute;display:block;width:60px;height:60px;-webkit-animation:circle2 2s infinite ease-in-out;-moz-animation:circle2 2s infinite ease-in-out;animation:circle2 2s infinite ease-in-out;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg)}.do-layer .loading-box.style-4 .dot-box i::before{display:block;width:8px;height:8px;background:#16a085;border-radius:50%;content:""}.do-layer .loading-box.style-4 .dot-box i:nth-child(2){-webkit-animation-delay:.1s;-moz-animation-delay:.1s;animation-delay:.1s}.do-layer .loading-box.style-4 .dot-box i:nth-child(3){-webkit-animation-delay:.2s;-moz-animation-delay:.2s;animation-delay:.2s}.do-layer .loading-box.style-4 .dot-box i:nth-child(4){-webkit-animation-delay:.3s;-moz-animation-delay:.3s;animation-delay:.3s}.do-layer .loading-box.style-4 .dot-box i:nth-child(5){-webkit-animation-delay:.4s;-moz-animation-delay:.4s;animation-delay:.4s}.do-layer .loading-box.style-5 .dot-box{width:90%;height:90%;margin:5%}.do-layer .loading-box.style-5 .dot-box i{float:left;display:block;width:30px;height:30px;background:#16a085;-webkit-animation:grid 1.5s infinite linear;-moz-animation:grid 1.5s infinite linear;animation:grid 1.5s infinite linear}.do-layer .loading-box.style-5 .dot-box i:nth-child(4),.do-layer .loading-box.style-5 .dot-box i:nth-child(8){-webkit-animation-delay:.2s;-moz-animation-delay:.2s;animation-delay:.2s}.do-layer .loading-box.style-5 .dot-box i:nth-child(1),.do-layer .loading-box.style-5 .dot-box i:nth-child(5),.do-layer .loading-box.style-5 .dot-box i:nth-child(9){-webkit-animation-delay:.3s;-moz-animation-delay:.3s;animation-delay:.3s}.do-layer .loading-box.style-5 .dot-box i:nth-child(2),.do-layer .loading-box.style-5 .dot-box i:nth-child(6){-webkit-animation-delay:.4s;-moz-animation-delay:.4s;animation-delay:.4s}.do-layer .loading-box.style-5 .dot-box i:nth-child(3){-webkit-animation-delay:.5s;-moz-animation-delay:.5s;animation-delay:.5s}.do-layer:active{z-index:65536}.do-layer-cover{position:fixed;left:0;top:0;z-index:65534;width:100%;height:100%;background:rgba(255,255,255,0.05)}.do-layer-cover.type-6{background:rgba(0,0,0,0.3)}@-webkit-keyframes circle{to{-webkit-transform:rotate(360deg)}}@-moz-keyframes circle{to{-moz-transform:rotate(360deg)}}@keyframes circle{to{transform:rotate(360deg)}}@-webkit-keyframes circle2{70%,to{-webkit-transform:rotate(405deg)}}@-moz-keyframes circle2{70%,to{-moz-transform:rotate(405deg)}}@keyframes circle2{70%,to{transform:rotate(405deg)}}@-webkit-keyframes bounce{25%{-webkit-transform:scaleY(1.3)}50%{-webkit-transform:scaleY(0.6)}}@-moz-keyframes bounce{25%{-moz-transform:scaleY(1.3)}50%{-moz-transform:scaleY(0.6)}}@keyframes bounce{25%{transform:scaleY(1.3)}50%{transform:scaleY(0.6)}}@-webkit-keyframes grid{36%{-webkit-transform:scale(0.1);opacity:.3}60%{-webkit-transform:scale(1);opacity:1}}@-moz-keyframes grid{36%{-moz-transform:scale(0.1);opacity:.3}60%{-moz-transform:scale(1);opacity:1}}@keyframes grid{36%{transform:scale(0.1);opacity:.3}60%{transform:scale(1);opacity:1}} diff --git a/js/lib/layer/skin/def.scss b/js/lib/layer/skin/def.scss index 453f78e..5a02b77 100644 --- a/js/lib/layer/skin/def.scss +++ b/js/lib/layer/skin/def.scss @@ -17,24 +17,24 @@ &.skin-def {color:#666;font-size:14px;box-shadow:0 0 10px rgba(0,0,0,.3); .icon-0::before {content:"\e62e";color:nth($cr, 1);} // question - .icon-1::before {content:"\e610";color:nth($cg, 1);} // get + .icon-1::before {content:"\e610";color:nth($ct, 1);} // get .icon-2::before {content:"\e6f8";color:nth($cb, 1);} // happy .icon-3::before {content:"\e6fd";color:nth($co, 1);} // sad .icon-4::before {content:"\e6f6";color:nth($co, 1);} // warn - .icon-5::before {content:"\e630";color:nth($cg, 1);} // face + .icon-5::before {content:"\e630";color:nth($ct, 1);} // face .icon-6::before {content:"\e636";color:nth($cgr, 1);} // time .icon-7::before {content:"\e623";color:nth($co, 1);} // star .icon-8::before {content:"\e604";color:nth($cr, 1);} // mute - .icon-9::before {content:"\e605";color:nth($cg, 1);} // unmute + .icon-9::before {content:"\e605";color:nth($ct, 1);} // unmute /* 弹层标题栏 */ - .layer-title {width:100%;height:40px;padding:0 8px;line-height:40px;background:nth($cp, 2);font-size:14px;color:nth($cgr, 1);} + .layer-title {width:100%;height:43px;padding:0 8px;line-height:43px;background:#f5f5f5;font-size:16px;color:nth($cgr, 1);} .action-min, - .action-close {position:absolute;display:block;top:10px;width:20px;height:20px;line-height:20px;border:0;text-align:center;cursor:pointer;color:nth($cgr, 2); + .action-close {position:absolute;display:block;top:12px;width:20px;height:20px;line-height:20px;font-size:14px;text-align:center;cursor:pointer;color:nth($cgr, 2); - &:hover {border: 1px solid #ddd;line-height: 18px;color:nth($cg, 1);} + &:hover {color:nth($ct, 1);} } .action-min {right:40px; &::before {content:"\e634"} @@ -52,7 +52,7 @@ .prompt-value {width: 230px;height: 30px;padding: 0 8px;border: 1px solid #ddd;border-radius: 3px; &.alert {border-color:nth($cr, 1)} - &:focus {border-color:nth($cg, 1)} + &:focus {border-color:nth($ct, 1)} } .msg-box {line-height:30px;} } @@ -64,7 +64,7 @@ /* 弹层按钮部分 */ .layer-btns {width:100%;height:40px;padding:0 5px;line-height:30px;font-size:14px;color:#454545;text-align:right; - a {display:inline-block;width:auto;min-width:60px;height:30px;margin:0 5px;padding:0 10px;color:nth($cgr, 1);text-align:center;background:nth($cp, 1); + a {display:inline-block;width:auto;min-width:60px;height:30px;margin:0 5px;padding:0 10px;color:nth($cgr, 1);text-align:center;background:nth($cp, 1);@include ts(); &:hover {background:nth($cp, 2)} &:active {background:nth($cp, 3)} @@ -124,7 +124,7 @@ .dot-box{width:100%;height:100%; - i {float:left;display:block;width:10px;height:100%;margin:0 5px;background:nth($cg, 3);-webkit-animation: bounce 1s infinite ease-in-out;-moz-animation: bounce 1s infinite ease-in-out;animation: bounce 1s infinite ease-in-out;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);transform:scaleY(.6); + i {float:left;display:block;width:10px;height:100%;margin:0 5px;background:nth($ct, 3);-webkit-animation: bounce 1s infinite ease-in-out;-moz-animation: bounce 1s infinite ease-in-out;animation: bounce 1s infinite ease-in-out;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);transform:scaleY(.6); &:nth-child(2) {-webkit-animation-delay:.1s;-moz-animation-delay:.1s;animation-delay:.1s;} &:nth-child(3) {-webkit-animation-delay:.2s;-moz-animation-delay:.2s;animation-delay:.2s;} @@ -141,7 +141,7 @@ i {position:absolute;display:block;width:60px;height:60px;-webkit-animation: circle2 2s infinite ease-in-out;-moz-animation: circle2 2s infinite ease-in-out;animation: circle2 2s infinite ease-in-out;-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);transform: rotate(45deg); - &::before {display:block;width:8px;height:8px;background:nth($cg, 3);border-radius:50%;content:""} + &::before {display:block;width:8px;height:8px;background:nth($ct, 3);border-radius:50%;content:""} &:nth-child(2) {-webkit-animation-delay:.1s;-moz-animation-delay:.1s;animation-delay:.1s;} &:nth-child(3) {-webkit-animation-delay:.2s;-moz-animation-delay:.2s;animation-delay:.2s;} @@ -156,7 +156,7 @@ .dot-box{width:90%;height:90%;margin:5%; - i {float:left;display:block;width:30px;height:30px;background:nth($cg, 3);-webkit-animation: grid 1.5s infinite linear;-moz-animation: grid 1.5s infinite linear;animation: grid 1.5s infinite linear; + i {float:left;display:block;width:30px;height:30px;background:nth($ct, 3);-webkit-animation: grid 1.5s infinite linear;-moz-animation: grid 1.5s infinite linear;animation: grid 1.5s infinite linear; &:nth-child(4), &:nth-child(8) {-webkit-animation-delay:.2s;-moz-animation-delay:.2s;animation-delay:.2s;} diff --git a/js/lib/marked/main.js b/js/lib/marked/main.js index 5fc5448..69d11a1 100644 --- a/js/lib/marked/main.js +++ b/js/lib/marked/main.js @@ -19,7 +19,7 @@ var block = { nptable: noop, lheading: /^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/, blockquote: /^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/, - mark: /^( *;;;([\!]?)[^\n]+(\n(?!def)[^\n]+)*\n*)+/, + mark: /^ *;;;([\!]?) ([^\n]+)/, task: /^ *- *\[([ x]?)\] *([^\n]*)/, list: /^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/, html: /^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/, @@ -44,9 +44,7 @@ block.list = replace(block.list) block.blockquote = replace(block.blockquote) ('def', block.def) (); -block.mark = replace(block.mark) -('def', block.def) -(); + block._tag = '(?!(?:' + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code' @@ -289,9 +287,11 @@ Lexer.prototype.token = function(src, top, bq) { src = src.substring(cap[0].length); this.tokens.push({ - type: 'mark_start' + type: 'mark', + mark: cap[1] === '!', + text: cap[2] }); - var sign = cap[2] === '!' +/* var sign = cap[2] === '!' cap = cap[0].replace(/^ *;;;[\!]? ?/gm, ''); this.token(cap, top, true); @@ -299,7 +299,7 @@ Lexer.prototype.token = function(src, top, bq) { this.tokens.push({ type: 'mark_end', mark: sign - }); + });*/ continue; } @@ -849,10 +849,10 @@ Renderer.prototype.code = function(code, lang, escaped) { }; Renderer.prototype.blockquote = function(quote) { - return '
\n' + quote + '
\n'; + return '
\n' + quote + '
\n'; }; Renderer.prototype.mark = function(mark, t) { - return '\n' + mark + '\n'; + return '
\n' + mark + '
\n'; }; Renderer.prototype.task = function(task, t) { @@ -868,7 +868,7 @@ Renderer.prototype.heading = function(text, level, raw) { raw = text.replace(/<[^>]+>|<\/[^>]+>/g, '') return '' - + '
' - + '
' - + '' + lang[openType][0] +'' - + '本地上传' - + '' + lang[openType][1] + '' - + '' - + '
' - + '
' - + '
' - + '
'+ lang[openType][2] + '' - + '' - + '
' - + '
'+ lang[openType][3] + '' - + '' - + '
' - + '
' - + '确定' - + '
' - + '
' - + '
' - + '
选择文件(上传大小限制:单文件最大' - + (ME.maxSize/1048576).toFixed(2) - + 'MB)
' - + '
    ' - + '
  • 文件名上传进度操作
  • ' - + '
  • ' - + '' - + '' - + '插入' - + '
  • ' - + '
' - + '
' - + '
    ' - + '
  • ' - + '' - + '

    ' + return '
    ' + + '
    ' + + '' + lang[openType][0] +'' + + '本地上传' + + '' + lang[openType][1] + '' + + '' + + '
    ' + + '
    ' + + '
    ' + + '
    '+ lang[openType][2] + '' + + '' + + '
    ' + + '
    '+ lang[openType][3] + '' + + '' + + '
    ' + + '
    ' + + '确定' + + '
    ' + + '
    ' + + '
    ' + + '
    选择文件(上传大小限制:单文件最大 ' + + ((ME.maxSize/1048576).toFixed(2) - 0) + + 'MB)
    ' + + '
      ' + + '
    • 文件名上传进度操作
    • ' + + '
    • ' + + '' + + '' + + '插入' + '
    • ' + '
    ' - + '
    ' - + '
    ' - + '' + + '' + + '
      ' + + '
    • ' + + '' + + '

      ' + + '
    • ' + + '
    ' + + '
' + + '
' }; /** @@ -243,7 +241,7 @@ define([ vm.uploadFile.push({name: it.name, progress: '0%(失败,不允许的文件类型)', url: ''}) continue } - if(it.size > ME.maxSize){ + if(ME.maxSize > 0 && it.size > ME.maxSize){ vm.uploadFile.push({name: it.name, progress: '0%(文件体积过大)', url: ''}) continue } @@ -314,7 +312,7 @@ define([ menubar: false, shade: false, fixed: true, - offset: [offset.top + 37 - document.documentElement.scrollTop], + offset: [offset.top + 37 - ME.doc.scrollTop()], tab: 2, attach: '', attachAlt: '', @@ -332,7 +330,7 @@ define([ getAttach(vm, function(json){ if(json){ cache[openType] = json.data.list.map(function(it){ - it.thumb = openType === 'image' ? '' : '' + it.thumb = openType === 'image' ? '' : '' return it }) lvm.attachList = json.data.list diff --git a/js/lib/meditor/addon/attach.scss b/js/lib/meditor/addon/attach.scss new file mode 100644 index 0000000..e779163 --- /dev/null +++ b/js/lib/meditor/addon/attach.scss @@ -0,0 +1,62 @@ +@charset "UTF-8"; +/** + * + * @authors yutent (yutent@doui.cc) + * @date 2017-04-20 19:13:24 + * + */ + +.do-meditor-attach {width:630px;height:auto;background:#f7f7f7;cursor:default; + + .tab-box {width:100%;height:50px;line-height:49px;border-bottom:1px solid #e2e2e2;text-align:center; + + .item {position:relative;float:left;width:100px;height:49px;border-right:1px solid #ddd;cursor:pointer;} + .item.active {background:#fff;} + .item.active::after {position:absolute;left:0;bottom:-1px;width:100%;height:1px;background:#fff;content:""} + a.action-close {top:5px;width:40px;height:40px;line-height:40px;font-size:20px;} + a.action-close:hover {line-height:40px;border:0;} + } + + .cont-box {position:relative;width:100%;height:auto;min-height:200px;background:#fff; + + .remote, + .local {position:relative;width:60%;height:auto;margin:0 auto;padding:15px 0 30px;} + .local {width:96%;} + + .hide {display:none;} + + .section {display:block;width:100%;height:auto;margin:15px 0;line-height:35px; + + &.input {line-height:33px;border:1px solid #e9e9e9;} + + .label {float: left;width:30%;text-align:center;background:#f7f7f7;} + .txt {float: left;width:70%;height:33px;padding:0 8px;border:0;border-left:1px solid #e9e9e9;background:#fff;color:#666;} + .submit {float:right;width:30%;height:35px;background:#ddd;color:#666;text-align:center;} + } + + + .select-file {width:100%;height:35px;line-height:33px} + .select-file span.file {float:left;width:100px;height:35px;border:1px solid #ddd;background:#f7f7f7;color:#666;text-align:center;cursor:pointer;} + .select-file span.tips {display:inline-block;padding:0 10px;line-height:35px;color:#666;} + .upload-box {width:100%;height:auto;min-height:190px;margin:10px 0;border:1px solid #e2e2e2;} + .upload-box .tr {width:100%;height:35px;line-height:35px;text-align:center;} + .upload-box .tr:hover {background:#fafafa} + .upload-box .thead {line-height:34px;border-bottom:1px solid #e2e2e2;background:#f7f7f7;} + + .upload-box .td {float:left;} + .upload-box .td.name {width:45%;} + .upload-box .td.progress {width:40%;} + .upload-box .td.option {width:15%;} + .upload-box .td.option a {display:inline-block;padding:3px 5px;line-height:13px;border:1px solid #e2e2e2;background:#f7f7f7;color:#666;} + .upload-box .td .red {color:#f30;} + + .manager {overflow:hidden;overflow-y:auto;width:100%;height:320px;padding:10px;} + .manager .item {float:left;width:22%;height:130px;margin:10px 1.5%;padding:5px;} + .manager .item:hover {background:#f7f7f7;} + .manager .thumb {display:block;width:100%;height:100px;} + .manager .name {overflow:hidden;height:20px;line-height:30px; text-align:center;} + .manager img {width:100%;height:100%;} + .manager .attach-icon {display:inline-block;width:100%;height:100px;text-align:center;font:50px/100px "ui font" !important;-webkit-font-smoothing: antialiased;-webkit-text-stroke-width: 0.2px;-moz-osx-font-smoothing: grayscale;} + } + +} \ No newline at end of file diff --git a/js/lib/meditor/addon/base.js b/js/lib/meditor/addon/base.js index cb11a65..f53baec 100644 --- a/js/lib/meditor/addon/base.js +++ b/js/lib/meditor/addon/base.js @@ -42,8 +42,8 @@ define(['lib/layer/base'], function(){ ME.insert(vm.$editor, wrap, true) layer.close(h1ID) }, - offset: [offset.top + 37 - document.documentElement.scrollTop, 'auto', 'auto', offset.left - document.documentElement.scrollLeft], - content: '