From f9d118ef6afe3aa9a512f75ddafef138e2c18683 Mon Sep 17 00:00:00 2001 From: kcolfyksor Date: Fri, 21 Aug 2020 17:06:13 +0800 Subject: [PATCH 1/2] added less files for dark mode to be imported to use --- assets/dark.less | 10 + assets/dark/common/Calendar.less | 104 +++++++++ assets/dark/common/FullCalendar.less | 91 ++++++++ assets/dark/common/Picker.less | 10 + assets/dark/common/RangeCalendar.less | 132 +++++++++++ assets/dark/common/index.less | 16 ++ assets/dark/index/Calendar.less | 306 ++++++++++++++++++++++++++ assets/dark/index/DecadePanel.less | 120 ++++++++++ assets/dark/index/Input.less | 24 ++ assets/dark/index/MonthPanel.less | 143 ++++++++++++ assets/dark/index/Picker.less | 110 +++++++++ assets/dark/index/Time.less | 6 + assets/dark/index/TimePanel.less | 72 ++++++ assets/dark/index/YearPanel.less | 134 +++++++++++ 14 files changed, 1278 insertions(+) create mode 100644 assets/dark.less create mode 100644 assets/dark/common/Calendar.less create mode 100644 assets/dark/common/FullCalendar.less create mode 100644 assets/dark/common/Picker.less create mode 100644 assets/dark/common/RangeCalendar.less create mode 100644 assets/dark/common/index.less create mode 100644 assets/dark/index/Calendar.less create mode 100644 assets/dark/index/DecadePanel.less create mode 100644 assets/dark/index/Input.less create mode 100644 assets/dark/index/MonthPanel.less create mode 100644 assets/dark/index/Picker.less create mode 100644 assets/dark/index/Time.less create mode 100644 assets/dark/index/TimePanel.less create mode 100644 assets/dark/index/YearPanel.less diff --git a/assets/dark.less b/assets/dark.less new file mode 100644 index 00000000..1bcbce99 --- /dev/null +++ b/assets/dark.less @@ -0,0 +1,10 @@ +@import "./dark/common/index.less"; +@import "./dark/index/Picker.less"; +@import "./dark/index/Calendar.less"; +@import "./dark/index/Time.less"; +@import "./dark/index/TimePanel.less"; +@import "./dark/index/MonthPanel.less"; +@import "./dark/index/YearPanel.less"; +@import "./dark/index/DecadePanel.less"; +@import "./dark/common/RangeCalendar.less"; +@import "./dark/common/FullCalendar.less"; diff --git a/assets/dark/common/Calendar.less b/assets/dark/common/Calendar.less new file mode 100644 index 00000000..a39414b1 --- /dev/null +++ b/assets/dark/common/Calendar.less @@ -0,0 +1,104 @@ +.@{prefixClass} { + &-input-wrap { + position: relative; + padding: 6px; + border-bottom: 1px solid #e9e9e9; + &:after { + content: ""; + clear: both; + } + } + + &-date-input-wrap { + overflow: hidden; + } + &-time-picker { + position: absolute; + width: 100%; + top: 34px; + background-color: black; + height: 217px; + &-panel { + width: 100%; + position: relative; + .@{timePickerClass}-panel { + &-input-wrap { + display: none; + } + &-inner { + border: none; + box-shadow: none; + } + &-select { + width: 84px; + max-height: 217px; + li { + text-align: center; + padding: 0; + } + } + } + } + } + &-time-picker-wrap { + float: left; + width: 100%; + + .@{timePickerClass} { + width: 100%; + + &-input { + padding: 0; + border: 1px solid transparent; + outline: 0; + height: 22px; + } + + &-icon { + display: none; + } + } + } + + &-input { + border: 1px solid transparent; + width: 100%; + color: #999; + cursor: text; + line-height: 1.5; + outline: 0; + height: 22px; + + &-invalid { + border-color: red; + } + } + + &-clear-btn { + z-index: 9999; + position: absolute; + right: 6px; + cursor: pointer; + overflow: hidden; + width: 20px; + height: 20px; + text-align: center; + line-height: 20px; + top: 6px; + margin: 0; + } + + &-clear-btn:after { + content: "x"; + font-size: 12px; + color: #555; + display: inline-block; + line-height: 1; + width: 20px; + transition: color 0.3s ease; + } + + &-clear-btn:hover:after { + color: #999; + } +} diff --git a/assets/dark/common/FullCalendar.less b/assets/dark/common/FullCalendar.less new file mode 100644 index 00000000..227bea64 --- /dev/null +++ b/assets/dark/common/FullCalendar.less @@ -0,0 +1,91 @@ +.@{prefixClass}-full { + width: 275px; + &-header { + padding: 5px 10px; + text-align: center; + user-select: none; + -webkit-user-select: none; + border-bottom: 1px solid #333; + overflow: hidden; + + &-month-select, + &-year-select { + width: 70px; + float: right; + margin-right: 5px; + } + + &-switcher { + float: right; + display: inline-block; + &-normal:hover { + border-color: #23c0fa; + box-shadow: 0 0 2px rgba(45, 183, 245, 0.8); + cursor: pointer; + } + &-focus { + border-color: #3fc7fa; + background-color: #3fc7fa; + color: #000; + } + > span { + float: left; + height: 28px; + line-height: 24px; + border: 1px solid #262626; + padding: 0 10px; + color: #999; + &:first-child { + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; + border-right: none; + } + &:last-child { + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + border-left: none; + } + } + } + } +} + +.@{prefixClass}-fullscreen { + width: auto; + + .@{prefixClass}-full-header { + border-bottom: none; + } + + .@{prefixClass} { + &-column-header { + text-align: right; + padding-right: 12px; + } + &-cell { + padding: 0; + } + &-cell .@{prefixClass}-date, + &-month-panel-cell .@{prefixClass}-month-panel-month { + display: block; + height: 116px; + width: auto; + border-radius: 0; + margin: 0 4px; + border: none; + border-top: 2px solid #111; + text-align: right; + padding-right: 8px; + } + &-selected-day .@{prefixClass}-date, + &-month-panel-selected-cell .@{prefixClass}-month-panel-month { + background-color: #140500; + color: #999; + } + &-today .@{prefixClass}-date, + &-month-panel-selected-cell .@{prefixClass}-month-panel-month { + border-top-color: #3fc7fa; + color: #3fc7fa; + } + } +} diff --git a/assets/dark/common/Picker.less b/assets/dark/common/Picker.less new file mode 100644 index 00000000..0a597178 --- /dev/null +++ b/assets/dark/common/Picker.less @@ -0,0 +1,10 @@ +.@{prefixClass}-picker { + position: absolute; + left: -9999px; + top: -9999px; + z-index: 1000; + + &-hidden { + display: none; + } +} diff --git a/assets/dark/common/RangeCalendar.less b/assets/dark/common/RangeCalendar.less new file mode 100644 index 00000000..a2e121ed --- /dev/null +++ b/assets/dark/common/RangeCalendar.less @@ -0,0 +1,132 @@ +@input-box-height: 35px; + +.@{prefixClass}-range { + width: 502px; + overflow: hidden; + + &-part { + width: 250px; + position: relative; + + .@{prefixClass}-time-picker { + top: 69px; + &-panel { + &-select { + width: 77px; + } + } + } + } + + &-left { + float: left; + .@{prefixClass}-time-picker-panel { + &-select:last-child { + border-right: 1px solid #e9e9e9; + } + + } + } + + &-right { + float: right; + .@{prefixClass}-time-picker-panel { + left: 21px; + + &-select:first-child { + border-left: 1px solid #e9e9e9; + } + } + } + + &-middle { + position: absolute; + margin-left: -10px; + text-align: center; + height: @input-box-height; + line-height: @input-box-height; + } + .@{prefixClass}-date-panel::after { + content:"."; + display:block; + height:0; + clear:both; + visibility:hidden; + } + + .@{prefixClass}-input-wrap { + height: @input-box-height; + } + .@{prefixClass}-input, + .@{timePickerClass}-input { + padding: 1px 7px; + height: 22px; + } + + .@{prefixClass}-body, + .@{prefixClass}-decade-panel-body, + .@{prefixClass}-year-panel-body, + .@{prefixClass}-month-panel-body { + border-bottom: 1px solid #e9e9e9; + } + + &.@{prefixClass}-week-number { + width: 574px; + + .@{prefixClass}-range { + &-part { + width: 286px; + .@{prefixClass}-time-picker { + top: 69px; + &-panel { + &-select { + width: 89px; + } + } + } + } + &-right { + .@{prefixClass}-time-picker-panel { + left: 36px; + } + } + } + } + + .@{prefixClass}-year-panel, + .@{prefixClass}-month-panel, + .@{prefixClass}-decade-panel { + top: @input-box-height; + } + .@{prefixClass}-month-panel .@{prefixClass}-year-panel { + top: 0; + } + .@{prefixClass}-decade-panel-table, + .@{prefixClass}-year-panel-table, + .@{prefixClass}-month-panel-table { + height: 198px; + } + + .@{prefixClass}-in-range-cell { + background: #140b07; + border-radius: 0; + } + + &-bottom { + text-align: right; + } + + .@{prefixClass}-footer{ + border-top: none; + padding: 0; + &-btn { + padding: 10px 12px 10px 0; + } + } + .@{prefixClass}-ok-btn { + position: static; + } + .@{prefixClass}-today-btn { + float: left; + } +} diff --git a/assets/dark/common/index.less b/assets/dark/common/index.less new file mode 100644 index 00000000..afd6635b --- /dev/null +++ b/assets/dark/common/index.less @@ -0,0 +1,16 @@ +@prefixClass: rc-calendar; +@timePickerClass: rc-time-picker; + +.@{prefixClass} { + box-sizing: border-box; + * { + box-sizing: border-box; + } +} + +.@{prefixClass}-hidden { + display: none; +} + +@import "Calendar.less"; +@import "Picker.less"; diff --git a/assets/dark/index/Calendar.less b/assets/dark/index/Calendar.less new file mode 100644 index 00000000..f5ee3cac --- /dev/null +++ b/assets/dark/index/Calendar.less @@ -0,0 +1,306 @@ +.@{prefixClass} { + 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 #333; + list-style: none; + font-size: 12px; + text-align: left; + background-color: #000; + border-radius: 3px; + box-shadow: 0 1px 5px #333; + background-clip: padding-box; + border: 1px solid #333; + line-height: 1.5; + + &-date-panel, + &-panel { + position: relative; + outline: none; + } + + &-week-number { + width: 286px; + + &-cell { + text-align: center; + } + } + + &-header { + padding: 0 10px; + height: 34px; + line-height: 30px; + text-align: center; + user-select: none; + -webkit-user-select: none; + border-bottom: 1px solid #333; + + > a { + font-weight: bold; + display: inline-block; + padding: 0px 5px; + line-height: 34px; + text-align: center; + width: 30px; + + &:hover { + cursor: pointer; + color: #23c0fa; + } + } + + .@{prefixClass}-prev-month-btn { + position: absolute; + left: 25px; + + &:after { + content: "‹"; + } + } + + .@{prefixClass}-next-month-btn { + position: absolute; + right: 25px; + + &:after { + content: "›"; + } + } + } + + &-year-select, + &-month-select, + &-day-select { + display: inline-block; + font-size: 12px; + font-weight: bold; + color: #999; + padding: 0 8px; + line-height: 34px; + + &:hover { + cursor: pointer; + color: #23c0fa; + } + &.@{prefixClass}-time-status:hover { + cursor: pointer; + color: #999; + } + } + + &-prev-month-btn, + &-next-month-btn, + &-prev-year-btn, + &-next-year-btn { + position: absolute; + top: 0; + cursor: pointer; + color: #666; + font-family: Arial, "Hiragino Sans GB", "Microsoft Yahei", + "Microsoft Sans Serif", sans-serif; + padding: 0 5px; + font-size: 16px; + display: inline-block; + line-height: 34px; + + &:hover { + color: #23c0fa; + } + } + + &-next-year-btn { + right: 0; + + &:after { + content: "»"; + } + } + + &-prev-year-btn { + left: 0; + + &:after { + content: "«"; + } + } + + &-body { + padding: 9px 10px 10px; + height: 217px; + } + + table { + border-collapse: collapse; + max-width: 100%; + background-color: transparent; + width: 100%; + } + + table, + td, + th, + td { + border: none; + } + + &-table { + border-spacing: 0; + margin-bottom: 0; + } + + &-column-header { + line-height: 18px; + padding: 6px 0; + width: 33px; + text-align: center; + .@{prefixClass}-column-header-inner { + display: block; + font-weight: normal; + } + } + + &-week-number-header { + .@{prefixClass}-column-header-inner { + display: none; + } + } + + &-cell { + padding: 1px 0; + } + + &-date { + display: block; + margin: 0 auto; + color: #999; + border-radius: 4px 4px; + width: 26px; + height: 26px; + padding: 0; + background: transparent; + line-height: 26px; + text-align: center; + + &:hover { + background: #140500; + cursor: pointer; + } + } + + &-selected-day &-date { + background: tint(#3fc7fa, 80%); + } + + &-selected-date &-date { + background: #3fc7fa; + color: #000; + &:hover { + background: #3fc7fa; + } + } + + &-today &-date { + border: 1px solid #3fc7fa; + } + + &-disabled-cell &-date { + cursor: not-allowed; + color: #434343; + background: #0c0c0c; + border-radius: 0; + width: auto; + + &:hover { + background: #0c0c0c; + } + } + + &-disabled-cell-first-of-row &-date { + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; + } + + &-disabled-cell-last-of-row &-date { + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + } + + &-last-month-cell &-date, + &-next-month-btn-day &-date { + color: #444; + } + + &-footer { + border-top: 1px solid #333; + padding: 10px 0; + text-align: center; + position: relative; + + .@{timePickerClass} { + width: 90px; + &-input { + height: 24px; + } + } + &-show-ok { + text-align: right; + .@{prefixClass} { + &-footer-btn { + padding-right: 12px; + } + + &-time-picker-btn { + margin-left: 0; + padding: 0 12px; + } + &-today-btn { + float: left; + padding-left: 12px; + } + } + } + } + + &-footer-btn { + margin-top: 2px; + + &:after { + content: "x"; + height: 0; + font-size: 0; + overflow: hidden; + clear: both; + } + } + + &-time-picker-btn { + margin-left: 10px; + } + + &-today-btn, + &-ok-btn, + &-time-picker-btn { + display: inline-block; + text-align: center; + color: #f46830; + + &:hover { + cursor: pointer; + color: #23c0fa; + } + + &-disabled { + color: #444; + &:hover { + color: #444; + } + } + } + + &-today-btn { + padding-left: 10px; + } +} diff --git a/assets/dark/index/DecadePanel.less b/assets/dark/index/DecadePanel.less new file mode 100644 index 00000000..2239a8b8 --- /dev/null +++ b/assets/dark/index/DecadePanel.less @@ -0,0 +1,120 @@ +.@{prefixClass}-decade-panel { + left: 0; + top: 0; + bottom: 0; + right: 0; + background: #000000; + z-index: 10; + position: absolute; + outline: none; + display: flex; + flex-direction: column; + } + + .@{prefixClass}-decade-panel-hidden { + display: none; + } + + .@{prefixClass}-decade-panel-header { + padding: 0 10px; + height: 34px; + line-height: 34px; + position: relative; + text-align: center; + user-select: none; + -webkit-user-select: none; + border-bottom: 1px solid #ccc; + + > a { + font-weight: bold; + display: inline-block; + padding: 1px 5px; + text-align: center; + width: 30px; + + &:hover { + cursor: pointer; + color: #23c0fa; + } + } + } + + .@{prefixClass}-decade-panel-prev-century-btn, .@{prefixClass}-decade-panel-next-century-btn { + position: absolute; + top: 0; + } + + .@{prefixClass}-decade-panel-next-century-btn { + &:after { + content: '»' + } + } + + .@{prefixClass}-decade-panel-prev-century-btn { + user-select: none; + left: 0; + &:after { + content: '«' + } + } + + .@{prefixClass}-decade-panel-next-century-btn { + user-select: none; + right: 0; + } + + .@{prefixClass}-decade-panel-body { + flex: 1; + padding: 9px 10px 10px; + } + + .@{prefixClass}-decade-panel-footer { + border-top: 1px solid #333; + line-height: 38px; + } + + .@{prefixClass}-decade-panel-table { + table-layout: fixed; + width: 100%; + height: 100%; + border-collapse: separate; + } + + .@{prefixClass}-decade-panel-cell { + text-align: center; + } + + .@{prefixClass}-decade-panel-decade { + display: block; + margin: 0 auto; + color: #999; + border-radius: 4px 4px; + height: 36px; + padding: 0; + background: transparent; + line-height: 36px; + text-align: center; + + &:hover { + background: #140500; + cursor: pointer; + } + } + + .@{prefixClass}-decade-panel-selected-cell .@{prefixClass}-decade-panel-decade { + background: #3fc7fa; + color: #000; + + &:hover { + background: #3fc7fa; + color: #000; + } + } + + .@{prefixClass}-decade-panel-last-century-cell, .@{prefixClass}-decade-panel-next-century-cell { + .@{prefixClass}-decade-panel-decade{ + user-select: none; + -webkit-user-select: none; + color: rgba(255, 255, 255, 0.25); + } + } \ No newline at end of file diff --git a/assets/dark/index/Input.less b/assets/dark/index/Input.less new file mode 100644 index 00000000..792ae105 --- /dev/null +++ b/assets/dark/index/Input.less @@ -0,0 +1,24 @@ +.input() { + height: 25px; + position: relative; + display: inline-block; + margin: 0 0; + padding: 4px 10px; + border-radius: 6px 6px; + border: 1px solid #262626; + background-color: #000000; + color: #999; + line-height: 1.5; + transform: border 0.3s cubic-bezier(0.35, 0, 0.25, 1), + background 0.3s cubic-bezier(0.35, 0, 0.25, 1), + box-shadow 0.3s cubic-bezier(0.35, 0, 0.25, 1); + + &:hover { + border-color: #23c0fa; + } + + &:focus { + border-color: #23c0fa; + box-shadow: 0 0 3px #23c0fa; + } +} diff --git a/assets/dark/index/MonthPanel.less b/assets/dark/index/MonthPanel.less new file mode 100644 index 00000000..3d24711a --- /dev/null +++ b/assets/dark/index/MonthPanel.less @@ -0,0 +1,143 @@ +.@{prefixClass}-month-panel { + left: 0; + top: 0; + bottom: 0; + right: 0; + background: #000000; + z-index: 10; + position: absolute; + outline: none; + + > div { + height: 100%; + display: flex; + flex-direction: column; + } +} + +.@{prefixClass}-month-panel-hidden { + display: none; +} + +.@{prefixClass}-month-panel-header { + padding: 0 10px; + height: 34px; + line-height: 30px; + position: relative; + text-align: center; + user-select: none; + -webkit-user-select: none; + border-bottom: 1px solid #333; + + > a { + font-weight: bold; + display: inline-block; + padding: 4px 5px; + text-align: center; + width: 30px; + + &:hover { + cursor: pointer; + color: #23c0fa; + } + } +} + +.@{prefixClass}-month-panel-prev-year-btn, +.@{prefixClass}-month-panel-next-year-btn { + position: absolute; + top: 0; +} + +.@{prefixClass}-month-panel-next-year-btn { + &:after { + content: "»"; + } +} + +.@{prefixClass}-month-panel-prev-year-btn { + user-select: none; + left: 0; + + &:after { + content: "«"; + } +} + +.@{prefixClass}-month-panel .@{prefixClass}-month-panel-year-select { + width: 180px; +} + +.@{prefixClass}-month-panel-year-select-arrow { + display: none; +} + +.@{prefixClass}-month-panel-next-year-btn { + user-select: none; + right: 0; +} + +.@{prefixClass}-month-panel-body { + flex: 1; + padding: 9px 10px 10px; +} + +.@{prefixClass}-month-panel-footer { + border-top: 1px solid #333; + line-height: 38px; +} + +.@{prefixClass}-month-panel-table { + table-layout: fixed; + width: 100%; + height: 100%; + border-collapse: separate; +} + +.@{prefixClass}-month-panel-cell { + text-align: center; + + .@{prefixClass}-month-panel-month { + display: block; + width: 46px; + margin: 0 auto; + color: #999; + border-radius: 4px 4px; + height: 36px; + padding: 0; + background: transparent; + line-height: 36px; + text-align: center; + + &:hover { + background: #140500; + cursor: pointer; + } + } + + &-disabled { + .@{prefixClass}-month-panel-month { + color: #404040; + + &:hover { + background: black; + cursor: not-allowed; + } + } + } +} + +.@{prefixClass}-month-panel-selected-cell .@{prefixClass}-month-panel-month { + background: #3fc7fa; + color: #000; + + &:hover { + background: #3fc7fa; + color: #000; + } +} + +.@{prefixClass}-month-header-wrap { + position: relative; + height: 308px; +} diff --git a/assets/dark/index/Picker.less b/assets/dark/index/Picker.less new file mode 100644 index 00000000..3c111d3a --- /dev/null +++ b/assets/dark/index/Picker.less @@ -0,0 +1,110 @@ +.@{prefixClass} { + &-picker { + .effect() { + animation-duration: 0.3s; + animation-fill-mode: both; + transform-origin: 0 0; + display: block !important; + } + + &-slide-up-enter { + .effect(); + opacity: 0; + animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1); + animation-play-state: paused; + } + + &-slide-up-appear { + .effect(); + opacity: 0; + animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1); + animation-play-state: paused; + } + + &-slide-up-leave { + .effect(); + opacity: 1; + animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.34); + animation-play-state: paused; + } + + &-slide-up-enter&-slide-up-enter-active&-placement-bottomLeft, + &-slide-up-enter&-slide-up-enter-active&-placement-bottomRight, + &-slide-up-appear&-slide-up-appear-active&-placement-bottomLeft, + &-slide-up-appear&-slide-up-appear-active&-placement-bottomRight { + animation-name: rcDropdownSlideUpIn; + animation-play-state: running; + } + + &-slide-up-enter&-slide-up-enter-active&-placement-topLeft, + &-slide-up-enter&-slide-up-enter-active&-placement-topRight, + &-slide-up-appear&-slide-up-appear-active&-placement-topLeft, + &-slide-up-appear&-slide-up-appear-active&-placement-topRight { + animation-name: rcDropdownSlideDownIn; + animation-play-state: running; + } + + &-slide-up-leave&-slide-up-leave-active&-placement-bottomLeft, + &-slide-up-leave&-slide-up-leave-active&-placement-bottomRight { + animation-name: rcDropdownSlideUpOut; + animation-play-state: running; + } + + &-slide-up-leave&-slide-up-leave-active&-placement-topLeft, + &-slide-up-leave&-slide-up-leave-active&-placement-topRight { + animation-name: rcDropdownSlideDownOut; + animation-play-state: running; + } + + @keyframes rcDropdownSlideUpIn { + 0% { + opacity: 0; + transform-origin: 0% 0%; + transform: scaleY(0); + } + 100% { + opacity: 1; + transform-origin: 0% 0%; + transform: scaleY(1); + } + } + + @keyframes rcDropdownSlideUpOut { + 0% { + opacity: 1; + transform-origin: 0% 0%; + transform: scaleY(1); + } + 100% { + opacity: 0; + transform-origin: 0% 0%; + transform: scaleY(0); + } + } + + @keyframes rcDropdownSlideDownIn { + 0% { + opacity: 0; + transform-origin: 100% 100%; + transform: scaleY(0); + } + 100% { + opacity: 1; + transform-origin: 100% 100%; + transform: scaleY(1); + } + } + @keyframes rcDropdownSlideDownOut { + 0% { + opacity: 1; + transform-origin: 100% 100%; + transform: scaleY(1); + } + 100% { + opacity: 0; + transform-origin: 100% 100%; + transform: scaleY(0); + } + } + } +} diff --git a/assets/dark/index/Time.less b/assets/dark/index/Time.less new file mode 100644 index 00000000..c79c88ad --- /dev/null +++ b/assets/dark/index/Time.less @@ -0,0 +1,6 @@ +@import "./Input.less"; + +.@{prefixClass}-time-input { + .input(); + width: 40px; +} diff --git a/assets/dark/index/TimePanel.less b/assets/dark/index/TimePanel.less new file mode 100644 index 00000000..360bfa4e --- /dev/null +++ b/assets/dark/index/TimePanel.less @@ -0,0 +1,72 @@ +.@{prefixClass}-time-panel { + left: 0; + top: 0; + bottom: 0; + right: 0; + background: #000000; + z-index: 10; + position: absolute; + outline: none; +} + +.@{prefixClass}-time-panel-header { + padding: 0 10px; + height: 34px; + line-height: 34px; + position: relative; + text-align: center; + user-select: none; + -webkit-user-select: none; + border-bottom: 1px solid #333; +} + +.@{prefixClass}-time-panel-body { + padding: 9px 10px 10px; +} + +.@{prefixClass}-time-panel-title { + width: 180px; + font-weight: bold; + display: inline-block; + padding: 4px 5px; + text-align: center; + height: 30px; + line-height: 22px; + border-radius: 4px; +} + +.@{prefixClass}-time-panel-table { + table-layout: fixed; + width: 100%; + height: 255px; + border-collapse: separate; +} + +.@{prefixClass}-time-panel-cell { + text-align: center; + height: 42px; + vertical-align: middle; +} + +.@{prefixClass}-time-panel-time { + line-height: 26px; + display: block; + border-radius: 4px; + width: 26px; + margin: 0 auto; + + &:hover { + background: #140500; + cursor: pointer; + } +} + +.@{prefixClass}-time-panel-selected-cell .@{prefixClass}-time-panel-time { + background: #3fc7fa; + color: #000; + + &:hover { + background: #3fc7fa; + color: #000; + } +} diff --git a/assets/dark/index/YearPanel.less b/assets/dark/index/YearPanel.less new file mode 100644 index 00000000..17c5e05a --- /dev/null +++ b/assets/dark/index/YearPanel.less @@ -0,0 +1,134 @@ +.@{prefixClass}-year-panel { + left: 0; + top: 0; + bottom: 0; + right: 0; + background: #000000; + z-index: 10; + position: absolute; + outline: none; + + > div { + height: 100%; + display: flex; + flex-direction: column; + } + } + + .@{prefixClass}-year-panel-hidden { + display: none; + } + + .@{prefixClass}-year-panel-header { + padding: 0 10px; + height: 34px; + line-height: 30px; + position: relative; + text-align: center; + user-select: none; + -webkit-user-select: none; + border-bottom: 1px solid #333; + + > a { + font-weight: bold; + display: inline-block; + padding: 4px 5px; + text-align: center; + width: 30px; + + &:hover { + cursor: pointer; + color: #23c0fa; + } + } + } + + .@{prefixClass}-year-panel-prev-decade-btn, .@{prefixClass}-year-panel-next-decade-btn { + position: absolute; + top: 0; + } + + .@{prefixClass}-year-panel-next-decade-btn { + &:after { + content: '»' + } + } + + .@{prefixClass}-year-panel-prev-decade-btn { + user-select: none; + left: 0; + + &:after { + content: '«' + } + } + + .@{prefixClass}-year-panel .@{prefixClass}-year-panel-decade-select { + width: 180px; + } + + .@{prefixClass}-year-panel-decade-select-arrow { + display: none; + } + + .@{prefixClass}-year-panel-next-decade-btn { + user-select: none; + right: 0; + } + + .@{prefixClass}-year-panel-body { + flex: 1; + padding: 9px 10px 10px; + } + + .@{prefixClass}-year-panel-footer { + border-top: 1px solid #333; + line-height: 38px; + } + + .@{prefixClass}-year-panel-table { + table-layout: fixed; + width: 100%; + height: 100%; + border-collapse: separate; + } + + .@{prefixClass}-year-panel-cell { + text-align: center; + } + + .@{prefixClass}-year-panel-year { + display: block; + width: 46px; + margin: 0 auto; + color: #333; + border-radius: 4px 4px; + height: 36px; + padding: 0; + background: transparent; + line-height: 36px; + text-align: center; + + &:hover { + background: #140500; + cursor: pointer; + } + } + + .@{prefixClass}-year-panel-selected-cell .@{prefixClass}-year-panel-year { + background: #3fc7fa; + color: #000; + + &:hover { + background: #3fc7fa; + color: #000; + } + } + + .@{prefixClass}-year-panel-last-decade-cell, .@{prefixClass}-year-panel-next-decade-cell { + .@{prefixClass}-year-panel-year{ + user-select: none; + -webkit-user-select: none; + color: rgba(255, 255, 255, 0.25); + } + } \ No newline at end of file From 25c51e48ee1cd845c517d64a50f6045f80b5bca4 Mon Sep 17 00:00:00 2001 From: kcolfyksor Date: Wed, 23 Sep 2020 11:48:43 +0800 Subject: [PATCH 2/2] update travis --- .travis.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7aff03e0..24f38cf2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,14 +4,14 @@ sudo: false notifications: email: - - yiminghe@gmail.com - - hust2012jiangkai@gmail.com + - yiminghe@gmail.com + - hust2012jiangkai@gmail.com node_js: -- 10 + - 10 before_install: -- | + - | if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md$)|(^(docs|examples))/' then echo "Only docs were updated, stopping build process." @@ -19,15 +19,17 @@ before_install: fi npm install npm@3.x -g phantomjs --version + script: -- | + - | if [ "$TEST_TYPE" = test ]; then npm test -- --coverage && \ bash <(curl -s https://codecov.io/bash) else npm run $TEST_TYPE fi + env: matrix: - - TEST_TYPE=lint - - TEST_TYPE=test + - TEST_TYPE=lint + - TEST_TYPE=test