_netdisk.less 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. @keyframes shake {
  2. 0% { transform: translate(0, 0); }
  3. 15% { transform: translate(-2px, -2px); }
  4. 35% { transform: translate(2px, -2px);}
  5. 65% { transform: translate(-2px, 2px); }
  6. 85% { transform: translate(2px, 2px); }
  7. 100% { transform: translate(0, 0); }
  8. }
  9. @keyframes shake-left-right {
  10. 0% { transform: translate(0, 0); }
  11. 25% { transform: translate(-3px, 0); }
  12. 75% { transform: translate(3px, 0); }
  13. 100% { transform: translate(0, 0); }
  14. }
  15. .netdisk-finder {
  16. .dir.drag-enter {
  17. border: 1px dashed #717B94 !important;
  18. background: #F9F9F9;
  19. }
  20. &.drop-mode {
  21. .dir {
  22. animation: shake .3s ease;
  23. }
  24. .recycle {
  25. animation: shake .3s ease;
  26. }
  27. }
  28. &.recycle-bin {
  29. .head .control {
  30. .button.mkdir {
  31. display: none;
  32. }
  33. .button.recycle {
  34. display: none;
  35. }
  36. .button.recycle-clear {
  37. display: block;
  38. }
  39. }
  40. .file-list .file-list-item.dir:after {
  41. display: none;
  42. }
  43. }
  44. .head {
  45. padding-bottom: 10px;
  46. height: 30px;
  47. border-bottom: 1px solid #eee;
  48. .control {
  49. float: right;
  50. .button {
  51. vertical-align: middle;
  52. font-size: 0;
  53. background: url(../images/finder.svg) no-repeat;
  54. width: 30px;
  55. height: 30px;
  56. border-radius: 2px;
  57. box-sizing: border-box;
  58. border: 1px solid transparent;
  59. &:hover {
  60. border: 1px solid lighten(#717B94, 30%);
  61. }
  62. &:active {
  63. box-shadow: inset 0 1px 3px fadeOut(#717B94, 80%);
  64. }
  65. &.recycle {
  66. background-position: -30px 0;
  67. &.drag-enter {
  68. background-position: -60px 0 !important;
  69. }
  70. }
  71. &.recycle-clear {
  72. display: none;
  73. background-position: -90px 0;
  74. }
  75. }
  76. }
  77. .nav {
  78. font-size: 18px;
  79. span, a {
  80. display: inline-block;
  81. height: 20px;
  82. line-height: 20px;
  83. padding: 5px 10px;
  84. margin: 0 3px 0 0;
  85. cursor: default;
  86. vertical-align: middle;
  87. }
  88. span.my-document {
  89. width: 25px;
  90. height: 25px;
  91. padding: 0;
  92. text-indent: -1000px;
  93. position: relative;
  94. top: -2px;
  95. background: url(../images/icons.png) 0 -470px;
  96. }
  97. a.dir-back {
  98. border-radius: 100%;
  99. width: 23px;
  100. height: 23px;
  101. padding: 0;
  102. border: 1px solid @ui-color;
  103. text-indent: -1000px;
  104. position: relative;
  105. top: -1px;
  106. background: url(../images/icons.png) -2px -396px no-repeat;
  107. }
  108. span.spliter {
  109. .triangle-left(black,4px,8px);
  110. display: inline-block;
  111. margin-left: 4px;
  112. }
  113. a {
  114. border: 1px solid transparent;
  115. &:hover {
  116. background-color: lighten(@tab-hover, 55%);
  117. }
  118. &:active {
  119. background-color: lighten(@tab-active, 55%)
  120. }
  121. }
  122. }
  123. }
  124. .file-list {
  125. .dock(41px, 0, 0, 0);
  126. margin: 0;
  127. padding: 0;
  128. list-style: none;
  129. overflow: auto;
  130. overflow-x: hidden;
  131. .empty {
  132. height: 50px;
  133. line-height: 50px;
  134. text-align: center;
  135. font-size: 18px;
  136. color: #ccc;
  137. }
  138. .file-list-item {
  139. font-size: 14px;
  140. height: 20px;
  141. line-height: 20px;
  142. padding: 10px 20px 10px 40px;
  143. cursor: default;
  144. -webkit-user-drag: element;
  145. -khtml-user-drag: element;
  146. border: 1px solid transparent;
  147. .rename-button {
  148. display: inline-block;
  149. width: 20px;
  150. height: 20px;
  151. margin-left: 10px;
  152. vertical-align: middle;
  153. border-radius: 2px;
  154. box-sizing: border-box;
  155. border: 1px solid transparent;
  156. opacity: 0;
  157. transition: transform,opacity ease .2s;
  158. transform: scale(0);
  159. font-size: 0;
  160. &:hover {
  161. border: 1px solid lighten(#717B94, 30%);
  162. }
  163. &:active {
  164. box-shadow: inset 0 1px 3px fadeOut(#717B94, 80%);
  165. }
  166. }
  167. .filename {
  168. height: 20px;
  169. line-height: 20px;
  170. vertical-align: middle;
  171. }
  172. input {
  173. margin: 0;
  174. outline: none;
  175. width: 61.80%;
  176. -moz-user-select: default;
  177. }
  178. &:hover {
  179. .rename-button {
  180. transition: transform,opacity ease .2s .5s;
  181. transform: scale(1);
  182. opacity: 1;
  183. background: url(../images/icons.png) 1px -1130px;
  184. }
  185. }
  186. &.selected {
  187. &:hover .rename-button {
  188. background: url(../images/icons.png) 1px -1110px;
  189. }
  190. background-color: lighten(@tab-active, 20%);
  191. color: white;
  192. &.dir .icon {
  193. background: lighten(@tab-active, 20%) url(../images/icons.png) 0 -1085px;
  194. }
  195. &.dir:after {
  196. border-left-color: white;
  197. }
  198. &.file .icon {
  199. background: lighten(@tab-active, 20%) url(../images/icons.png) 0 -545px;
  200. }
  201. }
  202. &.dragging {
  203. border: 1px solid #717B94;
  204. }
  205. &.file {
  206. position: relative;
  207. .icon {
  208. display: block;
  209. position: absolute;
  210. width: 25px;
  211. height: 25px;
  212. left: 5px;
  213. top: 7px;
  214. background: url(../images/icons.png) 0 -445px no-repeat;
  215. }
  216. }
  217. &.renaming {
  218. input.invalid-name {
  219. animation: shake-left-right .3s ease;
  220. }
  221. .rename-button {
  222. display: none !important;
  223. }
  224. }
  225. &.dir {
  226. position: relative;
  227. .icon {
  228. display: block;
  229. position: absolute;
  230. width: 25px;
  231. height: 25px;
  232. left: 5px;
  233. top: 7px;
  234. background: url(../images/icons.png) 0 -420px no-repeat;
  235. }
  236. &:after {
  237. .triangle-left(black,4px,8px);
  238. position: absolute;
  239. right: 5px;
  240. top: 20px;
  241. margin-top: -4px;
  242. }
  243. }
  244. }
  245. }
  246. }
  247. .netdisk-open-panel .netdisk-finder {
  248. .dock;
  249. }
  250. .netdisk-save-panel .netdisk-finder {
  251. .dock(0, 0, 50px, 0);
  252. }
  253. // for save
  254. .netdisk-save-panel .netdisk-file-list {
  255. bottom: 50px;
  256. }
  257. .netdisk-save-select {
  258. .dock(auto, 0, 0, 0);
  259. height: auto;
  260. padding: 10px;
  261. border-top: 1px solid #EEE;
  262. background: #fcfcfc;
  263. label {
  264. display: inline-block;
  265. padding: 0 10px 0 0;
  266. vertical-align: middle;
  267. margin-top: 5px;
  268. }
  269. & > input {
  270. width: 50%;
  271. margin: 0;
  272. margin-top: 5px;
  273. margin-right: 10px;
  274. vertical-align: middle;
  275. }
  276. & > select {
  277. margin: 5px 0 0 0;
  278. outline: none;
  279. vertical-align: middle;
  280. }
  281. & > .save-button {
  282. float: right;
  283. width: 80px;
  284. vertical-align: middle;
  285. }
  286. }