47 lines
1.9 KiB
Plaintext
47 lines
1.9 KiB
Plaintext
doctype html
|
|
html.scroll-smooth(lang=lang)
|
|
include src/components/Head
|
|
|
|
body.m-0.p-0
|
|
main.flex.flex-col
|
|
article(itemscope, itemtype="http://schema.org/Person")
|
|
include src/components/Landingpage
|
|
include src/components/Academia
|
|
include src/components/Professional
|
|
include src/components/Footer
|
|
|
|
script.
|
|
const footerEl = document.querySelector("#footer");
|
|
const footerObserver = new IntersectionObserver((payload) => {
|
|
const hasScrolltedTo = payload.pop().isIntersecting;
|
|
if (hasScrolltedTo && window.hasOwnProperty("umami")) {
|
|
umami.track("scrolled to", {position: "footer", id: "footer", visitDuration: getVisitDuration()});
|
|
console.debug("scrolled to footer", {visitDuration: getVisitDuration()});
|
|
}
|
|
});
|
|
footerObserver.observe(footerEl);
|
|
|
|
const sections = document.querySelectorAll("section");
|
|
const sectionObserver = (id) =>
|
|
new IntersectionObserver((payload) => {
|
|
const hasScrolltedTo = payload.pop().isIntersecting;
|
|
if (hasScrolltedTo && window.hasOwnProperty("umami")) {
|
|
umami.track("scrolled to", {position: "section", id, visitDuration: getVisitDuration()});
|
|
console.debug("scrolled to section with id", {id, visitDuation: getVisitDuration()});
|
|
}
|
|
});
|
|
sections.forEach((section) => sectionObserver(section.id).observe(section));
|
|
|
|
// tailwindcss set correct dark/light theme depending on client preference
|
|
// https://tailwindcss.com/docs/dark-mode#toggling-dark-mode
|
|
|
|
// let yearsOfAge = 0;
|
|
// let yearsOfDeveloping = 0;
|
|
//
|
|
// setInterval(() => {
|
|
// yearsOfAge = (new Date().getTime() - new Date("1988-10-07").getTime()) / 1000 / 60 / 60 / 24 / 365.25;
|
|
// yearsOfDeveloping = (new Date().getTime() - new Date("2005-07-07").getTime()) / 1000 / 60 / 60 / 24 / 365.25;
|
|
// document.getElementById("yearsOfAge").innerText = yearsOfAge.toFixed(6);
|
|
// document.getElementById("yearsOfDeveloping").innerText = yearsOfDeveloping.toFixed(6);
|
|
// }, 500);
|