Skip to content

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
belomaxorka committed Mar 31, 2024
1 parent 2c2545d commit 3ffc205
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
11 changes: 1 addition & 10 deletions assets/scripts.js
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
/**
* Random emoji picker
*
* @link https://gist.github.com/ikr7/c72843556ef3a12014c3
* @returns {string}
*/
function pickRandomEmoji() {
let emojis = ['🟢', '🟩', '💚'];
return emojis[Math.floor(Math.random() * emojis.length)];
}

13 changes: 2 additions & 11 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,18 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>belomaxorka's space!</title>
<title>💚 belomaxorka's space! 💚</title>
<link href="assets/modern-normalize.min.css" rel="stylesheet">
<link href="assets/styles.css" rel="stylesheet">
<script type="text/javascript" src="assets/scripts.js"></script>
</head>
<body>
<header>
<a href="#"><h1><span class="placeEmoji"></span>&nbsp;belomaxorka's space!&nbsp;<span class="placeEmoji"></span><br>-_-_-_-_-_-_-_-_-_-_-_-_-_-
</h1></a>
<a href="#"><h1>💚 belomaxorka's space! 💚<br>-_-_-_-_-_-_-_-_-_-_-_-_-_-</h1></a>
</header>
<main>
</main>
<footer>
</footer>
</body>
<script type="text/javascript">
// Place emoji
let placeEmoji = document.getElementsByClassName("placeEmoji");
let pickedEmoji = pickRandomEmoji();
for (let i = 0; i < placeEmoji.length; i++) {
placeEmoji[i].innerHTML = pickedEmoji;
}
</script>
</html>

0 comments on commit 3ffc205

Please sign in to comment.