Skip to content

Commit

Permalink
Add page count in Take A Tour section (#4289)
Browse files Browse the repository at this point in the history
* Add page count in Take A Tour

* add page count in Take A Tour Section
  • Loading branch information
subhas-pramanik-09 authored Jan 18, 2025
1 parent 5ac4fdc commit 6efdccf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions css/activities.css
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,7 @@ table {
#helpBodyDiv .message {
text-align: center;
line-height: 1.2;
margin: auto;
}

#helpBodyDiv .icon-container {
Expand Down
6 changes: 4 additions & 2 deletions js/widgets/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "";
Expand All @@ -345,8 +347,8 @@ class HelpWidget {

const helpContentHTML =
`<h1 class="heading">${HELPCONTENT[page][0]}</h1>
<p class ="description">${HELPCONTENT[page][1]}</p>
` ;
<p class="description">${HELPCONTENT[page][1]}</p>
<p>${pageCount}</p>`;

body += helpContentHTML ;

Expand Down

0 comments on commit 6efdccf

Please sign in to comment.