master_Thesis / Data /8_Add_2_Master /1_Master_Orig.qmd
JavedA's picture
added aircraft and rocket animation above the table of contents toc view
d6b8d19
raw
history blame
2.2 kB
# 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();
test_1();
});
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;
});
}
function test_1(){
console.log("here I am");
// 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");
div_Info.setAttribute("class","no_Test");
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);
console.log(div_Info);
quartoMarginSidebar.appendChild(div_Info);
}
</script>