Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Language Learning Website</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>Language Learning Website</h1>
</header>
<nav>
<ul>
<li><a href="#lesson">Lessons</a></li>
<li><a href="#pronunciation">Pronunciation Practice</a></li>
<li><a href="#exercises">Exercises</a></li>
</ul>
</nav>
<main>
<section id="lesson">
<h2>Lessons</h2>
<select id="languageSelector">
<option value="english">English</option>
<option value="spanish">Spanish</option>
<!-- Add more language options as needed -->
</select>
<div id="lessonContent">
<!-- Content will be loaded dynamically based on language selection -->
</div>
</section>
<section id="pronunciation">
<h2>Pronunciation Practice</h2>
<p>Record yourself pronouncing the words below and compare with native pronunciation:</p>
<ul id="pronunciationList">
<!-- Pronunciation practice words will be loaded dynamically -->
</ul>
<button id="startRecording">Start Recording</button>
<button id="stopRecording">Stop Recording</button>
</section>
<section id="exercises">
<h2>Exercises</h2>
<div id="exerciseContent">
<!-- Exercise questions will be loaded dynamically -->
</div>
<button id="checkAnswers">Check Answers</button>
</section>
</main>
<footer>
<p>&copy; 2024 Language Learning Website</p>
</footer>

<script src="script.js"></script>
</body>
</html>
58 changes: 58 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// Simulated data for lessons, pronunciation practice, and exercises
const lessons = {
english: "English lesson content...",
spanish: "Spanish lesson content..."
};

const pronunciationWords = {
english: ["apple", "banana", "cat"],
spanish: ["manzana", "plátano", "gato"]
};

const exercises = {
english: "English exercise questions...",
spanish: "Spanish exercise questions..."
};

// Function to load lesson content based on selected language
function loadLessonContent(language) {
document.getElementById("lessonContent").textContent = lessons[language];
}

// Function to load pronunciation practice words based on selected language
function loadPronunciationWords(language) {
const pronunciationList = document.getElementById("pronunciationList");
pronunciationList.innerHTML = "";
pronunciationWords[language].forEach(word => {
const li = document.createElement("li");
li.textContent = word;
pronunciationList.appendChild(li);
});
}

// Function to load exercise content based on selected language
function loadExerciseContent(language) {
document.getElementById("exerciseContent").textContent = exercises[language];
}

// Event listener for language selector
document.getElementById("languageSelector").addEventListener("change", function() {
const selectedLanguage = this.value;
loadLessonContent(selectedLanguage);
loadPronunciationWords(selectedLanguage);
loadExerciseContent(selectedLanguage);
});

// Simulated recording functionality for pronunciation practice
document.getElementById("startRecording").addEventListener("click", function() {
console.log("Recording started...");
});

document.getElementById("stopRecording").addEventListener("click", function() {
console.log("Recording stopped...");
});

// Simulated checking of exercise answers
document.getElementById("checkAnswers").addEventListener("click", function() {
console.log("Answers checked...");
});
29 changes: 29 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/* Add your styles here */
header, footer {
background-color: #333;
color: #fff;
text-align: center;
padding: 10px 0;
}

nav ul {
list-style-type: none;
padding: 0;
}

nav ul li {
display: inline;
margin-right: 10px;
}

main {
padding: 20px;
}

select {
margin-bottom: 10px;
}

button {
margin-top: 10px;
}