You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
147 lines
5.8 KiB
147 lines
5.8 KiB
3 months ago
|
<!DOCTYPE html>
|
||
|
<html lang="en">
|
||
|
<head>
|
||
|
<meta charset="UTF-8">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
<title>Word Meaning Display</title>
|
||
|
<style>
|
||
|
body {
|
||
|
font-family: Arial, sans-serif;
|
||
|
margin: 40px;
|
||
|
text-align: center;
|
||
|
}
|
||
|
#wordContainer {
|
||
|
font-size: 24px;
|
||
|
margin-bottom: 20px;
|
||
|
}
|
||
|
#meaning {
|
||
|
font-size: 20px;
|
||
|
color: #333;
|
||
|
margin-top: 20px;
|
||
|
display: none; /* Hide meaning initially */
|
||
|
}
|
||
|
</style>
|
||
|
</head>
|
||
|
<body>
|
||
|
|
||
|
<h1>Word Meaning Display</h1>
|
||
|
|
||
|
<div id="wordContainer">
|
||
|
<span id="word"></span>
|
||
|
</div>
|
||
|
|
||
|
<button onclick="showMeaning()">Show Meaning</button>
|
||
|
<button onclick="getNextWord()">Next</button>
|
||
|
<p></p>
|
||
|
<button><a href="/hungary/language/vocabulary/vocabulary.html">Vocabulary</a></button>
|
||
|
<button><a href="/hungary/language/homework/homework.html">Homework</a></button>
|
||
|
<button><a href="/hungary/hungary.html">Hungary</a></button>
|
||
|
<button><a href="/">Home</a></button>
|
||
|
|
||
|
<div id="meaning"></div>
|
||
|
|
||
|
<script>
|
||
|
// Simulating a database of words and meanings
|
||
|
const wordDatabase = [
|
||
|
{ word: "morning", meaning: "reggel" },
|
||
|
{ word: "to wake up/get up", meaning: "felkelni" },
|
||
|
{ word: "brush hair", meaning: "megfésülködni" },
|
||
|
{ word: "to eat", meaning: "enni" },
|
||
|
{ word: "to drink", meaning: "inni" },
|
||
|
{ word: "to be", meaning: "lenni" },
|
||
|
{ word: "to go", meaning: "menni" },
|
||
|
{ word: "to study", meaning: "tanulni" },
|
||
|
{ word: "to work", meaning: "dolgozni" },
|
||
|
{ word: "to meet", meaning: "találkozni" },
|
||
|
{ word: "to talk", meaning: "beszélni" },
|
||
|
{ word: "to like", meaning: "szeretni" },
|
||
|
{ word: "to swim", meaning: "úszni" },
|
||
|
{ word: "to stay", meaning: "maradni" },
|
||
|
{ word: "to play", meaning: "játszani" },
|
||
|
{ word: "to sing", meaning: "énekelni" },
|
||
|
{ word: "I am", meaning: "én vagyok" },
|
||
|
{ word: "I eat", meaning: "én eszem" },
|
||
|
{ word: "I drink", meaning: "én iszom" },
|
||
|
{ word: "I go", meaning: "én megyek" },
|
||
|
{ word: "I buy", meaning: "én veszem" },
|
||
|
{ word: "I take", meaning: "én viszek" },
|
||
|
{ word: "I study", meaning: "én tanulok" },
|
||
|
{ word: "Italk", meaning: "én beszélek" },
|
||
|
{ word: "I am happy", meaning: "én örülök" },
|
||
|
{ word: "you (sing.) are", meaning: "te vagy" },
|
||
|
{ word: "you (sing.) eat", meaning: "te eszel" },
|
||
|
{ word: "you (sing.) drink", meaning: "te iszol" },
|
||
|
{ word: "you (sing.) go", meaning: "te mész" },
|
||
|
{ word: "you (sing.) buy", meaning: "te veszel" },
|
||
|
{ word: "you (sing.) take", meaning: "te viszel" },
|
||
|
{ word: "you (sing.) study", meaning: "te tanulsz" },
|
||
|
{ word: "you (sing.) talk", meaning: "te beszélsz" },
|
||
|
{ word: "you (sing.) are happy", meaning: "te örülsz" },
|
||
|
{ word: "he or she is", meaning: "Ön or o van" },
|
||
|
{ word: "he or she eats", meaning: "Ön or o eszik" },
|
||
|
{ word: "he or she drinks", meaning: "Ön or o iszik" },
|
||
|
{ word: "he or she goes", meaning: "Ön or o megy" },
|
||
|
{ word: "he or she buys", meaning: "Ön or o veszik" },
|
||
|
{ word: "he or she takes", meaning: "Ön or o vissik" },
|
||
|
{ word: "he or she studies", meaning: "Ön or o tanul" },
|
||
|
{ word: "he or she talks", meaning: "Ön or o beszél" },
|
||
|
{ word: "he or she is happy", meaning: "Ön or o örül " },
|
||
|
{ word: "we are", meaning: "mi vagyunk" },
|
||
|
{ word: "we eat", meaning: "mi eszünk" },
|
||
|
{ word: "we drink", meaning: "mi issztok" },
|
||
|
{ word: "we go", meaning: "mi megyünk" },
|
||
|
{ word: "we buy", meaning: "mi veszünk" },
|
||
|
{ word: "we take", meaning: "mi visszunk" },
|
||
|
{ word: "we study", meaning: "mi tanulunk" },
|
||
|
{ word: "we talk", meaning: "mi beszélünk" },
|
||
|
{ word: "we are happy", meaning: "mi örülünk" },
|
||
|
{ word: "You (pl) are", meaning: "ti vagytok" },
|
||
|
{ word: "You (pl) eat", meaning: "ti esznek" },
|
||
|
{ word: "You (pl) drink", meaning: "ti iszol" },
|
||
|
{ word: "You (pl) go", meaning: "ti mentek" },
|
||
|
{ word: "You (pl) buy", meaning: "ti vesztek" },
|
||
|
{ word: "You (pl) take", meaning: "ti vissztok" },
|
||
|
{ word: "You (pl) study", meaning: "ti tanultok" },
|
||
|
{ word: "You (pl) talk", meaning: "ti beszéltek" },
|
||
|
{ word: "You (pl) are happy", meaning: "ti örültök" },
|
||
|
{ word: "", meaning: "Önök or ok vannak" , meaning:they are" },
|
||
|
{ word: "they eat", meaning: "Önök or ok esznek" },
|
||
|
{ word: "they drink", meaning: "Önök or ok issznak" },
|
||
|
{ word: "they go", meaning: "Önök or ok mennek" },
|
||
|
{ word: "they buy", meaning: "Önök or ok vesznek" },
|
||
|
{ word: "they take", meaning: "Önök or ok vissznak" },
|
||
|
{ word: "they study", meaning: "Önök or ok tanulnak" },
|
||
|
{ word: "they talk", meaning: "Önök or ok beszélnek" },
|
||
|
{ word: "they are happy", meaning: "Önök or ok örülnek" },
|
||
|
];
|
||
|
|
||
|
// Function to pick a random word from the database
|
||
|
function getRandomWord() {
|
||
|
const randomIndex = Math.floor(Math.random() * wordDatabase.length);
|
||
|
return wordDatabase[randomIndex];
|
||
|
}
|
||
|
|
||
|
// Display the word on the page
|
||
|
var currentWord = getRandomWord();
|
||
|
document.getElementById("word").textContent = currentWord.word;
|
||
|
|
||
|
// Show the meaning when the button is clicked
|
||
|
function showMeaning() {
|
||
|
console.log("Running the showMeaning function");
|
||
|
document.getElementById("meaning").textContent = currentWord.meaning;
|
||
|
document.getElementById("meaning").style.display = "block"; // Display the meaning
|
||
|
}
|
||
|
|
||
|
// get the next word
|
||
|
function getNextWord() {
|
||
|
console.log("Running the getRandomWord function");
|
||
|
currentWord=getRandomWord();
|
||
|
document.getElementById("word").textContent = currentWord.word;
|
||
|
document.getElementById("meaning").style.display = "none"; // Display the meaning
|
||
|
}
|
||
|
|
||
|
|
||
|
</script>
|
||
|
|
||
|
</body>
|
||
|
</html>
|