index.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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.gstatic.com">
  9. <link href="https://fonts.loli.net/css2?family=Anonymous+Pro:ital,wght@0,400;0,700;1,400;1,700
  10. &family=Noto+Serif+SC:wght@300;400;500;600;700&display=swap" rel="stylesheet">
  11. <link rel="stylesheet" href="/css/style.css">
  12. <script type="text/javascript" src="/js/audio.js"></script>
  13. <script>
  14. document.cookie = "IfIWereANosyCrawlerIWouldDepositMyselfInTheSeaImmediately=true"
  15. document.writeln(`<a class="btn btn-info" href="/fun"><span class="glyphicon glyphicon-home"></span>&nbsp;返回</a>
  16. <div class="page-header"><h3>音乐?!<small>、heneuh94830y9]][]]--08</small></h3></div><p>按创作时间排序。<br>
  17. 玄学的命名规则:一般取开头几个比较重要的音符,数字代表版本,假如不是这个格式那就是我照着谱搬运的。</p>
  18. <p>你能想象,拿着未激活的水果软件,好不容易写完了一首曲子,等心满意足关闭之后才发现格式存反了,这件事有多么绝望吗??</p>
  19. <p>确实花了很多心血,所以我在 <a href="https://creativecommons.org/licenses/by-nc-nd/3.0/">CC BY-NC-ND 3.0</a> 协议下发布吧,链接 <a href="https://43.143.233.184/fun/music/">https://43.143.233.184/fun/music/</a>,署名 schtonn。</p>
  20. <button class="btn btn-default" onclick="$(\'audio\').attr(\'loop\',\'\');$(this).text(\'ok\')">loop</button>`)
  21. var list = ['katyusha,-', 'tetris,-', 'avengers,-,那时还不知道小号要转调,直接跑了...', 'e-e-edfe', 'grasswalk,-', 'where am i going,-', 'sad,-', 'tom,-', 'a#d#cc#c', 'ffgaf', 'bcabc', 'bga#c#', 'cdbc', 'aaccgg,~,灵光一现,但很难接下去了,只好重复', 'dddc,,看到标题就让人猜到节奏了', 'cdd#', 'gddf#dd', 'ag#ag#f#', 'f#g#c#g#a#c#', 'ef#c#ag#', 'friend,-,这个八音盒音色真的很带感', 'd#ba#g#g', 'a#agaa#c', 'ggaa#ag,~', 'a#agaa#c2,~,挺经典的', 'c#d#fc#c,~', 'da#gf#g,~,这个音色其实是大提琴...', 'cdd#d#', 'ef#d#c#2,~', 'bbbdcb,~', 'efcaa', 'cag#g', 'dc#da', 'ebcdcb', 'aeaba,~,首次真正琢磨了一下和弦','bf#db,~,期末考崩了,有感而发']
  22. for (let i = list.length - 1; i >= 0; i--) {
  23. var g = list[i].split(',')
  24. document.writeln('<div class="panel panel-' + ((g[1]) ? ((g[1] == '~') ? 'success' : 'info') : 'default') + ' col-md-4 col-sm-6" style="padding:0;transform:translateY(' + ((list.length - i - 1) % 3 * 25 + (list.length - i) * 20) + 'px)">\
  25. <div class="panel-heading"'+ (g[2] ? 'data-toggle="tooltip" data-placement="top"\
  26. title="'+ g[2] + '"' : '') + '>' + g[0] + '</div>\
  27. <div class="panel-body"><audio src="' + g[0].replace(/#/g, '%23') + '.mp3" preload="metadata">\
  28. <p>Your browser doesn\'t support HTML5 audio. Here is a <a href="myAudio.mp4">link to the audio</a> instead.</p></audio>\
  29. <div class="pgs"><span style="font-family:\'Consolas\', Courier, monospace;font-size:10px"></span></div>\
  30. <div class="controls"><span class="played-time">00:00</span><button class="btn btn-default play-pause toggle">\
  31. <span class="glyphicon glyphicon-play" id="icon-btn"></span></button><span class="audio-time" id="audioTime">0</span></div></div></div>')
  32. }
  33. //同时只能播放一个
  34. var audios = $('audio');
  35. function pauseAll() {
  36. var self = this;
  37. [].forEach.call(audios, function (i) {
  38. i !== self && (i.pause(),
  39. $(i).parents('div').children('.controls').children('button').children().removeClass('glyphicon-pause').addClass('glyphicon-play'))
  40. });
  41. }
  42. [].forEach.call(audios, function (i) {
  43. i.addEventListener("play", pauseAll.bind(i));
  44. })
  45. $(function () { $("[data-toggle='tooltip']").tooltip(); });
  46. </script>
  47. <style>
  48. .pgs {
  49. text-align: center;
  50. }
  51. .pgs span {
  52. width: 100%;
  53. position: relative;
  54. z-index: 2;
  55. }
  56. .play-pause {
  57. border: 0;
  58. padding: 0;
  59. width: 40px;
  60. height: 40px;
  61. margin: 0 28px;
  62. background: none;
  63. }
  64. .controls span {
  65. color: #b3b5b7;
  66. font-size: 12px;
  67. display: inline-block;
  68. }
  69. body {
  70. background: linear-gradient(24deg, rgb(187, 219, 219), floralwhite);
  71. background-size: 100% 200%;
  72. }
  73. </style>
  74. </head>
  75. <body>
  76. </body>