Skip to content

Commit

Permalink
shruti's job
Browse files Browse the repository at this point in the history
  • Loading branch information
rishovchakraborty committed Apr 16, 2024
1 parent 675174a commit 0d21584
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 20 deletions.
46 changes: 27 additions & 19 deletions Eduversity/assets/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,42 +176,50 @@ function stopVoiceRecognition() {
if (annyang) {
var commands = {
'go to home': () => {
navigateToPage('home');
// navigateToPage('home');
window.location.href = '../gamify.html';
},
'go to about us': () => {
navigateToPage('about');
// navigateToPage('about');
window.location.href = '../gamify.html';
},
'go to courses': () => {
navigateToPage('courses');
// navigateToPage('courses');
window.location.href = '../gamify.html';
},
'go to find a job': () => {
navigateToPage('find-job');
// navigateToPage('find-job');
window.location.href = '../gamify.html';
},
'go to mini games': () => {
navigateToPage('mini-games');
// navigateToPage('mini-games');
window.location.href = '../gamify.html';

window.location.href = '../gamify.html';

},
'go to testimonials': () => {
navigateToPage('testimonials');
// navigateToPage('testimonials');
window.location.href = '../gamify.html';
},
'go to contact us': () => {
navigateToPage('contact');
// navigateToPage('contact');
window.location.href = '../gamify.html';
},
'go to log in': () => {
navigateToPage('login');
},
'go to sign up': () => {
navigateToPage('signup');
// navigateToPage('login');
window.location.href = '../gamify.html';
}
};
// Function to navigate to a specific page
function navigateToPage(pageId) {
const pageElement = document.getElementById(pageId);
if (pageElement) {
window.location.href = pageElement.href;
} else {
console.error(`Page ID "${pageId}" not found.`);
}
}
// function navigateToPage(pageId) {
// const pageElement = document.getElementById(pageId);
// if (pageElement) {
// window.location.href = pageElement.href;
// } else {
// console.error(`Page ID "${pageId}" not found.`);
// }
// }
annyang.addCommands(commands);
annyang.debug(true);
}
2 changes: 1 addition & 1 deletion Eduversity/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,7 @@ <h2 class="h2 section-title">Let's Enjoy The learning</h2>
</p>
</div>

<a href="../gamify.html" class="btn btn-secondary hover-speak"onmouseover="speakText('click here to play games')"
<a href="../gamify.html" id="mini-games" class="btn btn-secondary hover-speak"onmouseover="speakText('click here to play games')"
onmouseleave="stopSpeaking()">
<span class="span">Let's Start</span>

Expand Down

0 comments on commit 0d21584

Please sign in to comment.