Mercurial > web
annotate music.html @ 42:8051fdef82da
Downgrade to bootstrap 2.3.2
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Mon, 16 May 2022 21:10:56 -0400 |
parents | f71c5c19940f |
children | 24b2d0a480d3 |
rev | line source |
---|---|
20 | 1 <!DOCTYPE html> |
2 <head> | |
42 | 3 <link href="https://maxcdn.bootstrapcdn.com/bootstrap/2.3.2/css/bootstrap.min.css" rel="stylesheet" media="screen"> |
4 <link rel="shortcut icon" type="image/x-icon" href="favicon.ico?"> | |
5 <!-- <script src="https://code.jquery.com/jquery.js"></script> | |
6 <script src="js/bootstrap/js/bootstrap.min.js"></script> --> | |
32
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
7 <script> |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
8 window['libopenmpt'] = {}; |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
9 |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
10 libopenmpt.locateFile = function(filename) { |
39
35c68429641d
[music.html] Use updated libopenmpt
Paper <37962225+mrpapersonic@users.noreply.github.com>
parents:
37
diff
changeset
|
11 return "./js/" + filename; |
32
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
12 }; |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
13 |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
14 libopenmpt.onRuntimeInitialized = function() { |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
15 var player; |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
16 |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
17 function init() { |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
18 if (player == undefined) { |
41
f71c5c19940f
Specify our interpolation filter in music.html
Paper <37962225+mrpapersonic@users.noreply.github.com>
parents:
40
diff
changeset
|
19 player = new ChiptuneJsPlayer(new ChiptuneJsConfig(-1, 100, 1)); |
32
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
20 } else { |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
21 player.stop(); |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
22 } |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
23 } |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
24 |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
25 function afterLoad(path, buffer) { |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
26 player.play(buffer); |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
27 setMetadata(path); |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
28 } |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
29 |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
30 function loadURL(path) { |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
31 init(); |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
32 player.load(path, afterLoad.bind(this, path)); |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
33 } |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
34 |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
35 function setMetadata(filename) { |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
36 var metadata = player.metadata(); |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
37 if (metadata['title'] != '') { |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
38 document.getElementById('title').innerHTML = metadata['title']; |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
39 } else { |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
40 document.getElementById('title').innerHTML = filename; |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
41 } |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
42 } |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
43 |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
44 function pauseButton() { |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
45 player.togglePause(); |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
46 } |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
47 |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
48 document.querySelector('#playpause').addEventListener('click', pauseButton, false); |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
49 document.querySelectorAll('.song').forEach(function(e) { |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
50 e.addEventListener('click', function(evt) { |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
51 loadURL(evt.target.getAttribute("data-modurl")); |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
52 }, false); |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
53 }); |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
54 }; |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
55 </script> |
40
d5d97f45b103
We don't store chiptune2.js locally
Paper <37962225+mrpapersonic@users.noreply.github.com>
parents:
39
diff
changeset
|
56 <script type="application/javascript" src="//cdn.jsdelivr.net/gh/deskjet/chiptune2.js@a97e04cc7e98924f6ad17980d6eeca3f764378b5/chiptune2.js"></script> |
39
35c68429641d
[music.html] Use updated libopenmpt
Paper <37962225+mrpapersonic@users.noreply.github.com>
parents:
37
diff
changeset
|
57 <script type="application/javascript" src="./js/libopenmpt.js"></script> |
20 | 58 <title>Music - Paper's website</title> |
59 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
21
3c7989047451
Make code prettier and fix a few visual errors
Paper <mrpapersonic@gmail.com>
parents:
20
diff
changeset
|
60 <meta name="viewport" content="width=device-width, initial-scale=1.0"/> |
20 | 61 <style> |
62 @import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@300&display=swap'); | |
63 .navbar { | |
64 background: linear-gradient(to bottom, rgba(255,255,255,0.1) 25%, rgba(0,0,0,0) 100%); | |
27
f86d23d40885
Fix mobile navbar being centered on music.html
Paper <37962225+mrpapersonic@users.noreply.github.com>
parents:
25
diff
changeset
|
65 text-align: left; /* Override body text align */ |
20 | 66 } |
67 body { | |
21
3c7989047451
Make code prettier and fix a few visual errors
Paper <mrpapersonic@gmail.com>
parents:
20
diff
changeset
|
68 background-size: cover; |
3c7989047451
Make code prettier and fix a few visual errors
Paper <mrpapersonic@gmail.com>
parents:
20
diff
changeset
|
69 background: url("forest.png") no-repeat center center fixed; |
3c7989047451
Make code prettier and fix a few visual errors
Paper <mrpapersonic@gmail.com>
parents:
20
diff
changeset
|
70 color: white; |
20 | 71 font-family: 'Source Sans 3', sans-serif; |
21
3c7989047451
Make code prettier and fix a few visual errors
Paper <mrpapersonic@gmail.com>
parents:
20
diff
changeset
|
72 text-align: center; |
20 | 73 text-shadow: 5px 0 10px rgba(0, 0, 0, 0.5); |
74 } | |
75 div.box { | |
21
3c7989047451
Make code prettier and fix a few visual errors
Paper <mrpapersonic@gmail.com>
parents:
20
diff
changeset
|
76 background-color: rgba(0, 0, 0, 0.7); |
3c7989047451
Make code prettier and fix a few visual errors
Paper <mrpapersonic@gmail.com>
parents:
20
diff
changeset
|
77 box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5) inset; |
3c7989047451
Make code prettier and fix a few visual errors
Paper <mrpapersonic@gmail.com>
parents:
20
diff
changeset
|
78 color: white; |
3c7989047451
Make code prettier and fix a few visual errors
Paper <mrpapersonic@gmail.com>
parents:
20
diff
changeset
|
79 left: 0; |
20 | 80 margin: 1% auto; |
81 max-width: 500px; | |
21
3c7989047451
Make code prettier and fix a few visual errors
Paper <mrpapersonic@gmail.com>
parents:
20
diff
changeset
|
82 padding: 10px; |
20 | 83 right: 0; |
21
3c7989047451
Make code prettier and fix a few visual errors
Paper <mrpapersonic@gmail.com>
parents:
20
diff
changeset
|
84 text-align: center; |
20 | 85 top: 50%; |
86 } | |
87 a:link, a:visited, a:hover, a:active { | |
88 color: #ff6600; | |
89 } | |
90 </style> | |
91 </head> | |
92 <body> | |
42 | 93 <div class="navbar-wrapper"> |
94 <div class="container-fluid" style="width: 98%;margin-top:1%;"> | |
95 <div class="navbar navbar-inverse" style="box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5)"> | |
96 <div class="navbar-inner"> | |
97 <a class="brand" href="#">Paper's website</a> | |
98 <ul class="nav"> | |
99 <li><a href="./">Home</a></li> | |
100 <li class="active"><a href="#">Music</a></li> | |
101 <li><a href="projects.html">Projects</a></li> | |
102 </ul> | |
103 </div> | |
104 </div> | |
105 </div> | |
20 | 106 <h1>Music</h1> |
107 <div class="box"> | |
32
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
108 <p>Now playing:</p> |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
109 <p id="title">nothing loaded</p> |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
110 <button type="button" class="btn btn-primary" id="playpause">Play/Pause</button> |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
111 </div> |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
112 <div class="box"> |
20 | 113 <h2>Originals</h2> |
34
635334681d29
Add new music and add projects
Paper <mrpapersonic@gmail.com>
parents:
33
diff
changeset
|
114 <p><a href="#" class="song" data-modurl="music/paper_-_old_desk_tribute.xm">Old Desk Tribute [.XM]</a> <a href="music/paper_-_old_desk_tribute.xm">(Download)</a></p> |
37 | 115 <p><a href="#" class="song" data-modurl="music/paper_-_chippygolucky.xm">Chippy-Go-Lucky [.XM]</a> <a href="music/paper_-_chippygolucky.xm">(Download)</a></p> |
32
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
116 <p><a href="#" class="song" data-modurl="music/paper_-_whistling_meadows.it">Whistling Meadows [.IT]</a> <a href="music/paper_-_whistling_meadows.it">(Download)</a></p> |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
117 <p><a href="#" class="song" data-modurl="music/paper_-_shartlover.s3m">xX ShartLover1337 Xx [.S3M]</a> <a href="music/paper_-_shartlover.s3m">(Download)</a></p> |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
118 <p><a href="#" class="song" data-modurl="music/paper_-_reaching_the_world_border.it">Reaching the World Border [.IT]</a> <a href="music/paper_-_reaching_the_world_border.it">(Download)</a></p> |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
119 <p><a href="#" class="song" data-modurl="music/paper_-_sarta.mptm">THIS IS SARTA [.MPTM]</a> <a href="music/paper_-_sarta.mptm">(Download)</a></p> |
20 | 120 </div> |
121 <div class="box"> | |
122 <h2>Covers</h2> | |
34
635334681d29
Add new music and add projects
Paper <mrpapersonic@gmail.com>
parents:
33
diff
changeset
|
123 <p><a href="#" class="song" data-modurl="music/paper_-_tintin_on_the_moon.mod">TinTin on the Moon [.MOD]</a> <a href="music/paper_-_tintin_on_the_moon.mod">(Download)</a></p> |
32
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
124 <p><a href="#" class="song" data-modurl="music/paper_-_dance_in_the_universe_cover.mod">Dance in the universe cover [.MOD]</a> <a href="music/paper_-_dance_in_the_universe_cover.mod">(Download)</a></p> |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
125 <p><a href="#" class="song" data-modurl="music/paper_-_bob-omb_battlefield_remix.it">Super Mario 64 - Bob-omb Battlefield Remix [.IT]</a> <a href="music/paper_-_bob-omb_battlefield_remix.it">(Download)</a></p> |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
126 <p><a href="#" class="song" data-modurl="music/paper_-_point_of_no_hi-score.it">(mashup) Drax - Tiger Mission Hi-score + ESCHATOS OST - Point of No Return [.IT]</a> <a href="music/paper_-_point_of_no_hi-score.it">(Download)</a></p> |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
127 <p><a href="#" class="song" data-modurl="music/paper_-_vrc6n001_remake.it">(remake) Naruto - VRC6N001 [.IT]</a> <a href="music/paper_-_vrc6n001_remake.it">(Download)</a></p> |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
128 <p><a href="#" class="song" data-modurl="music/paper_-_hip_shop.it">Deltarune - Hip Shop [.IT]</a> <a href="music/paper_-_hip_shop.it">(Download)</a></p> |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
129 <p><a href="#" class="song" data-modurl="music/paper_-_nerou.it">ziner - Flatwoods Monster [.IT]</a> <a href="music/paper_-_nerou.it">(Download)</a></p> |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
130 <p><a href="#" class="song" data-modurl="music/paper_-_drip.xm">Leonz - Among Us Drip Theme [.XM]</a> <a href="music/paper_-_drip.xm">(Download)</a></p> |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
131 <p><a href="#" class="song" data-modurl="music/paper_-_3005.it">Childish Gambino - 3005 [.IT]</a> <a href="music/paper_-_3005.it">(Download)</a></p> |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
132 <p><a href="#" class="song" data-modurl="music/paper_-_infinity.it">Cho Ren Sha 68k - Infinity [.IT]</a> <a href="music/paper_-_infinity.it">(Download)</a></p> |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
133 <p><a href="#" class="song" data-modurl="music/paper_-_bestending.it">Aphex Twin - Avril 14th [.IT]</a> <a href="music/paper_-_bestending.it">(Download)</a></p> |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
134 <p><a href="#" class="song" data-modurl="music/paper_-_visitors.xm">KOTO - Visitors [.XM]</a> <a href="music/paper_-_visitors.xm">(Download)</a></p> |
fc37e1f8b89e
Add chiptune2.js functionality
Paper <mrpapersonic@gmail.com>
parents:
31
diff
changeset
|
135 <p><a href="#" class="song" data-modurl="music/paper_-_vrc6n001.it">Naruto - VRC6N001 [.IT]</a> <a href="music/paper_-_vrc6n001.it">(Download)</a></p> |
20 | 136 </div> |
137 </body> |