Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed games page CSS #123

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions Game/game.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
body {
font-family: Arial, sans-serif;
font-family: Arial black, sans-serif;
margin: 0;
padding: 0;
background-color: #f4f4f4;
background-color: #d3d3d3;
color: #333;
}

Expand All @@ -13,6 +13,7 @@ body {
background-color: #fff;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
border-radius: 10px;
border-color: #00ffc3;
}

h2, h3, h4 {
Expand All @@ -36,13 +37,13 @@ p {
.team-section {
flex: 1;
padding: 20px;
background-color: #f8f9fa;
background-color: #ffff;
margin: 0 10px;
border-radius: 5px;
}

.broadcast-info {
background-color: #e9ecef;
background-color: #d3d3d3;
padding: 15px;
border-radius: 8px;
margin-top: 20px;
Expand Down Expand Up @@ -99,7 +100,7 @@ p {
}

.game-info-box {
background-color: #f8f9fa;
background-color: #d3d3d3;
padding: 20px;
border-radius: 8px;
margin: 20px 0;
Expand Down Expand Up @@ -140,7 +141,7 @@ p {
.venue-info {
margin-top: 30px;
padding: 20px;
background-color: #f8f9fa;
background-color: #d3d3d3;
border-radius: 8px;
}

Expand Down Expand Up @@ -207,7 +208,7 @@ p {
}

.submit-prediction {
background-color: #007bff;
background-color: #00ffc3;
color: white;
border: none;
padding: 10px 20px;
Expand All @@ -218,7 +219,7 @@ p {
}

.submit-prediction:hover {
background-color: #0056b3;
background-color: #00c194;
}

.prediction-needed {
Expand All @@ -230,7 +231,7 @@ p {
/* ...existing styles... */

.prediction-section {
background-color: #f8f9fa;
background-color: #d3d3d3;
padding: 20px;
border-radius: 8px;
margin: 20px 0;
Expand Down Expand Up @@ -320,7 +321,7 @@ p {
}

.team-choice:hover {
border-color: #007bff;
border-color: #00ffc3;
transform: translateY(-2px);
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
Expand Down
Binary file added assets/Photos/Harden.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 51 additions & 9 deletions index.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,33 @@
<?php
session_start();
include 'php/config.php';
// Fetch NBA articles
$apiHost = 'nba-latest-news.p.rapidapi.com';
$apiKey = '049f002b9cmsh19ee321223a76dfp1a96e8jsn2efebdd5f8cf';
$articles = [];

try {
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://$apiHost/articles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"x-rapidapi-host: $apiHost",
"x-rapidapi-key: $apiKey"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);

if ($err) {
throw new Exception("cURL Error: $err");
}

$articles = json_decode($response, true);
} catch (Exception $e) {
error_log($e->getMessage());
}
?>

<!DOCTYPE html>
Expand Down Expand Up @@ -36,10 +63,12 @@
<tbody>
</tbody>
</table>
<div class="image-container-left">
<img src="./assets/Photos/Harden.png" alt="Basketball Image Harden" class="background-image-left">
</div>
</div>
<div id="MiddleColumn">
<h3>Matches - <?php echo date('F j, Y'); ?></h3>
<h3>NBA Matches - <?php echo date('F j, Y'); ?></h3>
<div id="Upcoming_Matches">
<h4>Upcoming/In Progress Matches</h4>
</div>
Expand All @@ -50,14 +79,27 @@
</div>

<div id="RightColumn">
<h3>Recommended Articles</h3>
<ul>
<li><a href="#">Article 1</a></li>
<li><a href="#">Article 2</a></li>
<li><a href="#">Article 3</a></li>
</ul>
</div>
<h3>Latest News Articles</h3>
<?php if (!empty($articles)) : ?>
<ul id="newsList">
<?php foreach (array_slice($articles, 0, 3) as $article) : ?>
<li>
<a href="<?= htmlspecialchars($article['url']) ?>" target="_blank">
<?= htmlspecialchars($article['title']) ?>
</a>
</li>
<?php endforeach; ?>
</ul>
<?php else : ?>
<p>No articles available at the moment.</p>
<?php endif; ?>
<div class="image-container">
<img src="./assets/Photos/MainPageBron.png" alt="Basketball Image" class="background-image">
</div>
</div>

</body>
</html>

<script>
function navigateToTeamPage(teamName, teamId) {
Expand Down