diff --git a/static/skin/index.css b/static/skin/index.css
index be9bfcd2d..dc0790609 100644
--- a/static/skin/index.css
+++ b/static/skin/index.css
@@ -215,6 +215,7 @@
}
.book__download {
+ cursor: pointer;
font-size: 1.2rem;
background: #00b4e4;
padding: 8px;
@@ -231,7 +232,6 @@
}
.book__download > span {
- cursor: pointer;
text-decoration: none;
position: relative;
font-family: roboto;
diff --git a/static/skin/index.js b/static/skin/index.js
index 8145cadd5..7e6198100 100644
--- a/static/skin/index.js
+++ b/static/skin/index.js
@@ -179,7 +179,7 @@
${getLanguageCodeToDisplay(langCode)}
- ${downloadLink ? `${$t("download")} ${humanFriendlyZimSize ? ` - ${humanFriendlyZimSize} `: ''}` : ''}
+ ${downloadLink ? `${$t("download")} ${humanFriendlyZimSize ? ` - ${humanFriendlyZimSize} `: ''}` : ''}
`;
return divTag;
}
@@ -265,6 +265,7 @@
}
function insertModal(button) {
+ const downloadSize = button.getAttribute('data-size');
const downloadLink = button.getAttribute('data-link');
button.addEventListener('click', async (event) => {
event.preventDefault();
@@ -274,7 +275,7 @@
- Download
+ Download - ${downloadSize}
@@ -434,7 +435,7 @@
booksToDelete.forEach(book => {iso.remove(book);});
books.forEach((book) => {
iso.insert(generateBookHtml(book, sort))
- const downloadButton = document.querySelector(`[data-id="${getInnerHtml(book, 'id')}"] .book__download span`);
+ const downloadButton = document.querySelector(`[data-id="${getInnerHtml(book, 'id')}"] .book__download`);
if (downloadButton) {
insertModal(downloadButton);
}