Commit 45b4f22a authored by benjaminParisel's avatar benjaminParisel
Browse files

theme(asciinema): Use js library not only on production

* remove script section to section added only when site is on production
parent 4cea9e48
......@@ -50,18 +50,19 @@
apiKey: '16267f96d135c47df8454efd5b448c9a',
});
*/
let asciinemaPlayers = document.querySelectorAll('asciinema-player');
asciinemaPlayers.forEach(htmlPlayer => {
let options = {fit: false};
htmlPlayer.getAttributeNames().forEach(key => options[key] = htmlPlayer.getAttribute(key));
AsciinemaPlayer.create(htmlPlayer.getAttribute('src'), htmlPlayer, options);
});
</script>
{{/unless}}
{{/unless}}
<script>
let asciinemaPlayers = document.querySelectorAll('asciinema-player');
asciinemaPlayers.forEach(htmlPlayer => {
let options = {fit: false};
htmlPlayer.getAttributeNames().forEach(key => options[key] = htmlPlayer.getAttribute(key));
AsciinemaPlayer.create(htmlPlayer.getAttribute('src'), htmlPlayer, options);
});
</script>
<script>
// init toggle state
const isDarkThemeEnable = localStorage.getItem('theme') === 'dark';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment