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:
@@ -3,12 +3,15 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<link rel="stylesheet" href="style.css">
|
||||||
|
<link rel="shortcut icon" href="icon.png" type="image/x-icon">
|
||||||
|
|
||||||
<title>Games</title>
|
<title>Games</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<a href="./2048/">2048</a>
|
<div id="blob"></div>
|
||||||
<a href="./RockPaperScissors/">RockPaperScissors</a>
|
<div id="blur"></div>
|
||||||
<a href="./NumberQuess6/">NumberQuess</a>
|
<script src="main.js"></script>
|
||||||
<a href="./DiceWar/">DiceWar</a>
|
<a href="../" id="home"></a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
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>`
|
||||||
|
}
|
||||||
|
}
|
||||||
54
Games/style.css
Normal file
54
Games/style.css
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
*{
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
body{
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-content: center;
|
||||||
|
align-items: center;
|
||||||
|
min-height: 100vh;
|
||||||
|
background: #333;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
#home{
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
height: 50px;
|
||||||
|
width: 50px;
|
||||||
|
border-radius: 25px 0 0 0;
|
||||||
|
background: #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
.game{
|
||||||
|
z-index: 5;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
width: 200px;
|
||||||
|
height: 150px;
|
||||||
|
|
||||||
|
/*border: 5px red solid;*/
|
||||||
|
border-radius: 10px;
|
||||||
|
margin: 1rem;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
box-shadow:
|
||||||
|
inset 5px 5px 15px #aaa,
|
||||||
|
5px 5px 15px #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
.game img{
|
||||||
|
transition: .5s;
|
||||||
|
width: 200px;
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.game:hover img{
|
||||||
|
transition: .25s;
|
||||||
|
scale: 1.25;
|
||||||
|
}
|
||||||
@@ -92,7 +92,7 @@ span p{
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Lime{color: lime;}.Yellow{color: yellow;}.Orange{color: orange;}.Red{color: red;}.DarkRed{color: darkred;}
|
.Lime{color: lime; user-select: none;}.Yellow{color: yellow; user-select: none;}.Orange{color: orange; user-select: none;}.Red{color: red; user-select: none;}.DarkRed{color: darkred; user-select: none;}
|
||||||
|
|
||||||
.cash{
|
.cash{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
Reference in New Issue
Block a user