Spaces:
Running
Running
<!-- airbnb Lottfile animation version --> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.7.2/lottie.min.js"></script> | |
<!-- <script src="https://unpkg.com/@dotlottie/player-component@1.0.0/dist/dotlottie-player.js"></script> --> | |
<script> | |
// get acceess to the right sidebar | |
const quartoMarginSidebar = document.getElementById("quarto-margin-sidebar"); | |
// generate a place where the lotti animation shall be placed | |
const lottieContainer = document.createElement("div"); | |
// Load the Lottie animation | |
const animation = lottie.loadAnimation({ | |
container: lottieContainer, // HTML element to render the animation in | |
renderer: 'svg', // Renderer type | |
loop: true, // Whether the animation should loop | |
autoplay: true, // Whether the animation should play automatically | |
path: '../7_Animation/bismillah.json' // URL or file path to your animation JSON file | |
}); | |
quartoMarginSidebar.insertBefore(lottieContainer, quartoMarginSidebar.firstChild); | |
// Play the animation | |
animation.play(); | |
</script> |