|
|
|
<!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: "the weekend", meaning: "a hétvégét" },
|
|
|
|
{ word: "at the weekend", meaning: "hétvégén" },
|
|
|
|
{ word: "a show", meaning: "egy műsort" },
|
|
|
|
{ word: "theatre", meaning: "színház" },
|
|
|
|
{ word: "to go", meaning: "menni" },
|
|
|
|
{ word: "I go", meaning: "megyek" },
|
|
|
|
{ word: "I went", meaning: "elentem" },
|
|
|
|
{ word: "I went to the theatre at the weekend", meaning: "hétvégén színházba mentem" },
|
|
|
|
{ word: "dance", meaning: "tánc" },
|
|
|
|
{ word: "music", meaning: "zene" },
|
|
|
|
{ word: "musical", meaning: "zenei" },
|
|
|
|
{ word: "What did you do at the weekend?", meaning: "mit csináltál a hétvégén?What did you do at the weekend?" },
|
|
|
|
{ word: "What is thew weather like today?", meaning: "Milyen idő van ma?" },
|
|
|
|
{ word: "what kind", meaning: "milyen" },
|
|
|
|
{ word: "time", meaning: "idő" },
|
|
|
|
{ word: "It's a bit cold!", meaning: "Kicsit hideg van!" },
|
|
|
|
{ word: "glossary", meaning: "szójegyzék" },
|
|
|
|
{ word: "web page", meaning: "weboldal" },
|
|
|
|
{ word: "to build", meaning: "építeni" },
|
|
|
|
{ word: "I am building", meaning: "építkezem" },
|
|
|
|
{ word: "for buildin", meaning: "építkezéshezg" },
|
|
|
|
{ word: "for building vocabulary", meaning: "szókincs építésére" },
|
|
|
|
{ word: "Hungarian", meaning: "magyar" },
|
|
|
|
{ word: "Hungarian vocabulary", meaning: "magyar szókincs" },
|
|
|
|
{ word: "to create", meaning: "létrehozni" },
|
|
|
|
{ word: "I create", meaning: "teremtek" },
|
|
|
|
{ word: "I created", meaning: "teremtettem" },
|
|
|
|
{ word: "I created a webpage for building Hungarian vocabulary", meaning: "létrehoztam egy weboldalt a magyar szókincs gyarapítására" },
|
|
|
|
{ word: "I created it", meaning: "létrehoztam" },
|
|
|
|
{ word: "vocabulary", meaning: "szókincs" },
|
|
|
|
{ word: "to increase", meaning: "gyarapítására" },
|
|
|
|
{ word: "I am", meaning: "én vagyok" },
|
|
|
|
{ word: "feeling", meaning: "érzés" },
|
|
|
|
{ word: "I am feeling", meaning: "érzem" },
|
|
|
|
{ word: "very", meaning: "nagyon" },
|
|
|
|
{ word: "tired", meaning: "fáradt" },
|
|
|
|
{ word: "I am feeling very tired today", meaning: "Ma nagyon fáradtnak érzem magam" },
|
|
|
|
{ word: "I am feeling very tired this week", meaning: "nagyon fáradtnak érzem magam ezen a héten" },
|
|
|
|
{ word: "myself", meaning: "magam" },
|
|
|
|
{ word: "I love", meaning: "szeretem" },
|
|
|
|
{ word: "to watch", meaning: "nézni" },
|
|
|
|
{ word: "to read", meaning: "olvasni" },
|
|
|
|
{ word: "manga", meaning: "manga" },
|
|
|
|
{ word: "anime", meaning: "anime" },
|
|
|
|
{ word: "I love to watch anime and read manga", meaning: "szeretek animét nézni és mangát olvasni" },
|
|
|
|
{ word: "comics", meaning: "képregények" },
|
|
|
|
{ word: "cartoons", meaning: "rajzfilmek" },
|
|
|
|
{ word: "japanese", meaning: "japán" },
|
|
|
|
{ word: "manga and anime are both japanese art forms", meaning: "A manga és az anime egyaránt japán művészeti formák" },
|
|
|
|
{ word: "both", meaning: "mindkét" },
|
|
|
|
{ word: "art", meaning: "művészet" },
|
|
|
|
{ word: "forms", meaning: "formák" },
|
|
|
|
{ word: "both", meaning: "egyaránt" },
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
// 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>
|