Favorite button basic implementation added
This commit is contained in:
@@ -4,7 +4,7 @@ CREATE TABLE users (
|
|||||||
Password CHAR(60) NOT NULL
|
Password CHAR(60) NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE FavoriteTeam (
|
CREATE TABLE FavoriteTeams (
|
||||||
UserID INT REFERENCES users(UserID) ON DELETE CASCADE ON UPDATE CASCADE,
|
UserID INT REFERENCES users(UserID) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
TeamID INT,
|
TeamID INT,
|
||||||
TeamName VARCHAR(50),
|
TeamName VARCHAR(50),
|
||||||
|
|||||||
@@ -2,3 +2,12 @@
|
|||||||
{
|
{
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#club-favorite-button
|
||||||
|
{
|
||||||
|
width: 35px;
|
||||||
|
transform: skewX(20deg);
|
||||||
|
margin-right: 25px;
|
||||||
|
filter: drop-shadow(0px 0px 8px rgba(0, 0, 0, 0.3));
|
||||||
|
filter: outline(2px solid red);
|
||||||
|
}
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
{
|
{
|
||||||
transform: skewX(20deg); /* Skew the banner to create a triangular side */
|
transform: skewX(20deg); /* Skew the banner to create a triangular side */
|
||||||
height: 20px;
|
height: 20px;
|
||||||
margin-right: 200px;
|
margin-right: 130px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
BIN
ProjectSourceCode/src/resources/img/club-page/favorited.png
Normal file
BIN
ProjectSourceCode/src/resources/img/club-page/favorited.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
BIN
ProjectSourceCode/src/resources/img/club-page/unfavorited.png
Normal file
BIN
ProjectSourceCode/src/resources/img/club-page/unfavorited.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
@@ -0,0 +1,8 @@
|
|||||||
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
|
var favoriteButton = document.getElementById("club-favorite-button");
|
||||||
|
if (favoriteButton) {
|
||||||
|
favoriteButton.addEventListener("click", function() {
|
||||||
|
favoriteButton.src = "/img/club-page/favorited.png";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -5,6 +5,7 @@
|
|||||||
<img id="generated-page-header-logo" src="{{club.crest}}" alt="{{club.name}} Logo">
|
<img id="generated-page-header-logo" src="{{club.crest}}" alt="{{club.name}} Logo">
|
||||||
<h1 id="generated-page-header-title">{{club.name}}</h1>
|
<h1 id="generated-page-header-title">{{club.name}}</h1>
|
||||||
<img id="generated-page-header-flag" src="{{club.area.club_flag}}" alt="{{club.name}} Flag">
|
<img id="generated-page-header-flag" src="{{club.area.club_flag}}" alt="{{club.name}} Flag">
|
||||||
|
<img id="club-favorite-button" src="/img/club-page/unfavorited.png" alt="Favorite Button">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="club-page-contents-container" class="page-content-container">
|
<div id="club-page-contents-container" class="page-content-container">
|
||||||
|
|||||||
@@ -17,5 +17,7 @@
|
|||||||
<script src="/js/league-page/change-goal-difference-color.js"></script>
|
<script src="/js/league-page/change-goal-difference-color.js"></script>
|
||||||
<script src="/routes/club-pages/redirect-to-club-url.js"></script>
|
<script src="/routes/club-pages/redirect-to-club-url.js"></script>
|
||||||
|
|
||||||
|
<!-- Club Pages Scripts -->
|
||||||
|
<script src="/js/club-page/favorite-button.js"></script>
|
||||||
|
|
||||||
</footer>
|
</footer>
|
||||||
Reference in New Issue
Block a user