diff --git a/distribusi/distribusi/page_template.py b/distribusi/distribusi/page_template.py index 9dd67ca..dd5ea8a 100644 --- a/distribusi/distribusi/page_template.py +++ b/distribusi/distribusi/page_template.py @@ -68,6 +68,7 @@ html_footer = """ + """ diff --git a/test_data/src/scripts/hashEvent.js b/test_data/src/scripts/hashEvent.js new file mode 100644 index 0000000..41a4807 --- /dev/null +++ b/test_data/src/scripts/hashEvent.js @@ -0,0 +1,28 @@ +let target = window.location.hash.slice(1); +console.log(target) +console.log("~~~") +try { + document.getElementById(target).classList.add("focus"); + window.scrollTo(window.screenTop-100,0) + setTimeout(()=>{ + document.getElementById(target).classList.remove("focus") + }, 1000) +}catch(e){ + +} + +try { + document.querySelector('.octet-stream').remove(); +}catch(e){ +} + +window.addEventListener("hashchange", ()=>{ + let target = window.location.hash.slice(1); + console.log(target) + document.getElementById(target).classList.add("focus"); + setTimeout(()=>{ + document.getElementById(target).classList.remove("focus") + }, 1000) + // window.screenTop = window.screenTop-300; + // window.scrollTo(window.screenTop-100,0) +});