Claudio Yanes
2022-03-07 978d5ca1aee23d6663e508aa24b389b6c9003d04
Format JS
3 files modified
7 ■■■■■ changed files
assets/js/graph.js 1 ●●●● patch | view | raw | blame | history
assets/js/popover.js 6 ●●●● patch | view | raw | blame | history
assets/js/search.js patch | view | raw | blame | history
assets/js/graph.js
@@ -218,4 +218,3 @@
        .attr("y", d => d.y)
    });
  }
assets/js/popover.js
@@ -5,13 +5,13 @@
    return template.content.firstChild
}
function initPopover(base) {
    const baseUrl = base.replace(window.location.origin, "") // is this useless?
function initPopover(baseURL) {
    const basePath = baseURL.replace(window.location.origin, "")
    document.addEventListener("DOMContentLoaded", () => {
        fetchData.then(({content}) => {
        const links = [...document.getElementsByClassName("internal-link")]
        links.forEach(li => {
            const linkDest = content[li.dataset.src.replace(baseUrl, "")]
                const linkDest = content[li.dataset.src.replace(basePath, "")]
            // const linkDest = content[li.dataset.src]
            if (linkDest) {
                const popoverElement = `<div class="popover">
assets/js/search.js