-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add readtime shortcode to blogs (#267)
- Loading branch information
1 parent
0e7004f
commit b6e9218
Showing
6 changed files
with
51 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,32 @@ | ||
<div id="footer-splash" class="row py-1 align-items-stretch"> | ||
<div id="foot-yellow" class="col text-bg-flixel-yellow"></div> | ||
<div id="foot-red" class="col text-bg-flixel-red "></div> | ||
<div id="foot-green" class="col text-bg-flixel-green "></div> | ||
<div id="foot-blue" class="col text-bg-flixel-dark-blue "></div> | ||
<div id="foot-light-blue" class="col text-bg-flixel-light-blue"></div> | ||
<div id="foot-yellow" class="col text-bg-flixel-yellow"></div> | ||
<div id="foot-red" class="col text-bg-flixel-red "></div> | ||
<div id="foot-green" class="col text-bg-flixel-green "></div> | ||
<div id="foot-blue" class="col text-bg-flixel-dark-blue "></div> | ||
<div id="foot-light-blue" class="col text-bg-flixel-light-blue"></div> | ||
</div> | ||
|
||
<script defer> | ||
var audio = new Audio('/sounds/flixel.ogg'); | ||
document.getElementById('footer-splash').addEventListener('click', function () { | ||
var audio = new Audio('/sounds/flixel.ogg'); | ||
document.getElementById('footer-splash').addEventListener('click', function () { | ||
if (audio.paused) { | ||
let times = [0.041, 0.184, 0.334, 0.495, 0.636]; | ||
let footCol = ['foot-green', 'foot-yellow', 'foot-light-blue', 'foot-red', 'foot-blue']; | ||
if (audio.paused) { | ||
let times = [0.041, 0.184, 0.334, 0.495, 0.636]; | ||
let footCol = ["foot-green", "foot-yellow", "foot-light-blue", "foot-red", "foot-blue"]; | ||
for (let i = 0; i < times.length; i++) { | ||
document.getElementById(footCol[i]).style.opacity = 0; | ||
} | ||
for (let i = 0; i < times.length; i++) { | ||
document.getElementById(footCol[i]).style.opacity = 0; | ||
} | ||
setTimeout(function () { | ||
// code to be executed | ||
audio.play(); | ||
for (let i = 0; i < times.length; i++) { | ||
setTimeout(function () { | ||
// code to be executed | ||
document.getElementById(footCol[i]).style.opacity = 1; | ||
}, times[i] * 1000); | ||
} | ||
}, 1000); | ||
} | ||
}); | ||
</script> | ||
setTimeout(function () { | ||
// code to be executed | ||
audio.play(); | ||
for (let i = 0; i < times.length; i++) { | ||
setTimeout(function () { | ||
// code to be executed | ||
document.getElementById(footCol[i]).style.opacity = 1; | ||
}, times[i] * 1000); | ||
} | ||
}, 1000); | ||
} | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters