Skip to content

Commit

Permalink
Merge pull request #124 from RPI-ITWS/bug-fix
Browse files Browse the repository at this point in the history
Bug fix
  • Loading branch information
LHTY03 authored Dec 9, 2024
2 parents 9e412ed + 6294057 commit 9a18b6c
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 39 deletions.
4 changes: 3 additions & 1 deletion Auth/Profile/profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,9 @@ class="friend-name"><?php echo htmlspecialchars($friend['username']); ?></a>
</div>
</div>
</div>

<script>
const currentUserId = <?php echo isset($_SESSION['user_id']) ? $_SESSION['user_id'] : 'null'; ?>;
</script>
<script src="./src/profile.js"></script>
</body>
</html>
Expand Down
2 changes: 1 addition & 1 deletion Leaderboard/leaderboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<body>

<?php include '../php/header.php'; ?>
<div><h1 id="leaderBoardTitle">Leaderboard</h1></div>
<div id="leaderBoardTitle">Leaderboard</div>
<div id="Page" class="sticky-top">
<div id="LeftCol"></div>
<div id="MiddleCol" class ="flex-column flex-md-row align-items-center pt-3 pb-3">
Expand Down
64 changes: 29 additions & 35 deletions Leaderboard/src/leaderboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ body, html {
}

#leaderboardTable th, #leaderboardTable td {
border: 1px solid #19D795;
border: 1px solid #00ffc3;
padding: 10px;
text-align: center;
}

#leaderboardTable th {
background-color: #21946D;
color: #18e69e;
color: #00ffc3;
}

#leaderboardTable tr:nth-child(even) {
Expand All @@ -35,40 +35,34 @@ body, html {
background-color: #374244;
}

#MiddleColumn h1 {
color: #18e69e;
text-align: center;
margin-top: 20px;
}

#leaderBoardTitle {
font-family: Arial black, Helvetica, sans-serif;
font-size: 40px;
font-weight: bold;
font-style: italic;
color: #333;
text-align: center;
margin-top: 20px;
margin: 20px 0;
}

#LeftCol {
width: 20%;
height: 1046px;
background-color: #6e7f82;

}

#MiddleCol {
padding: 20px;
box-sizing: border-box;

background-color: #2b3233;
background-color: #d3d3d3;
border-radius: 8px;
border: 2px solid #19D795;
border: 2px solid #00ffc3;
width: 70%;
height: 1046px;
}

#leaderBoardTitle {
color: #18e69e;
text-align: center;
margin-top: 60px;
margin-bottom: 20px;
}


#leaderboardTable {
width: 90%;
Expand All @@ -80,24 +74,24 @@ body, html {
}

#leaderboardTable th, #leaderboardTable td {
border: 1px solid #19D795;
border: 1px solid #00ffc3;
padding: 12px;
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #18e69e;
color: #00ffc3;
}

#leaderboardTable th {
background-color: #21946D;
color: #18e69e;
color: #00ffc3;
font-weight: bold;
}

#leaderboardTable td:first-child {
font-weight: bold;
color: #18e69e;
color: #00ffc3;
}

#leaderboardTable #rankings {
Expand All @@ -111,7 +105,7 @@ body, html {

#leaderboardTable .player-name {
vertical-align: middle;
color: #18e69e;
color: #00ffc3;
}

#leaderboardTable #score {
Expand All @@ -126,7 +120,7 @@ body, html {
object-fit: cover;
vertical-align: middle;
margin-right: 10px;
border: 2px solid #19D795;
border: 2px solid #00ffc3;
}

.score-container {
Expand All @@ -135,7 +129,7 @@ body, html {
overflow: hidden;
display: inline-block;
position: relative;
background: linear-gradient(to bottom, #21946D 0%, #19D795 100%);
background: linear-gradient(to bottom, #21946D 0%, #00ffc3 100%);
border-radius: 5px;
padding: 5px 10px;
min-width: 100px;
Expand All @@ -156,7 +150,7 @@ body, html {
display: block;
font-family: 'Digital-7', monospace;
font-size: 1.5em;
color: #18e69e;
color: #00ffc3;
text-shadow: 0 0 5px #18E59D;
text-align: center;
}
Expand All @@ -181,12 +175,12 @@ body, html {
#sortButtons .btn {
margin-right: 10px;
background-color: #21946D;
border-color: #19D795;
color: #18e69e;
border-color: #00ffc3;
color: #00ffc3;
}

#sortButtons .btn.active {
background-color: #18E59D;
background-color: #00ffc3;
color: #2b3233;
}

Expand All @@ -201,7 +195,7 @@ body, html {
overflow: hidden;
display: inline-block;
position: relative;
background: linear-gradient(to bottom, #21946D 0%, #19D795 100%);
background: linear-gradient(to bottom, #21946D 0%, #00ffc3 100%);
border-radius: 5px;
padding: 5px 15px;
min-width: 100px;
Expand Down Expand Up @@ -229,13 +223,13 @@ body, html {
}

.rank-num {
color: #18e69e;
color: #00ffc3;
}

#RightCol {
width: 20%;
height: 1046px;
background-color: #6e7f82;

}

#viewButtons {
Expand All @@ -245,12 +239,12 @@ body, html {
#viewButtons .btn {
margin-right: 10px;
background-color: #21946D;
border-color: #19D795;
color: #18e69e;
border-color: #00ffc3;
color: #00ffc3;
}

#viewButtons .btn.active {
background-color: #18E59D;
background-color: #00ffc3;
color: #2b3233;
}

Expand Down
4 changes: 2 additions & 2 deletions php/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
</a>
<ul class="dropdown-menu" style="background-color: #1a1a1a; border-color: #00aaff;">
<?php if (isset($_SESSION['user_id'])): ?>
<li><a class="dropdown-item" href="/ITWS-2110-F24-WinShare/Auth/Profile/profile.php?id=<?php echo $_SESSION['user_id']; ?>" style="color: #00aaff;">Profile</a></li>
<li><a class="dropdown-item" href="#" style="color: #00aaff;">Settings</a></li>
<li><a class="dropdown-item" href="/ITWS-2110-F24-WinShare/Auth/Profile/profile.php?id=<?php echo $_SESSION['user_id']; ?>" style="color: #00ffc3;">Profile</a></li>
<li><a class="dropdown-item" href="#" style="color: #00ffc3;">Settings</a></li>
<li><hr class="dropdown-divider"></li>
<li>
<form method="POST" action="" style="display: inline;">
Expand Down

0 comments on commit 9a18b6c

Please sign in to comment.