index.html 8.1 KB

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