index.html 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. <!DOCTYPE html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  4. <title>娱乐</title>
  5. <script type="text/javascript" src="/js/jquery.min.js"></script>
  6. <link rel="stylesheet" href="/css/bootstrap.min.css">
  7. <script type="text/javascript" src="/js/bootstrap.min.js"></script>
  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. <link rel="stylesheet" href="/css/style.css">
  13. <!-- <link rel="stylesheet" href="/css/style.css"> -->
  14. <style>
  15. *:not(svg, path, g) {
  16. transition-duration: 300ms;
  17. }
  18. /* https://i.328888.xyz/2022/12/23/Dn9eo.jpeg */
  19. .btn {
  20. text-shadow: rgb(133, 133, 130) 1px 2px 3px;
  21. transition-duration: 100ms;
  22. transition-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
  23. }
  24. .btn:not(.btn-sm) {
  25. margin-top: 5px;
  26. }
  27. /* .btn:hover {
  28. text-shadow: rgb(33, 33, 30, 0.8) 3px 3px 5px;
  29. transform: rotate(2deg) translate(-2px, -4px);
  30. } */
  31. #random:hover {
  32. text-shadow: -3px -3px 3px rosybrown, 3px 3px 3px royalblue, 3px -3px 5px whitesmoke, -3px 3px 5px whitesmoke, -3px -3px 5px yellow;
  33. }
  34. #paint:hover {
  35. text-shadow: -3px -3px 3px rgb(95, 192, 150), 3px 3px 3px rgb(131, 221, 226), 3px -3px 5px rgb(151, 124, 225), -3px 3px 5px whitesmoke, -3px -3px 5px yellow;
  36. }
  37. #chess:hover {
  38. text-shadow: rgb(13, 13, 10, 0.8) -1px -2px 3px, whitesmoke 1px 2px 3px, whitesmoke -1px 2px 3px;
  39. }
  40. #gravity:hover {
  41. text-shadow: seagreen -1px -2px 3px, grey 1px 2px 3px, whitesmoke -1px 2px 3px;
  42. }
  43. img {
  44. border: 3px dotted grey;
  45. width: 300px;
  46. }
  47. .btn.nohover:hover {
  48. transform: none;
  49. outline: none;
  50. text-shadow: none;
  51. }
  52. body {
  53. background: url('../fun/chat/ai-game/1/duck.png'), #f88;
  54. background-blend-mode: screen
  55. }
  56. .btn {
  57. position: relative;
  58. top: 0px;
  59. transition: all 0.2s;
  60. }
  61. .btn:hover {
  62. top: -2px;
  63. }
  64. .btn:active {
  65. top: 5px;
  66. }
  67. svg {
  68. margin-top: 1rem;
  69. width: 30vmin;
  70. height: auto;
  71. filter: url(#shadow-large);
  72. }
  73. </style>
  74. <script src='https://cdnjs.cloudflare.com/ajax/libs/animejs/2.2.0/anime.min.js'></script>
  75. <script>
  76. const zeroPadded = number => ((number >= 10) ? number.toString() : `0${number}`);
  77. const twelveClock = (twentyFourClock) => {
  78. if (twentyFourClock === 0) {
  79. return 12;
  80. } if (twentyFourClock > 12) {
  81. return twentyFourClock - 12;
  82. }
  83. return twentyFourClock;
  84. };
  85. var tot = 0;
  86. function getTime() {
  87. setTimeout(() => {
  88. var click = new Audio('clock.mp3');
  89. click.volume = .3;
  90. click.preload = true;
  91. click.play();
  92. }, 900);
  93. var now = new Date();
  94. var hours = now.getHours();
  95. var minutes = now.getMinutes();
  96. if (now.getSeconds() == 0) tot++;
  97. console.log(tot, now.getSeconds())
  98. var seconds = now.getSeconds() + tot * 60;
  99. var time = {
  100. hours: twelveClock(hours), // 1-12
  101. minutes, // 0-59
  102. seconds, // 0-59
  103. };
  104. var rotation = {
  105. hours: twelveClock(hours),
  106. minutes,
  107. seconds,
  108. };
  109. var entries = Object.entries(time);
  110. entries.forEach(([key, value]) => {
  111. console.log((key === 'hours') ? `rotate(${-15 + value * 30})` : `rotate(${value * 6})`)
  112. anime({
  113. targets: `g.${key}`,
  114. transform: (key === 'hours') ? `rotate(${-15 + value * 30})` : `rotate(${value * 6})`,
  115. duration: 400,
  116. });
  117. });
  118. }
  119. $().ready(function () {
  120. const clockFace = $('svg g.clock--face')[0];
  121. for (let i = 0; i < 12; i += 1) {
  122. clockFace.innerHTML += `<text transform="rotate(${-90 + 30 * (i + 1)}) translate(34 0) rotate(${90 - 30 * (i + 1)})" >${zeroPadded(i + 1)}</text>`;
  123. }
  124. getTime();
  125. setInterval(getTime, 1000);
  126. })
  127. </script>
  128. </head>
  129. <body>
  130. <a class="btn btn-info" href="/"><span class="glyphicon glyphicon-home"></span>&nbsp;返回</a>
  131. <div class="page-header">
  132. <h2>> 娱乐 <small>首页放不下了,根目录也太挤了,再有千奇百怪的想法我都往这扔</small></h2>
  133. </div>
  134. <div>
  135. <a class="btn btn-warning" href="core/">Core</a>
  136. <div class="btn-group">
  137. <button type="button" class="btn btn-warning dropdown-toggle" data-toggle="dropdown">sans&nbsp;<span class="caret"></span></button>
  138. <ul class="dropdown-menu">
  139. <li><a href="sans/">sans</a></li>
  140. <li><a href="sans-cheat/"><span class="glyphicon glyphicon-wrench"></span>&nbsp;&nbsp;sans</a></li>
  141. </ul>
  142. </div>
  143. <a class="btn btn-info" id="random" href="random/"><span class="glyphicon glyphicon-random"></span>&nbsp;&nbsp;random</a>
  144. <a class="btn btn-success" id="paint" href="/paint/"><span class="glyphicon glyphicon-pencil"></span>&nbsp;&nbsp;绘画板</a>
  145. <a class="btn btn-success" id="chess" href="/chess/"><span class="glyphicon glyphicon-record"></span>&nbsp;&nbsp;五子棋</a>
  146. <a class="btn btn-info" id="gravity" href="gravity/"><span class="glyphicon glyphicon-magnet"></span>&nbsp;&nbsp;引力</a>
  147. <a class="btn btn-warning" id="raytrack" href="raytrace/"><span class="glyphicon glyphicon-certificate"></span>&nbsp;&nbsp;1k光追</a>
  148. <a class="btn btn-info" id="article" href="article/"><span class="glyphicon glyphicon-book"></span>&nbsp;&nbsp;一些好玩的文章</a>
  149. <a class="btn btn-info" id="music" href="music/"><span class="glyphicon glyphicon-music"></span>&nbsp;&nbsp;音乐</a>
  150. <a class="btn btn-info" id="test" href="test/"><span class="glyphicon glyphicon-transfer"></span>&nbsp;&nbsp;Websocket 测试</a>
  151. <!-- <a class="btn btn-info" id="chat" href="chat/"><span class="glyphicon glyphicon-comment"></span>&nbsp;&nbsp;ChatGPT 测试</a> -->
  152. <a class="btn btn-success" id="gravity" href="https://太帅了.cn" title="中国人不懂浪漫,这么好的域名让我注册了"><span class="glyphicon glyphicon-link"></span>&nbsp;&nbsp;太帅了.cn</a>
  153. <a class="btn btn-success" href="/minecraft">Minecraft</a>
  154. <div style="text-align:right">
  155. <span class="btn btn-xs btn-warning nohover">纯搬运</span> - <span class="btn btn-xs btn-info nohover">小工程</span> -
  156. <span class="btn btn-xs btn-success nohover">大工程</span>
  157. </div>
  158. </div>
  159. <hr>
  160. <svg viewBox="0 0 100 100" width="100" height="100">
  161. <defs>
  162. <filter id="shadow-large">
  163. <feDropShadow dx="0" dy="0" stdDeviation="4" />
  164. </filter>
  165. <filter id="shadow-small">
  166. <feDropShadow dx="0" dy="0" stdDeviation="0.2" />
  167. </filter>
  168. <mask id="mask">
  169. <g transform="translate(50 50)">
  170. <g class="hours" transform="rotate(-15)">
  171. <circle cx="0" cy="0" r="50" fill="#fff"> </circle>
  172. <path d="M 0 -50 v 50 l 28.86 -50" fill="#000"> </path>
  173. </g>
  174. </g>
  175. </mask>
  176. </defs>
  177. <circle cx="50" cy="50" r="46" fill="#303335"> </circle>
  178. <circle cx="50" cy="50" r="42" fill="#EA3F3F" filter="url(#shadow-large)"> </circle>
  179. <g class="clock--face" font-size="8px" transform="translate(50 50)" text-anchor="middle" dominant-baseline="middle"></g>
  180. <circle mask="url(#mask)" cx="50" cy="50" r="50" fill="#303335"></circle>
  181. <circle cx="50" cy="50" r="4" filter="url(#shadow-small)" fill="#303335"></circle>
  182. <g class="hands" transform="translate(50 50)">
  183. <g class="minutes" transform="rotate(240)">
  184. <path fill="#fff" d="M -0.4 8 h 0.8 v -33 h -0.8 z"></path>
  185. <circle fill="#303335" cx="0" cy="0" r="0.6"></circle>
  186. </g>
  187. <g class="seconds" transform="rotate(80)">
  188. <path fill="#EA3F3F" d="M -0.4 10 h 0.8 v -45 h -0.8 z"></path>
  189. <circle stroke-width="0.4" stroke="#EA3F3F" fill="#303335" cx="0" cy="0" r="0.8"></circle>
  190. </g>
  191. </g>
  192. </svg>
  193. </body>