Spaces:
Running
Running
| # Original PDF master thesis {.unnumbered #sec-chap_Orig_Master_PDF} | |
| <!-- load dot lotti js code --> | |
| <script src="https://unpkg.com/@dotlottie/[email protected]/dist/dotlottie-player.js"></script> | |
| <!-- the riksha file is obtained through:https://lottiefiles.com/103030-rickshaw-from-pakistan | |
| and https://lottiefiles.com/ranaadeelfarrukh --> | |
| <dotlottie-player | |
| autoplay | |
| loop | |
| mode="bounce" | |
| src="../7_Animation/Riksha.lottie" | |
| style="width: 100%"> | |
| </dotlottie-player> | |
| <style> | |
| #pdf_Iframe { | |
| width: 100%; | |
| height: 97%; | |
| border: 1px solid #ccc; | |
| /* have it hidden at the inital loading of this page */ | |
| display: none; | |
| } | |
| </style> | |
| <iframe id="pdf_Iframe"></iframe> | |
| <script> | |
| document.addEventListener('DOMContentLoaded', function() { | |
| // Code to be executed after the DOM has been loaded | |
| openPdf(); | |
| }); | |
| const url = 'https://huggingface.co/spaces/JavedA/master_Thesis/resolve/main/Data/11_True_Master/Master_Thesis_Javed_Butt.pdf'; | |
| // download the pdf using the url provided above | |
| function openPdf() { | |
| fetch(url) | |
| .then(response => response.blob()) | |
| .then(blob => { | |
| const blobUrl = URL.createObjectURL(blob); | |
| const iframe = document.getElementById('pdf_Iframe'); | |
| // get lottify riksha | |
| const loadingAnimation = document.querySelector('dotlottie-player'); | |
| // Hide the loading animation | |
| loadingAnimation.style.display = 'none'; | |
| iframe.style.display = "block"; | |
| iframe.src = blobUrl; | |
| }); | |
| } | |
| </script> |