Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
GithubMaster212 authored Nov 30, 2024
1 parent a19db75 commit cc1a65f
Showing 1 changed file with 12 additions and 23 deletions.
35 changes: 12 additions & 23 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,50 +6,39 @@
<title>Unblocked Games</title>
<style>
body {
background-color: black;
color: white;
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: black;
color: white;
}
.top-bar {
background-color: #333;
padding: 15px;
color: white;
padding: 10px;
text-align: center;
position: fixed;
position: sticky;
top: 0;
left: 0;
right: 0;
z-index: 1000;
width: 100%;
}
.game-container {
display: flex;
flex-wrap: wrap;
gap: 20px;
padding: 80px 20px 20px;
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
.game-card {
background-color: #333;
background-color: #444;
border-radius: 5px;
padding: 15px;
width: calc(33.33% - 20px);
padding: 10px;
width: 200px;
cursor: pointer;
box-sizing: border-box;
}
.game-card img {
width: 100%;
height: auto;
aspect-ratio: 16 / 9;
object-fit: cover;
border-radius: 3px;
}
.game-card h2 {
margin: 10px 0;
}
.game-card p {
margin: 0;
font-weight: bold;
}
</style>
Expand All @@ -63,7 +52,7 @@
const gameContainer = document.getElementById('game-container');

try {
const response = await fetch('https://api.github.com/repos/githubmaster212/games/contents/games');
const response = await fetch('https://api.github.com/repos/githubmaster212/game/contents/games');
const files = await response.json();

for (const file of files) {
Expand All @@ -74,8 +63,8 @@
const gameCard = document.createElement('div');
gameCard.className = 'game-card';
gameCard.innerHTML = `
<img src="${imageUrl}" alt="${title}">
<h2>${title}</h2>
<img src="${imageUrl}" alt="${title}">
<p>${description}</p>
`;
gameCard.addEventListener('click', () => {
Expand Down

0 comments on commit cc1a65f

Please sign in to comment.