diff --git a/ProjectSourceCode/docker-compose.yaml b/ProjectSourceCode/docker-compose.yaml index 5d187ba..83cf36c 100644 --- a/ProjectSourceCode/docker-compose.yaml +++ b/ProjectSourceCode/docker-compose.yaml @@ -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 diff --git a/ProjectSourceCode/src/index.js b/ProjectSourceCode/src/index.js index 87425db..8ab5ad9 100644 --- a/ProjectSourceCode/src/index.js +++ b/ProjectSourceCode/src/index.js @@ -175,5 +175,5 @@ app.get('/', (req, res) => { // // ***************************************************** // 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'); \ No newline at end of file diff --git a/ProjectSourceCode/src/init_data/create.sql b/ProjectSourceCode/src/init_data/create.sql index e69de29..a5d6539 100644 --- a/ProjectSourceCode/src/init_data/create.sql +++ b/ProjectSourceCode/src/init_data/create.sql @@ -0,0 +1,4 @@ +CREATE TABLE users ( + username VARCHAR(50) PRIMARY KEY, + password CHAR(60) NOT NULL +); \ No newline at end of file diff --git a/ProjectSourceCode/src/resources/css/home-screen.css b/ProjectSourceCode/src/resources/css/home-screen.css index 9f7ef93..9b4eb25 100644 --- a/ProjectSourceCode/src/resources/css/home-screen.css +++ b/ProjectSourceCode/src/resources/css/home-screen.css @@ -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 */ } \ No newline at end of file diff --git a/ProjectSourceCode/src/resources/css/login_and_registration.css b/ProjectSourceCode/src/resources/css/login_and_registration.css index 2882c43..362b5af 100644 --- a/ProjectSourceCode/src/resources/css/login_and_registration.css +++ b/ProjectSourceCode/src/resources/css/login_and_registration.css @@ -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 */ -} \ No newline at end of file +} + +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 */ +} + + diff --git a/ProjectSourceCode/src/resources/img/home-screen/la-liga/icon.png b/ProjectSourceCode/src/resources/img/home-screen/la-liga/icon.png new file mode 100644 index 0000000..f666d86 Binary files /dev/null and b/ProjectSourceCode/src/resources/img/home-screen/la-liga/icon.png differ diff --git a/ProjectSourceCode/src/resources/img/home-screen/la-liga/title.png b/ProjectSourceCode/src/resources/img/home-screen/la-liga/title.png new file mode 100644 index 0000000..d208f2b Binary files /dev/null and b/ProjectSourceCode/src/resources/img/home-screen/la-liga/title.png differ diff --git a/ProjectSourceCode/src/resources/img/home-screen/premier-league/icon.png b/ProjectSourceCode/src/resources/img/home-screen/premier-league/icon.png new file mode 100644 index 0000000..b0137db Binary files /dev/null and b/ProjectSourceCode/src/resources/img/home-screen/premier-league/icon.png differ diff --git a/ProjectSourceCode/src/resources/img/home-screen/premier-league/title.png b/ProjectSourceCode/src/resources/img/home-screen/premier-league/title.png new file mode 100644 index 0000000..7689c72 Binary files /dev/null and b/ProjectSourceCode/src/resources/img/home-screen/premier-league/title.png differ diff --git a/ProjectSourceCode/src/resources/js/homepage/routes.js b/ProjectSourceCode/src/resources/js/homepage/routes.js new file mode 100644 index 0000000..5e88e0c --- /dev/null +++ b/ProjectSourceCode/src/resources/js/homepage/routes.js @@ -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'); +}); diff --git a/ProjectSourceCode/src/views/pages/home.hbs b/ProjectSourceCode/src/views/pages/home.hbs index f86d569..2921832 100644 --- a/ProjectSourceCode/src/views/pages/home.hbs +++ b/ProjectSourceCode/src/views/pages/home.hbs @@ -1,27 +1,36 @@
| Position | -Club Name | -Wins | -Draws | -Losses | -Points | -
|---|---|---|---|---|---|
| 1 | -Club A | -10 | -5 | -3 | -35 | -