-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmusic.html
90 lines (77 loc) · 2.01 KB
/
music.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
---
layout: default
section: music
---
<script type="text/javascript">
//<![CDATA[
var isPlaying = false;
$(document).ready(function(){
// Local copy of jQuery selectors, for performance.
var my_jPlayer = $("#jquery_jplayer");
function play(mp3file){
my_jPlayer.jPlayer("setMedia", {
mp3: mp3file
});
my_jPlayer.jPlayer("play");
}
my_jPlayer.jPlayer({
ready: function () {
},
timeupdate: function(event) {
},
play: function(event) {
},
pause: function(event) {
},
ended: function(event) {
$(".play-btn").html("[play]");
},
swfPath: "../js",
cssSelectorAncestor: "#jp_container",
supplied: "mp3",
wmode: "window"
});
// Instance jPlayer
$(".play-btn").click(function(){
var playBtn = $(this);
var mp3file = $(this).data("mp3");
if (isPlaying && (playBtn.html() == "[stop]")) {
my_jPlayer.jPlayer("stop");
playBtn.html("[play]");
isPlaying = false;
} else {
play(mp3file);
$(".play-btn").html("[play]");
playBtn.html("[stop]");
isPlaying = true;
}
});
});
//]]>
</script>
<small>Here you can find some fruits of my music inspirations.</small>
<h3>My Music:</h3>
<p></p>
<div id="jquery_jplayer"></div>
<ul>
{% for post in site.posts %}
{% if post.category == "music" %}
<li><a class="play-btn label" data-mp3="{{ post.mp3_file_url }}">[play]</a><a href="{{ post.url }}"> {{ post.title }}</a> </li>
{% endif %}
{% endfor %}
</ul>
<div class="row">
<div class="span10">
<div id="disqus_thread"></div>
</div>
</div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'tronenko';
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>