From 6efdccf868935abd84c18d06eb33f5dd6a2a3f76 Mon Sep 17 00:00:00 2001 From: Subhas Pramanik Date: Sat, 18 Jan 2025 21:19:56 +0530 Subject: [PATCH] Add page count in Take A Tour section (#4289) * Add page count in Take A Tour * add page count in Take A Tour Section --- css/activities.css | 1 + js/widgets/help.js | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/css/activities.css b/css/activities.css index c63c043131..8db0b377cb 100644 --- a/css/activities.css +++ b/css/activities.css @@ -982,6 +982,7 @@ table { #helpBodyDiv .message { text-align: center; line-height: 1.2; + margin: auto; } #helpBodyDiv .icon-container { diff --git a/js/widgets/help.js b/js/widgets/help.js index 1f29c161ce..e4ceaefa08 100644 --- a/js/widgets/help.js +++ b/js/widgets/help.js @@ -325,6 +325,8 @@ class HelpWidget { _showPage(page) { const helpBody = docById("helpBodyDiv"); helpBody.innerHTML = "" ; + const totalPages = HELPCONTENT.length; + const pageCount = `${page + 1}/${totalPages}`; // Previous HTML content is removed, and new one is generated. let body = ""; @@ -345,8 +347,8 @@ class HelpWidget { const helpContentHTML = `

${HELPCONTENT[page][0]}

-

${HELPCONTENT[page][1]}

- ` ; +

${HELPCONTENT[page][1]}

+

${pageCount}

`; body += helpContentHTML ;