Skip to content

Commit 6efdccf

Browse files
Add page count in Take A Tour section (#4289)
* Add page count in Take A Tour * add page count in Take A Tour Section
1 parent 5ac4fdc commit 6efdccf

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

css/activities.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -982,6 +982,7 @@ table {
982982
#helpBodyDiv .message {
983983
text-align: center;
984984
line-height: 1.2;
985+
margin: auto;
985986
}
986987

987988
#helpBodyDiv .icon-container {

js/widgets/help.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,8 @@ class HelpWidget {
325325
_showPage(page) {
326326
const helpBody = docById("helpBodyDiv");
327327
helpBody.innerHTML = "" ;
328+
const totalPages = HELPCONTENT.length;
329+
const pageCount = `${page + 1}/${totalPages}`;
328330

329331
// Previous HTML content is removed, and new one is generated.
330332
let body = "";
@@ -345,8 +347,8 @@ class HelpWidget {
345347

346348
const helpContentHTML =
347349
`<h1 class="heading">${HELPCONTENT[page][0]}</h1>
348-
<p class ="description">${HELPCONTENT[page][1]}</p>
349-
` ;
350+
<p class="description">${HELPCONTENT[page][1]}</p>
351+
<p>${pageCount}</p>`;
350352

351353
body += helpContentHTML ;
352354

0 commit comments

Comments
 (0)