From eb6db0c02ef341e6a352cf0c6e4f08a413eba6f3 Mon Sep 17 00:00:00 2001 From: ache Date: Wed, 4 May 2022 21:41:50 +0200 Subject: w3c check --- src/build/index.mjs | 5 ++--- src/js/sidenotes.js | 2 +- src/templates/article.tmpl | 6 +++--- src/templates/index.tmpl | 6 +++--- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/build/index.mjs b/src/build/index.mjs index b7db782..c7e1cf7 100644 --- a/src/build/index.mjs +++ b/src/build/index.mjs @@ -31,8 +31,8 @@ const loadMD = (listFile, suffix) => { const logo = select('img', intro); logo.properties.src = `${suffix}/${logo.properties.src}`; - logo.properties.height = '150px'; - logo.properties.width = '150px'; + logo.properties.height = '150'; + logo.properties.width = '150'; titleHtml.children[0].properties.href = `${suffix}/${file.slice(0, -3)}`; const title = hastToString(titleHtml); @@ -41,7 +41,6 @@ const loadMD = (listFile, suffix) => { const readMore = h('a', 'Lire plus...'); readMore.properties.href = `${suffix}/${file.slice(0, -3)}`; - readMore.properties.for = domTitle; listContent.push({ name: file.slice(0, -3), diff --git a/src/js/sidenotes.js b/src/js/sidenotes.js index db2781f..eb09d56 100644 --- a/src/js/sidenotes.js +++ b/src/js/sidenotes.js @@ -24,7 +24,7 @@ const resize = () => { } const articleRef = sidenote.attributes.for.value; - const article = document.querySelector(`#${CSS.escape(articleRef)}`); + const article = document.querySelector(`#${CSS.escape(articleRef)}_article`); const notes = Array.from(article.querySelectorAll('li')) .filter(element => element.id.startsWith('user-content-fn')); const newSidenotes = notes.map(sidenoteLi => { diff --git a/src/templates/article.tmpl b/src/templates/article.tmpl index 24e4632..d67f34a 100644 --- a/src/templates/article.tmpl +++ b/src/templates/article.tmpl @@ -3,11 +3,11 @@ {{> header }}
-
-
+
+
{{{ content }}}
-
+
{{> leftPanel }} diff --git a/src/templates/index.tmpl b/src/templates/index.tmpl index 784166d..db117c9 100644 --- a/src/templates/index.tmpl +++ b/src/templates/index.tmpl @@ -5,11 +5,11 @@ {{#articles}}
-
-
+
+
{{{ intro }}}
-
+
{{/articles}} {{> leftPanel }} -- cgit v1.2.3