Merge branch 'main' into add-scoreboard-header
This commit is contained in:
@@ -29,7 +29,7 @@ services:
|
||||
depends_on:
|
||||
- db
|
||||
ports:
|
||||
- '3000:3000'
|
||||
- '3000:3001'
|
||||
volumes:
|
||||
- ../ProjectSourceCode:/home/node/app # Mount ProjectSourceCode directory
|
||||
- ../ProjectSourceCode/node_modules:/home/node/app/node_modules # Mount node_modules directory
|
||||
|
||||
@@ -175,5 +175,5 @@ app.get('/', (req, res) => {
|
||||
// <!-- Section 5 : Start Server-->
|
||||
// *****************************************************
|
||||
// starting the server and keeping the connection open to listen for more requests
|
||||
app.listen(3000);
|
||||
app.listen(3001);
|
||||
console.log('Server is listening on port 3000');
|
||||
@@ -0,0 +1,4 @@
|
||||
CREATE TABLE users (
|
||||
username VARCHAR(50) PRIMARY KEY,
|
||||
password CHAR(60) NOT NULL
|
||||
);
|
||||
@@ -1,3 +1,42 @@
|
||||
.card-container {
|
||||
margin-bottom: 35px;
|
||||
.banner {
|
||||
width: 500px; /* Set width of the banner to 100% of viewport width */
|
||||
height: 150px;
|
||||
background: linear-gradient(to right, white, rgb(245, 245, 245), rgb(227, 227, 227)); /* Gradient from white to gray */
|
||||
padding: 10px; /* Adjust padding as needed */
|
||||
position: relative; /* Needed for absolute positioning */
|
||||
overflow: hidden; /* Hide the overflowing skewed content */
|
||||
transform: skewX(-20deg); /* Skew the banner to create a triangular side */
|
||||
transition: transform 0.3s ease, box-shadow 0.3s ease; /* Transition for smooth transformation and box-shadow */
|
||||
cursor: pointer; /* Change cursor to pointer on hover */
|
||||
}
|
||||
|
||||
.banner:hover {
|
||||
transform: skewX(-20deg) scale(1.05); /* Increase scale on hover to make it pop */
|
||||
box-shadow: 0 0 20px rgba(0, 0, 0, 0.3); /* Add box-shadow on hover for depth effect */
|
||||
}
|
||||
|
||||
.underlined-header {
|
||||
font-family: 'Golos Text';
|
||||
display: inline-block; /* Ensure the width is based on content */
|
||||
border-bottom: 1.5px solid #999696; /* Adjust the color and thickness as needed */
|
||||
width: 165px; /* Adjust the width as needed, for example, 50% of the header's width */
|
||||
}
|
||||
|
||||
.content {
|
||||
transform: skewX(20deg); /* Counter-skew the content to maintain its appearance */
|
||||
}
|
||||
|
||||
.banner .content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.banner::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
width: 1%; /* Width of the red strip */
|
||||
background-color: red; /* Red color */
|
||||
}
|
||||
@@ -7,7 +7,7 @@
|
||||
}
|
||||
|
||||
.form-container {
|
||||
width: 40%;
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
/* Styling to center register page items */
|
||||
@@ -16,4 +16,49 @@
|
||||
display: flex;
|
||||
justify-content: center; /* Center items horizontally */
|
||||
align-items: center; /* Center items vertically */
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "Golos Text";
|
||||
}
|
||||
|
||||
#dropdown {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
#league_dropdown {
|
||||
margin : 100x;
|
||||
}
|
||||
|
||||
/* Center form items */
|
||||
.form-container {
|
||||
width: 50%; /* Adjust width as needed */
|
||||
margin: 0 auto; /* Center horizontally */
|
||||
text-align: center; /* Center text horizontally */
|
||||
}
|
||||
|
||||
/* Apply modern styling to inputs and select elements */
|
||||
.form-control,
|
||||
select {
|
||||
width: 100%; /* Make inputs and select elements same width */
|
||||
padding: 0.375rem 0.75rem; /* Example padding */
|
||||
font-size: 1rem; /* Example font size */
|
||||
line-height: 1.5; /* Example line height */
|
||||
color: #495057; /* Example text color */
|
||||
background-color: #fff; /* Example background color */
|
||||
border: 1px solid #ced4da; /* Example border */
|
||||
border-radius: 0.25rem; /* Example border radius */
|
||||
margin-bottom: 10px; /* Example margin */
|
||||
}
|
||||
|
||||
/* Adjust styling for form labels */
|
||||
.form-label {
|
||||
font-weight: bold; /* Example font weight */
|
||||
}
|
||||
|
||||
/* Adjust styling for buttons */
|
||||
.btn {
|
||||
margin-top: 10px; /* Example margin */
|
||||
}
|
||||
|
||||
|
||||
|
||||
BIN
ProjectSourceCode/src/resources/img/home-screen/la-liga/icon.png
Normal file
BIN
ProjectSourceCode/src/resources/img/home-screen/la-liga/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 43 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 127 KiB |
18
ProjectSourceCode/src/resources/js/homepage/routes.js
Normal file
18
ProjectSourceCode/src/resources/js/homepage/routes.js
Normal file
@@ -0,0 +1,18 @@
|
||||
const express = require('express');
|
||||
const app = express();
|
||||
const exphbs = require('express-handlebars');
|
||||
|
||||
app.engine('hbs', exphbs({ extname: '.hbs' }));
|
||||
app.set('view engine', 'hbs');
|
||||
|
||||
// Define a route to render the league-page.hbs template
|
||||
app.get('/league-page/:leagueName', (req, res) => {
|
||||
const leagueName = req.params.leagueName;
|
||||
// Here you might fetch data related to the clicked league
|
||||
// Pass the data to the template and render it
|
||||
res.render('league-page', { leagueName });
|
||||
});
|
||||
|
||||
app.listen(3000, () => {
|
||||
console.log('Server is running on http://localhost:3000');
|
||||
});
|
||||
@@ -1,27 +1,36 @@
|
||||
<div class="container mt-5">
|
||||
<h1 class="mb-4">Welcome</h1>
|
||||
<h1 class="mb-4 underlined-header">Leagues</h1>
|
||||
<div class="card-container">
|
||||
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-2 g-3">
|
||||
|
||||
<!-- 🇬🇧 Premier League -->
|
||||
{{> league_table eventName="Event Name" eventDateTime="Date and Time"}}
|
||||
|
||||
<!-- 🇪🇸 La Liga -->
|
||||
{{> league_table eventName="Event Name" eventDateTime="Date and Time"}}
|
||||
|
||||
<!-- 🇩🇪 Bundesliga -->
|
||||
{{> league_table eventName="Event Name" eventDateTime="Date and Time"}}
|
||||
|
||||
<!-- 🇮🇹 Serie A -->
|
||||
{{> league_table eventName="Event Name" eventDateTime="Date and Time"}}
|
||||
|
||||
<!-- 🇫🇷 Ligue 1 -->
|
||||
{{> league_table eventName="Event Name" eventDateTime="Date and Time"}}
|
||||
|
||||
<!-- 🇧🇷 Brasilerao -->
|
||||
{{> league_table eventName="Event Name" eventDateTime="Date and Time"}}
|
||||
|
||||
</div>
|
||||
<div class="row g-3">
|
||||
|
||||
<!-- 🇬🇧 Premier League -->
|
||||
<a href="league-page.hbs" class="card-link">
|
||||
{{> league_table leagueName="Premier League" logo="./img/home-screen/premier-league/icon.png" title="./img/home-screen/premier-league/title.png"}}
|
||||
</a>
|
||||
|
||||
<!-- 🇪🇸 La Liga -->
|
||||
{{> league_table leagueName="La Liga" logo="./img/home-screen/la-liga/icon.png" title="./img/home-screen/la-liga/title.png"}}
|
||||
|
||||
<!-- 🇩🇪 Bundesliga -->
|
||||
{{> league_table leagueName="Bundesliga" logo="./img/home-screen/la-liga/icon.png" title="./img/home-screen/la-liga/title.png"}}
|
||||
|
||||
<!-- 🇮🇹 Serie A -->
|
||||
{{> league_table leagueName="Serie A" logo="./img/home-screen/la-liga/icon.png" title="./img/home-screen/la-liga/title.png"}}
|
||||
|
||||
<!-- 🇫🇷 Ligue 1 -->
|
||||
{{> league_table leagueName="Ligue 1" logo="./img/home-screen/la-liga/icon.png" title="./img/home-screen/la-liga/title.png"}}
|
||||
|
||||
<!-- 🇧🇷 Brasilerao -->
|
||||
{{> league_table leagueName="Brasileirao" logo="./img/home-screen/la-liga/icon.png" title="./img/home-screen/la-liga/title.png"}}
|
||||
|
||||
/* Script to generate league URLs */
|
||||
<script>
|
||||
function redirectToLeaguePage(leagueName)
|
||||
{
|
||||
window.location.href = '/league-page/' + encodeURIComponent(leagueName);
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
0
ProjectSourceCode/src/views/pages/league-page.hbs
Normal file
0
ProjectSourceCode/src/views/pages/league-page.hbs
Normal file
@@ -14,6 +14,32 @@
|
||||
<input type="password" class="form-control" id="password" name="password" required>
|
||||
</div>
|
||||
|
||||
<div class = "dropdowns">
|
||||
<div id="league_dropdown">
|
||||
<label for="password" class="form-label">Preferred League :</label><br>
|
||||
<select id="dropdown">
|
||||
<option value="option1">Premier League</option>
|
||||
<option value="option2">La Liga</option>
|
||||
<option value="option3">Bundesliga</option>
|
||||
<option value="option3">Serie A</option>
|
||||
<option value="option3">Ligue 1</option>
|
||||
<option value="option3">Brasilerao</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div id="team_dropdown">
|
||||
<label for="password" class="form-label">Favourite Team :</label><br>
|
||||
<select id="dropdown">
|
||||
<option value="option1">Premier League</option>
|
||||
<option value="option2">La Liga</option>
|
||||
<option value="option3">Bundesliga</option>
|
||||
<option value="option3">Serie A</option>
|
||||
<option value="option3">Ligue 1</option>
|
||||
<option value="option3">Brasilerao</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</form>
|
||||
|
||||
|
||||
@@ -1,34 +1,7 @@
|
||||
<div class="col-md-4 mb-4">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">League Name</h5> <!-- Insert Name using Handlesbars and API -->
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Position</th>
|
||||
<th>Club Name</th>
|
||||
<th>Wins</th>
|
||||
<th>Draws</th>
|
||||
<th>Losses</th>
|
||||
<th>Points</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- Add rows dynamically using backend data -->
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>Club A</td>
|
||||
<td>10</td>
|
||||
<td>5</td>
|
||||
<td>3</td>
|
||||
<td>35</td>
|
||||
</tr>
|
||||
<!-- Add more rows if needed -->
|
||||
</tbody>
|
||||
</table>
|
||||
<a href="#" class="btn btn-primary">View League</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="banner">
|
||||
<div class="content">
|
||||
<img src={{logo}} height="120">
|
||||
<img src={{title}} height="80">
|
||||
{{flag}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -4,3 +4,10 @@
|
||||
16 : 20 , database discussion
|
||||
16 : 22 , questions
|
||||
16 : 23 , end of meeting
|
||||
|
||||
==== Meeting 2 04/04/2024 ====
|
||||
15 : 45 : start
|
||||
15 : 48 : display of the project
|
||||
15 : 49 : overview of features and display of initial website
|
||||
15 : 52 : discussion on database
|
||||
15 : 53 : end of meeting
|
||||
|
||||
Reference in New Issue
Block a user