-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
29427df
commit a1716a0
Showing
7 changed files
with
168 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
body { | ||
font-family: Arial, sans-serif; | ||
background-image: url('bg.jpg'); | ||
background-size: cover; | ||
background-repeat: no-repeat; | ||
background-position: center; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
margin: 0; | ||
} | ||
|
||
.container { | ||
background: rgba(255, 255, 255, 0.8); | ||
padding: 20px; | ||
border-radius: 8px; | ||
box-shadow: 0 0 10px rgba(0,0,0,0.1); | ||
text-align: center; | ||
} | ||
|
||
textarea { | ||
width: 95%; | ||
height: 100px; | ||
margin: 10px 0; | ||
padding: 10px; | ||
border-radius: 4px; | ||
border: 1px solid #ccc; | ||
font-size: 16px; | ||
} | ||
|
||
button { | ||
padding: 10px 20px; | ||
border: none; | ||
border-radius: 4px; | ||
background-color: #28a745; | ||
color: white; | ||
font-size: 16px; | ||
cursor: pointer; | ||
} | ||
|
||
button:hover { | ||
background-color: #218838; | ||
} | ||
|
||
#output { | ||
margin-top: 20px; | ||
font-size: 24px; | ||
display: flex; | ||
flex-wrap: wrap; | ||
gap: 10px; | ||
justify-content: center; | ||
|
||
h1{ | ||
font-weight: 900; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Emoji Translator</title> | ||
<link rel="stylesheet" href="code.css"> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<h1>Emoji Translator</h1> | ||
<textarea id="inputText" placeholder="What are you thinking?"></textarea> | ||
<button onclick="translateText()">Translate</button> | ||
<div id="output"></div> | ||
</div> | ||
<script src="code.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
const emojiDict = { | ||
"a": "😀", | ||
"b": "😃", | ||
"c": "😄", | ||
"d": "😁", | ||
"e": "😆", | ||
"f": "😅", | ||
"g": "🤣", | ||
"h": "😂", | ||
"i": "🙂", | ||
"j": "🙃", | ||
"k": "😉", | ||
"l": "😊", | ||
"m": "😇", | ||
"n": "🥰", | ||
"o": "😍", | ||
"p": "🤩", | ||
"q": "😘", | ||
"r": "😗", | ||
"s": "😚", | ||
"t": "😋", | ||
"u": "😛", | ||
"v": "😜", | ||
"w": "🤪", | ||
"x": "😝", | ||
"y": "🤑", | ||
"z": "🤗", | ||
" ": "⬛" | ||
}; | ||
|
||
function translateText() { | ||
const inputText = document.getElementById('inputText').value.toLowerCase(); | ||
const outputDiv = document.getElementById('output'); | ||
outputDiv.innerHTML = ''; | ||
|
||
for (let char of inputText) { | ||
const emoji = emojiDict[char] || char; | ||
const span = document.createElement('span'); | ||
span.textContent = emoji; | ||
outputDiv.appendChild(span); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Emoji Translator</title> | ||
<link rel="stylesheet" href="decode.css"> | ||
</head> | ||
<body> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +0,0 @@ | ||
const emojiDict = { | ||
"a": "😀", | ||
"b": "😃", | ||
"c": "😄", | ||
"d": "😁", | ||
"e": "😆", | ||
"f": "😅", | ||
"g": "🤣", | ||
"h": "😂", | ||
"i": "🙂", | ||
"j": "🙃", | ||
"k": "😉", | ||
"l": "😊", | ||
"m": "😇", | ||
"n": "🥰", | ||
"o": "😍", | ||
"p": "🤩", | ||
"q": "😘", | ||
"r": "😗", | ||
"s": "😚", | ||
"t": "😋", | ||
"u": "😛", | ||
"v": "😜", | ||
"w": "🤪", | ||
"x": "😝", | ||
"y": "🤑", | ||
"z": "🤗", | ||
" ": "⬛" // Use a block or space emoji for spaces | ||
}; | ||
|
||
function translateText() { | ||
const inputText = document.getElementById('inputText').value.toLowerCase(); | ||
const outputDiv = document.getElementById('output'); | ||
outputDiv.innerHTML = ''; // Clear previous output | ||
|
||
for (let char of inputText) { | ||
const emoji = emojiDict[char] || char; // Default to the character if no emoji is found | ||
const span = document.createElement('span'); | ||
span.textContent = emoji; | ||
outputDiv.appendChild(span); | ||
} | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters