mirror of
https://github.com/MrEidam/PetPet.git
synced 2026-04-17 15:43:31 +00:00
Grafical Games hub + home button :p
This commit is contained in:
24
Games/main.js
Normal file
24
Games/main.js
Normal file
@@ -0,0 +1,24 @@
|
||||
const games = [
|
||||
{
|
||||
name: '2048',
|
||||
link: '2048',
|
||||
},{
|
||||
name: 'Dice War',
|
||||
link: 'DiceWar',
|
||||
},{
|
||||
name: 'Number Quess 6',
|
||||
link: 'NumberQuess6',
|
||||
},{
|
||||
name: 'Rock Paper Scissors',
|
||||
link: 'RockPaperScissors',
|
||||
},
|
||||
];
|
||||
|
||||
window.onload = () => {
|
||||
for(let i=0; i<games.length; i++){
|
||||
document.body.innerHTML += `
|
||||
<a href="./${games[i].link}" class="game">
|
||||
<img src="./img/${games[i].link}.png" alt="${games[i].name}">
|
||||
</a>`
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user