Spaces:
Running
Running
File size: 2,367 Bytes
d6b8d19 deeb796 d6b8d19 deeb796 d6b8d19 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# Original PDF master thesis {#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
id="lottie_Player_Master_Orig"
autoplay
loop
mode="bounce"
src="../7_Animation/Riksha.lottie"
style="width: 100%">
</dotlottie-player>
<style>
#pdf_Iframe {
width: 100%;
height: 81vh;
/* 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();
add_Side_Text();
});
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.getElementById('lottie_Player_Master_Orig');
// Hide the loading animation
loadingAnimation.style.display = 'none';
iframe.style.display = "block";
iframe.src = blobUrl;
});
}
/* ========================================================================== */
/* ============================== add_Side_Text ============================= */
/* ========================================================================== */
function add_Side_Text(){
// get acceess to the right sidebar
var quartoMarginSidebar = document.getElementById("quarto-margin-sidebar");
var div_Info = document.createElement("div");
var p_Info = document.createElement("p");
p_Info.innerText ="This is the PDF that was submitted to the TU-Braunschweig. Feel free to have a look at it here or download it."
p_Info.style.color="#ecff80";
div_Info.appendChild(p_Info);
quartoMarginSidebar.appendChild(div_Info);
}
</script>
|