diff --git a/src/index.js b/src/index.js index a12ae07..070c265 100644 --- a/src/index.js +++ b/src/index.js @@ -498,7 +498,8 @@ const fetchFeeds = async () => { const compileCSS = async () => { let css = sass.compile(path.join(srcDir, "style.sass"), { style: "compressed", - indentedSyntax: true + indentedSyntax: true, + charset: false }).css css += "\n" css += await fsp.readFile(path.join(srcDir, "comments.css")) diff --git a/src/page.js b/src/page.js index e675df9..f9ba8a2 100644 --- a/src/page.js +++ b/src/page.js @@ -573,9 +573,9 @@ if (sidenotes && footnotes) { const link = article.querySelector(`#${item.id.replace(/^fn/, "fnref")}`) const linkRect = link.getBoundingClientRect() item.style.position = "absolute" - item.style.left = (articleRect.left + pad) + "px" + item.style.left = (articleRect.left + window.scrollX + pad) + "px" item.style.width = (articleRect.right - articleRect.left - pad * 2) + "px" - item.style.top = linkRect.bottom + "px" + item.style.top = linkRect.bottom + window.scrollY + "px" item.style.display = "none" } rendered = false