Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
GithubMaster212 authored Dec 1, 2024
1 parent 643bc5d commit ea6bcb9
Showing 1 changed file with 40 additions and 15 deletions.
55 changes: 40 additions & 15 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,31 @@
margin: 20px 0; /* Space between categories */
}
.category-title {
margin-left: 100px; /* Increased space for category title */
margin-left: 120px; /* Increased space for category title */
font-size: 24px; /* Font size for category title */
}
.game-row {
display: flex;
align-items: center;
padding: 0 60px; /* Padding for the row */
padding: 0 20px; /* Padding for the row */
}
.game-container {
display: flex;
overflow-x: auto; /* Allow horizontal scrolling */
scroll-behavior: smooth; /* Smooth scrolling */
padding: 10px 0; /* Padding for the container */
scrollbar-width: none; /* Hide scrollbar for Firefox */
-ms-overflow-style: none; /* Hide scrollbar for Internet Explorer and Edge */
}
.game-container::-webkit-scrollbar {
display: none; /* Hide scrollbar for Chrome, Safari, and Opera */
}
.game-card {
background-color: #333; /* Darker gray for card background */
border-radius: 10px; /* Rounded corners for cards */
padding: 20px; /* Padding for cards */
width: 240px; /* Width of cards */
margin-right: 20px; /* Space between cards */
padding: 15px; /* Padding for cards */
width: 200px; /* Width of cards */
margin-right: 15px; /* Space between cards */
flex-shrink: 0; /* Prevent shrinking */
cursor: pointer;
}
Expand All @@ -55,11 +61,11 @@
height: auto;
}
.game-card h3 {
font-size: 18px; /* Font size for title */
font-size: 16px; /* Font size for title */
margin: 10px 0 5px;
}
.game-card p {
font-size: 14px; /* Font size for description */
font-size: 12px; /* Font size for description */
margin: 0;
overflow: hidden;
text-overflow: ellipsis;
Expand All @@ -68,16 +74,35 @@
-webkit-box-orient: vertical;
}
.scroll-arrow {
background-color: #444; /* Lighter gray for arrows */
background-color: rgba(68, 68, 68, 0.8); /* Lighter gray for arrows */
color: white;
border-radius: 10px; /* Rounded corners for arrows */
border-radius: 50%; /* Round arrows */
border: none;
font-size: 24px;
padding: 15px;
font-size: 20px;
padding: 10px;
cursor: pointer;
z-index: 100;
margin-left: 20px; /* Space between arrow and container */
margin-right: 20px; /* Space between arrow and container */
margin-left: 5px; /* Space between arrow and container */
}
@media (max-width: 768px) {
.category-title {
margin-left: 20px; /* Adjusted space for smaller screens */
font-size: 20px;
}
.game-row {
padding: 0 10px;
}
.game-card {
width: 150px;
padding: 10px;
margin-right: 10px;
}
.scroll-arrow {
font-size: 16px;
padding: 8px;
margin-left: 5px;
margin-right: 5px;
}
}
</style>
</head>
Expand Down Expand Up @@ -108,7 +133,7 @@
const row = rowPriority[0];
const priority = rowPriority[1];

// Only add games to the respective categories based on their row number
// Only add games to respective categories based on their row number
if (gamesByCategory[row]) {
const gameData = await fetch(file.download_url).then(res => res.text());
const [title, description, imageUrl, gameUrl] = gameData.split('\n');
Expand Down Expand Up @@ -147,7 +172,7 @@ <h3>${game.title}</h3>

function scroll(rowId, direction) {
const container = document.getElementById(`game-container-${rowId}`);
container.scrollBy({ left: direction * 250, behavior: 'smooth' });
container.scrollBy({ left: direction * 200, behavior: 'smooth' });
}

loadGames();
Expand Down

0 comments on commit ea6bcb9

Please sign in to comment.