diff --git a/ProjectSourceCode/src/init_data/create.sql b/ProjectSourceCode/src/init_data/create.sql index 58f6752..de888d7 100644 --- a/ProjectSourceCode/src/init_data/create.sql +++ b/ProjectSourceCode/src/init_data/create.sql @@ -4,7 +4,7 @@ CREATE TABLE users ( Password CHAR(60) NOT NULL ); -CREATE TABLE FavoriteTeam ( +CREATE TABLE FavoriteTeams ( UserID INT REFERENCES users(UserID) ON DELETE CASCADE ON UPDATE CASCADE, TeamID INT, TeamName VARCHAR(50), diff --git a/ProjectSourceCode/src/resources/css/generated-pages/club-pages/club-page-styling.css b/ProjectSourceCode/src/resources/css/generated-pages/club-pages/club-page-styling.css index 045978a..4f62ad1 100644 --- a/ProjectSourceCode/src/resources/css/generated-pages/club-pages/club-page-styling.css +++ b/ProjectSourceCode/src/resources/css/generated-pages/club-pages/club-page-styling.css @@ -1,4 +1,13 @@ #club-information-container { 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); } \ No newline at end of file diff --git a/ProjectSourceCode/src/resources/css/generated-pages/generated-pages-styling.css b/ProjectSourceCode/src/resources/css/generated-pages/generated-pages-styling.css index c012490..18dcfdb 100644 --- a/ProjectSourceCode/src/resources/css/generated-pages/generated-pages-styling.css +++ b/ProjectSourceCode/src/resources/css/generated-pages/generated-pages-styling.css @@ -85,7 +85,7 @@ { transform: skewX(20deg); /* Skew the banner to create a triangular side */ height: 20px; - margin-right: 200px; + margin-right: 130px; } /* diff --git a/ProjectSourceCode/src/resources/img/club-page/favorited.png b/ProjectSourceCode/src/resources/img/club-page/favorited.png new file mode 100644 index 0000000..d0d2b2d Binary files /dev/null and b/ProjectSourceCode/src/resources/img/club-page/favorited.png differ diff --git a/ProjectSourceCode/src/resources/img/club-page/unfavorited.png b/ProjectSourceCode/src/resources/img/club-page/unfavorited.png new file mode 100644 index 0000000..4e00800 Binary files /dev/null and b/ProjectSourceCode/src/resources/img/club-page/unfavorited.png differ diff --git a/ProjectSourceCode/src/resources/js/club-page/favorite-button.js b/ProjectSourceCode/src/resources/js/club-page/favorite-button.js new file mode 100644 index 0000000..3969016 --- /dev/null +++ b/ProjectSourceCode/src/resources/js/club-page/favorite-button.js @@ -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"; + }); + } +}); diff --git a/ProjectSourceCode/src/views/pages/clubs-page.hbs b/ProjectSourceCode/src/views/pages/clubs-page.hbs index 9050cbc..fb35c60 100644 --- a/ProjectSourceCode/src/views/pages/clubs-page.hbs +++ b/ProjectSourceCode/src/views/pages/clubs-page.hbs @@ -5,6 +5,7 @@

{{club.name}}

{{club.name}} Flag + Favorite Button
diff --git a/ProjectSourceCode/src/views/partials/footer.hbs b/ProjectSourceCode/src/views/partials/footer.hbs index a9a1901..dee842b 100644 --- a/ProjectSourceCode/src/views/partials/footer.hbs +++ b/ProjectSourceCode/src/views/partials/footer.hbs @@ -17,5 +17,7 @@ + + \ No newline at end of file