mirror of
https://gitlab.com/skysthelimit.dev/selenite.git
synced 2025-06-16 02:22:07 -05:00
game loading works 😎
This commit is contained in:
parent
ac5b791264
commit
fae4582e46
@ -41,6 +41,7 @@
|
||||
<p>Welcome to the new and updated e-gamepass!</p>
|
||||
<p class="uploadResult" style="font-size:20px"></p>
|
||||
<br>
|
||||
<div id="games"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
13
js/games.js
13
js/games.js
@ -1,5 +1,16 @@
|
||||
$.getJSON("/games.json", function (data) {
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
console.log(data[i].name);
|
||||
$('#games').append(
|
||||
$('<div>').prop({
|
||||
id: 'game',
|
||||
style: 'cursor: pointer;'
|
||||
}).append(
|
||||
$('<img>').prop({
|
||||
src: data[i].directory + "/" + data[i].image
|
||||
})
|
||||
).append(
|
||||
$('<h1>').text(data[i].name)
|
||||
)
|
||||
);
|
||||
}
|
||||
})
|
10
style.css
10
style.css
@ -39,7 +39,7 @@ button:hover {
|
||||
color: #0073e6;
|
||||
}
|
||||
|
||||
.game {
|
||||
#game {
|
||||
width: 10%;
|
||||
display: inline-block;
|
||||
background-color: rgba(83, 118, 235, 0.4);
|
||||
@ -51,17 +51,17 @@ button:hover {
|
||||
|
||||
}
|
||||
|
||||
.game:hover {
|
||||
#game:hover {
|
||||
background-color: rgba(113, 142, 238, 0.6);
|
||||
transform: scale(1.1);
|
||||
box-shadow: 0px 0px 5px 5px rgba(113, 142, 238, 0.6);
|
||||
}
|
||||
|
||||
.game h1 {
|
||||
font-size: 0.7em;
|
||||
#game h1 {
|
||||
font-size: 0.85em;
|
||||
color: rgb(149, 186, 241)
|
||||
}
|
||||
.game img {
|
||||
#game img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 10%;
|
||||
|
Loading…
x
Reference in New Issue
Block a user