You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

350 lines
13 KiB

  1. $ax5calendar-control-bg: #f5f5f5 !default;
  2. $ax5calendar-control-border: 1px solid #ddd !default;
  3. $ax5calendar-control-border-radius: 5px !default;
  4. $ax5calendar-control-font-size: ceil(($font-size-base * 1.25)) !default;
  5. $ax5calendar-control-text-color: #222 !default;
  6. $ax5calendar-control-hover-text-color: $brand-primary !default;
  7. $ax5calendar-control-padding: 0 !default;
  8. $ax5calendar-header-bg: (#FFFFFF, #FFFFFF) !default;
  9. $ax5calendar-header-border: 0px none !default;
  10. $ax5calendar-header-padding: 0px 2px !default;
  11. $ax5calendar-header-font-size: ceil(($font-size-base * 0.8)) !default;
  12. $ax5calendar-body-bg: (#FFFFFF, #FFFFFF) !default;
  13. $ax5calendar-body-border: 0px none !default;
  14. $ax5calendar-body-font-size: ceil(($font-size-base * 1)) !default;
  15. $ax5calendar-body-animation-in: ax5-ui-calendar-fadein !default;
  16. $ax5calendar-body-animation-out: ax5-ui-calendar-fadeout !default;
  17. $ax5calendar-sun-text-color: #C78B81 !default;
  18. $ax5calendar-sat-text-color: #32B4DC !default;
  19. $ax5calendar-date-bg: (#FFFFFF, #FFFFFF) !default;
  20. $ax5calendar-date-text-color: #C3C4C6 !default;
  21. $ax5calendar-live-bg: (#F0F0F0, #F0F0F0) !default;
  22. $ax5calendar-live-text-color: #6D6E70 !default;
  23. $ax5calendar-hover-bg: (#32B4DC, #32B4DC) !default;
  24. $ax5calendar-hover-text-color: #fff !default;
  25. $ax5calendar-focus-bg: (#E67241, #E67241) !default;
  26. $ax5calendar-focus-text-color: #fff !default;
  27. $ax5calendar-period-bg: (#82d3fa, #82d3fa) !default;
  28. $ax5calendar-period-text-color: #fff !default;
  29. $ax5calendar-item-day-radius: 5px !default;
  30. $ax5calendar-item-month-radius: 5px !default;
  31. $ax5calendar-item-year-radius: 5px !default;
  32. @mixin extend-item-theme() {
  33. &.holiday {
  34. color: $ax5calendar-sun-text-color;
  35. }
  36. }
  37. // mixins --------------------------------------------- end
  38. @include keyframes(ax5-ui-calendar-fadeout) {
  39. from {
  40. opacity: 1.0;
  41. }
  42. to {
  43. opacity: 0.5;
  44. }
  45. }
  46. @include keyframes(ax5-ui-calendar-fadein) {
  47. from {
  48. opacity: 0.5;
  49. }
  50. to {
  51. opacity: 1.0;
  52. }
  53. }
  54. .ax5-ui-calendar {
  55. box-sizing: border-box;
  56. * {
  57. box-sizing: border-box;
  58. }
  59. position: relative;
  60. .calendar-control {
  61. position: relative;
  62. box-sizing: content-box;
  63. @include ax-background($ax5calendar-control-bg);
  64. border: $ax5calendar-control-border;
  65. border-radius: $ax5calendar-control-border-radius;
  66. font-size: $ax5calendar-control-font-size;
  67. margin-bottom: 5px;
  68. padding: $ax5calendar-control-padding;
  69. .date-move-left, .date-move-right {
  70. display: block;
  71. position: absolute;
  72. overflow: hidden;
  73. text-align: center;
  74. font-size: ceil($ax5calendar-control-font-size * 1.2);
  75. cursor: pointer;
  76. text-decoration: none;
  77. padding: $ax5calendar-control-padding;
  78. i, span {
  79. line-height: inherit;
  80. }
  81. }
  82. .date-move-left {
  83. left: 0px;
  84. top: 0px;
  85. }
  86. .date-move-right {
  87. right: 0px;
  88. top: 0px;
  89. }
  90. .date-display {
  91. text-align: center;
  92. [data-calendar-display] {
  93. margin: 0px 10px;
  94. cursor: pointer;
  95. text-decoration: underline;
  96. }
  97. }
  98. color: $ax5calendar-control-text-color;
  99. a {
  100. color: $ax5calendar-control-text-color;
  101. }
  102. a:hover {
  103. color: $ax5calendar-control-hover-text-color;
  104. }
  105. }
  106. .calendar-body {
  107. &.fadein {
  108. @include animation($ax5calendar-body-animation-in 0.1s ease-in-out);
  109. opacity: 1.0;
  110. }
  111. &.fadeout {
  112. @include animation($ax5calendar-body-animation-out 0.1s ease-in-out);
  113. opacity: 0.0;
  114. }
  115. table {
  116. box-sizing: border-box;
  117. table-layout: fixed;
  118. border-collapse: collapse;
  119. border-spacing: 0px;
  120. border: 0px none;
  121. thead {
  122. td, th {
  123. box-sizing: border-box;
  124. vertical-align: middle;
  125. line-height: 1em;
  126. cursor: pointer;
  127. text-align: center;
  128. font-size: $ax5calendar-header-font-size;
  129. padding: $ax5calendar-header-padding;
  130. border: $ax5calendar-header-border;
  131. overflow: hidden;
  132. @include ax-background($ax5calendar-header-bg);
  133. color: $ax5calendar-live-text-color;
  134. &.calendar-col-0 {
  135. color: $ax5calendar-sun-text-color;
  136. }
  137. &.calendar-col-6 {
  138. color: $ax5calendar-sat-text-color;
  139. }
  140. }
  141. }
  142. tbody {
  143. td, th {
  144. box-sizing: border-box;
  145. vertical-align: middle;
  146. line-height: 1em;
  147. cursor: pointer;
  148. text-align: center;
  149. font-size: $ax5calendar-body-font-size;
  150. border: $ax5calendar-body-border;
  151. @include ax-background($ax5calendar-body-bg);
  152. overflow: hidden;
  153. .calendar-item-day {
  154. position: relative;
  155. display: block;
  156. width: 100%;
  157. height: 100%;
  158. vertical-align: middle;
  159. border-radius: $ax5calendar-item-day-radius;
  160. overflow: hidden;
  161. line-height: inherit;
  162. @include ax-background($ax5calendar-date-bg);
  163. color: $ax5calendar-date-text-color;
  164. font-size: $ax5calendar-body-font-size;
  165. span.addon {
  166. position: absolute;
  167. width: 100%;
  168. text-align: center;
  169. line-height: $ax5calendar-body-font-size * 0.8;
  170. font-size: $ax5calendar-body-font-size * 0.8;
  171. &.addon-header {
  172. left: 0px;
  173. top: 1px;
  174. }
  175. &.addon-footer {
  176. left: 0px;
  177. bottom: 1px;
  178. }
  179. }
  180. &.live {
  181. @include ax-background($ax5calendar-live-bg);
  182. color: $ax5calendar-live-text-color;
  183. span.addon {
  184. color: #A1A1A1;
  185. }
  186. &.sunday {
  187. color: $ax5calendar-sun-text-color;
  188. }
  189. &.saturday {
  190. color: $ax5calendar-sat-text-color;
  191. }
  192. }
  193. &.focus {
  194. @include ax-background($ax5calendar-focus-bg);
  195. color: $ax5calendar-focus-text-color;
  196. span.addon {
  197. color: $ax5calendar-focus-text-color;
  198. }
  199. &.hover {
  200. @include ax-background($ax5calendar-hover-bg);
  201. color: $ax5calendar-hover-text-color !important;
  202. span.addon {
  203. color: $ax5calendar-hover-text-color;
  204. }
  205. }
  206. }
  207. &.period {
  208. @include ax-background($ax5calendar-period-bg);
  209. color: $ax5calendar-period-text-color !important;
  210. span.addon {
  211. color: $ax5calendar-period-text-color;
  212. }
  213. }
  214. &.selected-day {
  215. @include ax-background($ax5calendar-hover-bg);
  216. color: $ax5calendar-hover-text-color !important;
  217. span.addon {
  218. color: $ax5calendar-hover-text-color;
  219. }
  220. }
  221. &.disable {
  222. @include ax-background($ax5calendar-date-bg);
  223. color: lighten($ax5calendar-date-text-color, 10%);
  224. }
  225. @include extend-item-theme();
  226. }
  227. .calendar-item-month {
  228. display: block;
  229. width: 100%;
  230. height: 100%;
  231. vertical-align: middle;
  232. border-radius: $ax5calendar-item-month-radius;
  233. overflow: hidden;
  234. line-height: inherit;
  235. @include ax-background($ax5calendar-date-bg);
  236. color: $ax5calendar-date-text-color;
  237. font-size: $ax5calendar-body-font-size;
  238. &.live {
  239. @include ax-background($ax5calendar-live-bg);
  240. color: $ax5calendar-live-text-color;
  241. }
  242. &.hover {
  243. @include ax-background($ax5calendar-hover-bg);
  244. color: $ax5calendar-hover-text-color;
  245. }
  246. &.focus {
  247. @include ax-background($ax5calendar-focus-bg);
  248. color: $ax5calendar-focus-text-color;
  249. }
  250. &.selected-month {
  251. @include ax-background($ax5calendar-hover-bg);
  252. color: $ax5calendar-hover-text-color !important;
  253. span.addon {
  254. color: $ax5calendar-hover-text-color;
  255. }
  256. span.lunar {
  257. color: $ax5calendar-hover-text-color;
  258. }
  259. }
  260. &.disable {
  261. @include ax-background($ax5calendar-date-bg);
  262. color: lighten($ax5calendar-date-text-color, 10%);
  263. }
  264. @include extend-item-theme();
  265. }
  266. .calendar-item-year {
  267. display: block;
  268. width: 100%;
  269. height: 100%;
  270. vertical-align: middle;
  271. border-radius: $ax5calendar-item-year-radius;
  272. overflow: hidden;
  273. line-height: inherit;
  274. @include ax-background($ax5calendar-date-bg);
  275. color: $ax5calendar-date-text-color;
  276. font-size: $ax5calendar-body-font-size;
  277. &.live {
  278. @include ax-background($ax5calendar-live-bg);
  279. color: $ax5calendar-live-text-color;
  280. }
  281. &.hover {
  282. @include ax-background($ax5calendar-hover-bg);
  283. color: $ax5calendar-hover-text-color;
  284. }
  285. &.focus {
  286. @include ax-background($ax5calendar-focus-bg);
  287. color: $ax5calendar-focus-text-color;
  288. }
  289. &.selected-year {
  290. @include ax-background($ax5calendar-hover-bg);
  291. color: $ax5calendar-hover-text-color !important;
  292. span.addon {
  293. color: $ax5calendar-hover-text-color;
  294. }
  295. span.lunar {
  296. color: $ax5calendar-hover-text-color;
  297. }
  298. }
  299. &.disable {
  300. @include ax-background($ax5calendar-date-bg);
  301. color: lighten($ax5calendar-date-text-color, 10%);
  302. }
  303. @include extend-item-theme();
  304. }
  305. /*
  306. &.calendar-col-0 {
  307. .calendar-item-day.live {
  308. color: $ax5calendar-sun-text-color;
  309. @include extend-item-theme();
  310. }
  311. }
  312. &.calendar-col-6 {
  313. .calendar-item-day.live {
  314. color: $ax5calendar-sat-text-color;
  315. @include extend-item-theme();
  316. }
  317. }
  318. */
  319. }
  320. }
  321. }
  322. }
  323. }