index.html 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. <head>
  2. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  3. <title>paint</title>
  4. <script type="text/javascript" src="/js/jquery.min.js"></script>
  5. <link rel="stylesheet" href="/css/bootstrap.min.css">
  6. <script type="text/javascript" src="/js/bootstrap.min.js"></script>
  7. <link rel="stylesheet" href="/css/style.css">
  8. <link rel="preconnect" href="https://fonts.googleapis.com">
  9. <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  10. <link href="https://fonts.googleapis.com/css2?family=Anonymous+Pro:ital,wght@0,400;0,700;1,400;1,700
  11. &family=Noto+Serif+SC:wght@300;400;500;600;700&display=swap" rel="stylesheet">
  12. <style>
  13. .hd,
  14. .hdt,
  15. #now-color,
  16. .pixel {
  17. transition-duration: 100ms;
  18. }
  19. .box {
  20. display: inline-block;
  21. margin: auto;
  22. margin-top: 10px;
  23. margin-bottom: 10px;
  24. cursor: pointer;
  25. width: 180px;
  26. height: 7px;
  27. background-color: rgba(215, 215, 215, 0.7);
  28. position: relative;
  29. vertical-align: middle;
  30. }
  31. .box .hd {
  32. width: 16px;
  33. height: 16px;
  34. background-color: rgba(215, 215, 215, 1);
  35. border-radius: 6px;
  36. position: absolute;
  37. left: 0;
  38. top: -6px;
  39. cursor: pointer;
  40. margin: 0;
  41. transform: translateX(-9px);
  42. z-index: 2;
  43. }
  44. .box .hdt {
  45. position: absolute;
  46. top: 0;
  47. left: 0;
  48. height: 7px;
  49. width: 0;
  50. margin: 0;
  51. }
  52. #box-r .hd {
  53. background-image: linear-gradient(60deg, #e57070, rgba(215, 215, 215, 0.5));
  54. border: 1px solid #ef2929
  55. }
  56. #box-g .hd {
  57. background-image: linear-gradient(60deg, #5dbd79, rgba(215, 215, 215, 0.5));
  58. border: 1px solid #22b14c
  59. }
  60. #box-b .hd {
  61. background-image: linear-gradient(60deg, #91b0d2, rgba(215, 215, 215, 0.5));
  62. border: 1px solid #729fcf
  63. }
  64. #box-r .hdt {
  65. background-image: linear-gradient(60deg, #eb9696, #ef2929);
  66. }
  67. #box-g .hdt {
  68. background-image: linear-gradient(60deg, #88be98, #22b14c);
  69. }
  70. #box-b .hdt {
  71. background-image: linear-gradient(60deg, #b8c7d7, #729fcf);
  72. }
  73. .box-text {
  74. user-select: none;
  75. width: 25px;
  76. z-index: -1;
  77. transform: translate(-105px, -10px);
  78. background-color: rgba(215, 215, 215, 0.7);
  79. border: 2px solid rgba(215, 215, 215, 0.7);
  80. border-radius: 5px;
  81. }
  82. * {
  83. -webkit-box-sizing: content-box;
  84. box-sizing: content-box;
  85. }
  86. #main {
  87. display: flex;
  88. flex-direction: row;
  89. width: 900px;
  90. margin: 0 auto;
  91. margin-top: -20px;
  92. text-align: center;
  93. }
  94. #draw {
  95. width: 640px;
  96. height: 640px;
  97. display: flex;
  98. flex-direction: row;
  99. flex-wrap: wrap;
  100. margin: auto;
  101. transition-duration: 0.3s;
  102. transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  103. transform-origin: 0px 0px;
  104. border: 1px solid rgb(211, 211, 211);
  105. }
  106. .pixel {
  107. width: 5px;
  108. height: 5px;
  109. }
  110. #color-list {
  111. display: flex;
  112. flex-direction: column;
  113. flex-wrap: wrap;
  114. padding: 0;
  115. margin: auto;
  116. }
  117. #tools {
  118. display: flex;
  119. flex-direction: column;
  120. width: 250px;
  121. position: fixed;
  122. bottom: 20px;
  123. right: 20px;
  124. transition-duration: 0.3s;
  125. transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  126. background-color: rgba(15, 15, 15, 0.1);
  127. border: 5px solid rgba(15, 15, 15, 0.1);
  128. border-radius: 15px;
  129. backdrop-filter: blur(5px);
  130. }
  131. .color-item {
  132. cursor: pointer;
  133. height: 20px;
  134. width: 20px;
  135. }
  136. #now-color {
  137. width: 80px;
  138. height: 80px;
  139. margin: auto;
  140. border: 1px solid rgb(147, 147, 147);
  141. border-radius: 15px;
  142. background-color: #000;
  143. }
  144. li {
  145. list-style: none;
  146. margin-bottom: 3px;
  147. display: block;
  148. box-sizing: border-box;
  149. }
  150. .btn {
  151. text-shadow: rgb(133, 133, 130) 1px 2px 3px;
  152. }
  153. .noshadow {
  154. text-shadow: none;
  155. }
  156. #controls {
  157. position: fixed;
  158. text-align: left;
  159. left: 0;
  160. right: 0;
  161. margin: 0 auto;
  162. bottom: 10px;
  163. width: 700px;
  164. padding-left: 3px;
  165. padding-right: 5px;
  166. transition-duration: 0.3s;
  167. transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  168. border: 5px solid rgba(15, 15, 15, 0.1);
  169. border-radius: 15px;
  170. background-color: rgba(15, 15, 15, 0.1);
  171. backdrop-filter: blur(5px);
  172. }
  173. #version {
  174. background-color: rgba(215, 215, 215, 0.7);
  175. border-radius: 5px;
  176. padding-right: 3px;
  177. }
  178. </style>
  179. <script src="/js/av-min.js"></script>
  180. <script src="https://apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script>
  181. <script type="text/javascript" src="/js/paint.js">
  182. </script>
  183. </head>
  184. <body>
  185. <a class="btn btn-info" href="/"><span class="glyphicon glyphicon-home" aria-hidden="true"></span>&nbsp;返回</a>
  186. <div id="main" style="text-align:center">
  187. <div id="draw"></div>
  188. <div id="tools">
  189. <button class="btn" id="toggle" style="background:rgba(215, 215, 215,0.7)"><span class="glyphicon glyphicon-eye-open" aria-hidden="true"></span></button>
  190. <div id="now-color"></div>
  191. <div class="box canToggle" id="box-r">
  192. <i class="hd blurred"></i>
  193. <i class="hdt"></i>
  194. <input class="box-text" id="box-r-text" onfocus="this.select()" />
  195. </div>
  196. <div class="box canToggle" id="box-g">
  197. <i class="hd blurred"></i>
  198. <i class="hdt"></i>
  199. <input class="box-text" id="box-g-text" onfocus="this.select()" />
  200. </div>
  201. <div class="box canToggle" id="box-b">
  202. <i class="hd blurred"></i>
  203. <i class="hdt"></i>
  204. <input class="box-text" id="box-b-text" onfocus="this.select()" />
  205. </div>
  206. <ul class="canToggle" id="color-list"></ul>
  207. </div>
  208. </div>
  209. <div id="controls">
  210. <button class="btn btn-default noshadow" id="help" onclick="alert('说明:左键绘制,右键擦除。\n键盘AD键或屏幕下方按键可浏览历史版本,鼠标悬停于版本上可查看时间。\n点击上传后,同一设备一天内的编辑将会保存在一个版本中,并对所有人可见。')"><span class="glyphicon glyphicon-question-sign" aria-hidden="true"></span></button>
  211. <button class="btn btn-info" id="zoom"><span class="glyphicon glyphicon-zoom-in" aria-hidden="true"></span>&nbsp;缩放</button>
  212. <div class="btn-group">
  213. <button class="btn btn-primary" id="upload"><span class="glyphicon glyphicon-cloud-upload" aria-hidden="true"></span>&nbsp;上传</button>
  214. <button class="btn btn-primary" id="reset"><span class="glyphicon glyphicon-cloud-download" aria-hidden="true"></span>&nbsp;同步</button>
  215. </div>
  216. <div class="btn-group">
  217. <a id="lbtn" tabindex="0" class="btn btn-default noshadow" onclick="prevVer()">
  218. <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"><kbd>A</kbd></span>
  219. </a>
  220. <a id="rbtn" tabindex="0" class="btn btn-default noshadow" onclick="nextVer()">
  221. <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"><kbd>D</kbd></span>
  222. </a>
  223. </div>
  224. <span id="version" style="margin-right:auto"></span>
  225. </div>
  226. </body>