Skip to content

Commit

Permalink
Small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoleNG18 committed Feb 28, 2024
1 parent 33ac784 commit 7d6f04b
Show file tree
Hide file tree
Showing 17 changed files with 625 additions and 49 deletions.
16 changes: 15 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@ plugins {
id 'java'
id 'org.springframework.boot' version '3.0.1'
id 'io.spring.dependency-management' version '1.1.4'
id "com.microsoft.azure.azurewebapp" version "1.7.1"
}

azurewebapp {
subscription = 'Azure for Students'
resourceGroup = 'scores-rg-pe'
appName = 'pescores'
pricingTier = 'Basic (B2)'
region = 'Central US'
runtime {
os = 'Windows'
webContainer = 'Java SE'
javaVersion = 'Java 17'
}
}

group = 'pmgkn.pescores'
Expand Down Expand Up @@ -31,7 +45,7 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-webflux'
runtimeOnly 'com.mysql:mysql-connector-j'
runtimeOnly 'com.mysql:mysql-connector-j:8.2.0'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
testImplementation 'org.hsqldb:hsqldb'
Expand Down
11 changes: 6 additions & 5 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ server:
spring:
datasource:
driverClassName: com.mysql.cj.jdbc.Driver
password: ${DB_PASSWORD}
url: jdbc:mysql://scores-pe-db.mysql.database.azure.com:3306/information_schema?serverTimezone=UTC&useSSL=true&requireSSL=false
# url: jdbc:mysql://localhost:3306/pe_scores?allowPublicKeyRetrieval=true&useSSL=false&createDatabaseIfNotExist=true&serverTimezone=UTC
username: ${DB_USERNAME}
password: Nikoleto18@
url: jdbc:mysql://scores-pe-db.mysql.database.azure.com:3306/pe_scores?serverTimezone=UTC&useSSL=true&requireSSL=false
# url: jdbc:mysql://scores-pe-db.mysql.database.azure.com:3306/pe_scores?useSSL=TRUE;myDbConn=DriverManager.getConnection(url, "peScores", "Nikoleto18@")
# url: jdbc:mysql://localhost:3306/pe_scores?allowPublicKeyRetrieval=true&useSSL=false&createDatabaseIfNotExist=true&serverTimezone=UTC
username: peScores
jpa:
database-platform: org.hibernate.dialect.MySQLDialect
defer-datasource-initialization: true
Expand All @@ -31,4 +32,4 @@ spring:
init:
mode: always

hostName: https://pescores.azurewebsites.net/
hostName: https://pescores.azurewebsites.net/
47 changes: 44 additions & 3 deletions src/main/resources/templates/add-class.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,48 @@
<head>
<title>Add class</title>
<th:block th:insert="~{/fragments/head}"></th:block>
<!-- <th:block th:insert="~{/fragments/head}"></th:block>-->

<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/x-icon" th:href="@{/images/favicon.ico}">
<link rel="stylesheet" th:href="@{/css/fragments.css}">

<link rel="stylesheet" th:href="@{/css/add-class.css}">
</head>

<div>
<th:block th:insert="~{/fragments/header}"></th:block>
<header xmlns:sec="http://www.w3.org/1999/xhtml">
<a sec:authorize="!isAuthenticated()" th:href="@{/}"><img src="/images/pe%20scores-final.png" alt="pe scores logo"/></a>
<a sec:authorize="isAuthenticated()" th:href="@{/classes}"><img src="/images/pe%20scores-final.png"
alt="pe scores logo"/></a>

<nav class="navbar">
<ul class="navbar-buttons" sec:authorize="!isAuthenticated()">
<a th:href="@{/users/login}">Log in</a>
<a th:href="@{/users/register}">Sign up</a>
</ul>

<ul class="navbar-buttons" sec:authorize="isAuthenticated()">
<a th:href="@{/denseBall}">Dense ball</a>
<a th:href="@{/jump}">Jump</a>
<a th:href="@{/tTest}">T-test</a>
<a th:href="@{/thirty}">30 meters</a>
<a th:href="@{/twoHundred}">200 meters</a>
<a th:href="@{/classes}">Classes</a>
<a th:href="@{/tasks}">Tasks</a>
<a th:href="@{/classes/add}">Add class</a>
<a th:href="@{/students/add}">Add student</a>
<a>
<form class="logout" th:method="post" th:action="@{/users/logout}">
<input class="dropdown-item btn-link nav-link" type="submit" value="Logout">
</form>
</a>
</ul>
</nav>
</header>

<!-- <th:block th:insert="~{/fragments/header}"></th:block>-->
</div>


Expand Down Expand Up @@ -51,5 +88,9 @@ <h3>Add class</h3>

</section>

<th:block th:insert="~{/fragments/footer}"></th:block>
<!--<th:block th:insert="~{/fragments/footer}"></th:block>-->

<footer>
<p>&copy; 2024 Copyright: PE Scores</p>
</footer>
</body>
46 changes: 43 additions & 3 deletions src/main/resources/templates/classes-edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,49 @@

<head>
<title>My classes</title>
<th:block th:insert="~{/fragments/head}"></th:block>
<!-- <th:block th:insert="~{/fragments/head}"></th:block>-->
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/x-icon" th:href="@{/images/favicon.ico}">
<link rel="stylesheet" th:href="@{/css/fragments.css}">

<link rel="stylesheet" th:href="@{/css/edit-class.css}">
</head>
<body>

<div>
<th:block th:insert="~{/fragments/header}"></th:block>
<!-- <th:block th:insert="~{/fragments/header}"></th:block>-->

<header xmlns:sec="http://www.w3.org/1999/xhtml">
<a sec:authorize="!isAuthenticated()" th:href="@{/}"><img src="/images/pe%20scores-final.png" alt="pe scores logo"/></a>
<a sec:authorize="isAuthenticated()" th:href="@{/classes}"><img src="/images/pe%20scores-final.png"
alt="pe scores logo"/></a>

<nav class="navbar">
<ul class="navbar-buttons" sec:authorize="!isAuthenticated()">
<a th:href="@{/users/login}">Log in</a>
<a th:href="@{/users/register}">Sign up</a>
</ul>

<ul class="navbar-buttons" sec:authorize="isAuthenticated()">
<a th:href="@{/denseBall}">Dense ball</a>
<a th:href="@{/jump}">Jump</a>
<a th:href="@{/tTest}">T-test</a>
<a th:href="@{/thirty}">30 meters</a>
<a th:href="@{/twoHundred}">200 meters</a>
<a th:href="@{/classes}">Classes</a>
<a th:href="@{/tasks}">Tasks</a>
<a th:href="@{/classes/add}">Add class</a>
<a th:href="@{/students/add}">Add student</a>
<a>
<form class="logout" th:method="post" th:action="@{/users/logout}">
<input class="dropdown-item btn-link nav-link" type="submit" value="Logout">
</form>
</a>
</ul>
</nav>
</header>
</div>

<section class="main-section">
Expand Down Expand Up @@ -55,7 +91,11 @@ <h3>Edit class</h3>

</section>

<th:block th:insert="~{/fragments/footer}"></th:block>
<!--<th:block th:insert="~{/fragments/footer}"></th:block>-->

<footer>
<p>&copy; 2024 Copyright: PE Scores</p>
</footer>

</body>

Expand Down
46 changes: 43 additions & 3 deletions src/main/resources/templates/classes.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,49 @@

<head>
<title>My classes</title>
<th:block th:insert="~{/fragments/head}"></th:block>
<!-- <th:block th:insert="~{/fragments/head}"></th:block>-->
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/x-icon" th:href="@{/images/favicon.ico}">
<link rel="stylesheet" th:href="@{/css/fragments.css}">

<link rel="stylesheet" th:href="@{/css/classes.css}">
</head>
<body>

<div>
<th:block th:insert="~{/fragments/header}"></th:block>
<!-- <th:block th:insert="~{/fragments/header}"></th:block>-->

<header xmlns:sec="http://www.w3.org/1999/xhtml">
<a sec:authorize="!isAuthenticated()" th:href="@{/}"><img src="/images/pe%20scores-final.png" alt="pe scores logo"/></a>
<a sec:authorize="isAuthenticated()" th:href="@{/classes}"><img src="/images/pe%20scores-final.png"
alt="pe scores logo"/></a>

<nav class="navbar">
<ul class="navbar-buttons" sec:authorize="!isAuthenticated()">
<a th:href="@{/users/login}">Log in</a>
<a th:href="@{/users/register}">Sign up</a>
</ul>

<ul class="navbar-buttons" sec:authorize="isAuthenticated()">
<a th:href="@{/denseBall}">Dense ball</a>
<a th:href="@{/jump}">Jump</a>
<a th:href="@{/tTest}">T-test</a>
<a th:href="@{/thirty}">30 meters</a>
<a th:href="@{/twoHundred}">200 meters</a>
<a th:href="@{/classes}">Classes</a>
<a th:href="@{/tasks}">Tasks</a>
<a th:href="@{/classes/add}">Add class</a>
<a th:href="@{/students/add}">Add student</a>
<a>
<form class="logout" th:method="post" th:action="@{/users/logout}">
<input class="dropdown-item btn-link nav-link" type="submit" value="Logout">
</form>
</a>
</ul>
</nav>
</header>
</div>

<section class="main-section-classes">
Expand Down Expand Up @@ -42,7 +78,11 @@ <h2>My classes</h2>

</section>

<th:block th:insert="~{/fragments/footer}"></th:block>
<!--<th:block th:insert="~{/fragments/footer}"></th:block>-->

<footer>
<p>&copy; 2024 Copyright: PE Scores</p>
</footer>

</body>

Expand Down
47 changes: 44 additions & 3 deletions src/main/resources/templates/current-class.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,50 @@

<head>
<title th:text="${currentClass.className}">Class page</title>
<th:block th:insert="~{/fragments/head}"></th:block>
<!-- <th:block th:insert="~{/fragments/head}"></th:block>-->

<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/x-icon" th:href="@{/images/favicon.ico}">
<link rel="stylesheet" th:href="@{/css/fragments.css}">

<link rel="stylesheet" th:href="@{/css/current-class.css}">
</head>
<body>

<div>
<th:block th:insert="~{/fragments/header}"></th:block>
<!-- <th:block th:insert="~{/fragments/header}"></th:block>-->

<header xmlns:sec="http://www.w3.org/1999/xhtml">
<a sec:authorize="!isAuthenticated()" th:href="@{/}"><img src="/images/pe%20scores-final.png" alt="pe scores logo"/></a>
<a sec:authorize="isAuthenticated()" th:href="@{/classes}"><img src="/images/pe%20scores-final.png"
alt="pe scores logo"/></a>

<nav class="navbar">
<ul class="navbar-buttons" sec:authorize="!isAuthenticated()">
<a th:href="@{/users/login}">Log in</a>
<a th:href="@{/users/register}">Sign up</a>
</ul>

<ul class="navbar-buttons" sec:authorize="isAuthenticated()">
<a th:href="@{/denseBall}">Dense ball</a>
<a th:href="@{/jump}">Jump</a>
<a th:href="@{/tTest}">T-test</a>
<a th:href="@{/thirty}">30 meters</a>
<a th:href="@{/twoHundred}">200 meters</a>
<a th:href="@{/classes}">Classes</a>
<a th:href="@{/tasks}">Tasks</a>
<a th:href="@{/classes/add}">Add class</a>
<a th:href="@{/students/add}">Add student</a>
<a>
<form class="logout" th:method="post" th:action="@{/users/logout}">
<input class="dropdown-item btn-link nav-link" type="submit" value="Logout">
</form>
</a>
</ul>
</nav>
</header>
</div>

<section class="main-section-classes">
Expand Down Expand Up @@ -130,7 +167,11 @@ <h2 th:text="${currentClass.className}">7a</h2>

</section>

<th:block th:insert="~{/fragments/footer}"></th:block>
<!--<th:block th:insert="~{/fragments/footer}"></th:block>-->

<footer>
<p>&copy; 2024 Copyright: PE Scores</p>
</footer>

</body>

Expand Down
44 changes: 41 additions & 3 deletions src/main/resources/templates/dense-ball.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,48 @@

<head>
<title>Dense ball</title>
<th:block th:insert="~{/fragments/head}"></th:block>
<!-- <th:block th:insert="~{/fragments/head}"></th:block>-->
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/x-icon" th:href="@{/images/favicon.ico}">
<link rel="stylesheet" th:href="@{/css/fragments.css}">

<link rel="stylesheet" th:href="@{/css/norm.css}">
</head>
<body>

<div>
<th:block th:insert="~{/fragments/header}"></th:block>
<!-- <th:block th:insert="~{/fragments/header}"></th:block>-->
<header xmlns:sec="http://www.w3.org/1999/xhtml">
<a sec:authorize="!isAuthenticated()" th:href="@{/}"><img src="/images/pe%20scores-final.png" alt="pe scores logo"/></a>
<a sec:authorize="isAuthenticated()" th:href="@{/classes}"><img src="/images/pe%20scores-final.png"
alt="pe scores logo"/></a>

<nav class="navbar">
<ul class="navbar-buttons" sec:authorize="!isAuthenticated()">
<a th:href="@{/users/login}">Log in</a>
<a th:href="@{/users/register}">Sign up</a>
</ul>

<ul class="navbar-buttons" sec:authorize="isAuthenticated()">
<a th:href="@{/denseBall}">Dense ball</a>
<a th:href="@{/jump}">Jump</a>
<a th:href="@{/tTest}">T-test</a>
<a th:href="@{/thirty}">30 meters</a>
<a th:href="@{/twoHundred}">200 meters</a>
<a th:href="@{/classes}">Classes</a>
<a th:href="@{/tasks}">Tasks</a>
<a th:href="@{/classes/add}">Add class</a>
<a th:href="@{/students/add}">Add student</a>
<a>
<form class="logout" th:method="post" th:action="@{/users/logout}">
<input class="dropdown-item btn-link nav-link" type="submit" value="Logout">
</form>
</a>
</ul>
</nav>
</header>
</div>

<section class="main-section-norm">
Expand Down Expand Up @@ -826,8 +861,11 @@

</section>

<footer>
<p>&copy; 2024 Copyright: PE Scores</p>
</footer>

<th:block th:insert="~{/fragments/footer}"></th:block>
<!--<th:block th:insert="~{/fragments/footer}"></th:block>-->

</body>

Expand Down
9 changes: 8 additions & 1 deletion src/main/resources/templates/error.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@

<head>
<title>Error</title>
<th:block th:insert="~{/fragments/head}"></th:block>
<!-- <th:block th:insert="~{/fragments/head}"></th:block>-->

<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/x-icon" th:href="@{/images/favicon.ico}">
<link rel="stylesheet" th:href="@{/css/fragments.css}">

<link rel="stylesheet" th:href="@{/css/error.css}">
</head>
<body>
Expand Down
Loading

0 comments on commit 7d6f04b

Please sign in to comment.