diff --git a/static/skin/home.css b/static/skin/home.css index f49548b86..04d3be7ef 100644 --- a/static/skin/home.css +++ b/static/skin/home.css @@ -141,6 +141,10 @@ body { border-color: #acacac; } +.book__link { + text-decoration: none; +} + .book__wrapper { color: #444343; height: 280px; @@ -453,4 +457,4 @@ body { .kiwixHomeBody { padding: 20px 5vw; } -} \ No newline at end of file +} diff --git a/static/skin/index.js b/static/skin/index.js index ae4484deb..d632f3939 100644 --- a/static/skin/index.js +++ b/static/skin/index.js @@ -103,7 +103,9 @@ if (sort) { divTag.setAttribute('data-idx', bookOrderMap.get(id)); } - divTag.innerHTML = `
+ divTag.innerHTML = ` +
+
`; + ${downloadLink ? `` : ''}
`; return divTag; } @@ -126,7 +128,8 @@ function insertModal(button) { const downloadLink = button.getAttribute('data-link'); - button.addEventListener('click', () => { + button.addEventListener('click', (event) => { + event.preventDefault(); document.body.insertAdjacentHTML('beforeend', `