Merge branch 'nodejs' of https://github.com/quoije/le-journal-d-un-podcast into nodejs
This commit is contained in:
@@ -60,6 +60,10 @@ body {
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
#audioplayerdivstop {
|
||||
margin-bottom: 160px;
|
||||
}
|
||||
|
||||
#ws:link {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 10.334 10.334" style="enable-background:new 0 0 10.334 10.334;" xml:space="preserve">
|
||||
<g>
|
||||
<path style="fill:#030104;" d="M10.333,9.816c0,0.285-0.231,0.518-0.517,0.518H0.517C0.233,10.334,0,10.102,0,9.816V0.517
|
||||
C0,0.232,0.231,0,0.517,0h9.299c0.285,0,0.517,0.231,0.517,0.517V9.816z"/>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 750 B |
@@ -67,6 +67,10 @@ jQuery(function($) {
|
||||
var audio = document.getElementById('player');
|
||||
console.log(audio.src);
|
||||
|
||||
// check if ep is in cache
|
||||
|
||||
checkepcache();
|
||||
|
||||
// cookie last playback
|
||||
if (Cookies.get("lastep-title")) {
|
||||
console.log("playback function")
|
||||
@@ -78,13 +82,31 @@ jQuery(function($) {
|
||||
}
|
||||
|
||||
audio.addEventListener('timeupdate',function(){
|
||||
<<<<<<< HEAD
|
||||
var currentTime = audio.currentTime;
|
||||
Cookies.set("lastep-time", currentTime);
|
||||
=======
|
||||
var currentTime = audio.currentTime;
|
||||
Cookies.set("lastep-time", currentTime, { expires: 365 });
|
||||
>>>>>>> 9f36b512a893a4955dde67afea5f1b675cf31c05
|
||||
},false);
|
||||
});
|
||||
|
||||
function checkepcache(){
|
||||
if (Cookies.get("lastep-src")){
|
||||
console.log("yahh");
|
||||
const epstab = document.getElementById("epstab");
|
||||
epstab.innerHTML = "<img src='assets/img/spek.icon.svg' width='25px'></img>" + " épisodes";
|
||||
};
|
||||
}
|
||||
// player things
|
||||
|
||||
function stopplayer(){
|
||||
document.getElementById("lienep").innerHTML= title;
|
||||
document.getElementById("sbody").innerHTML= body + "....";
|
||||
document.getElementById("lienep").href= linkdec;
|
||||
}
|
||||
|
||||
function play(src, title, date, body) {
|
||||
var audio = document.getElementById('player');
|
||||
console.log(src);
|
||||
@@ -99,15 +121,12 @@ jQuery(function($) {
|
||||
document.getElementById("player").setAttribute('src', linkdec);
|
||||
document.getElementById("player").load();
|
||||
document.getElementById("player").play();
|
||||
Cookies.set("lastep-title", title)
|
||||
Cookies.set("lastep-src", audio.src);
|
||||
Cookies.set("lastep-body", body)
|
||||
Cookies.set("lastep-title", title, { expires: 365 });
|
||||
Cookies.set("lastep-src", audio.src, { expires: 365 });
|
||||
Cookies.set("lastep-body", body, { expires: 365 });
|
||||
checkepcache();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function switchTab() {
|
||||
$('[href="#ep"]').tab('show');
|
||||
}
|
||||
|
||||
+4
-1
@@ -72,7 +72,7 @@
|
||||
<div class="text-center" style="border-style: none;">
|
||||
<ul class="nav nav-pills d-inline-flex justify-content-center" role="tablist" style="margin: 9px;border-style: dashed;min-width: 350px; width: 75%;margin-top: 0px;margin-bottom: 14px;">
|
||||
<li class="nav-item text-center" role="presentation" style="border-style: none;"><a class="nav-link active text-monospace text-uppercase text-center" role="tab" data-toggle="pill" data-bss-hover-animate="bounce" href="#home" style="background: var(--success);color: var(--white);">accueil</a></li>
|
||||
<li class="nav-item text-uppercase text-left" role="presentation" style="border-style: none;"><a class="nav-link text-monospace text-center" role="tab" data-toggle="pill" data-bss-hover-animate="bounce" href="#ep" style="background: var(--success);color: var(--white);">épisodes</a></li>
|
||||
<li class="nav-item text-uppercase text-left" role="presentation" style="border-style: none;"><a id="epstab" class="nav-link text-monospace text-center" role="tab" data-toggle="pill" data-bss-hover-animate="bounce" href="#ep" style="background: var(--success);color: var(--white);">épisodes</a></li>
|
||||
<li class="nav-item text-uppercase text-left" role="presentation" style="border-style: none;"><a class="nav-link text-monospace text-center" role="tab" data-toggle="pill" data-bss-hover-animate="bounce" href="#faq" style="background: var(--success);color: var(--white);">foire aux questions</a></li>
|
||||
<li class="nav-item text-uppercase text-left" role="presentation" style="border-style: none;"><a class="nav-link text-monospace text-center" role="tab" data-toggle="pill" data-bss-hover-animate="bounce" href="#baz" style="background: var(--success);color: var(--white);">$BAZOU</a></li>
|
||||
</ul>
|
||||
@@ -111,11 +111,14 @@
|
||||
<div id="nomep" style="font-weight: bold;"><a id="lienep" target="_blank">Pas
|
||||
d'épisode en cours</a></div>
|
||||
<div id="sbody"></div>
|
||||
<div id="audioplayerdiv">
|
||||
<a class="m-auto" id="audioplayerdivstop" href="#" onclick="javascript:stopplayer()"><img src="assets/img/stop-button-svgrepo-com.svg" width="6%"></a>
|
||||
<audio style="width: 90%;" controls id="player">
|
||||
<source src="" type="audio/mpeg">
|
||||
:)
|
||||
</audio>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="rss-feeds"></div>
|
||||
|
||||
Reference in New Issue
Block a user