mirror of
https://gitlab.com/etc404/software-engineering-project.git
synced 2026-05-10 20:52:58 +00:00
Login page and logout functionality complete, some file formatting and corrections.
This commit is contained in:
@@ -18,7 +18,7 @@ public class SecurityConfig {
|
||||
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
|
||||
http
|
||||
.authorizeHttpRequests(auth -> auth
|
||||
.requestMatchers("/login", "/css/**").permitAll()
|
||||
.requestMatchers("/login", "/register", "/css/**").permitAll()
|
||||
.anyRequest().authenticated()
|
||||
)
|
||||
.formLogin(form -> form
|
||||
|
||||
@@ -17,4 +17,9 @@ public class SiteController {
|
||||
public String viewLoginPage(Model model) {
|
||||
return "login";
|
||||
}
|
||||
|
||||
@GetMapping("/register")
|
||||
public String viewRegisterPage(Model model) {
|
||||
return "create-account";
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Thyme Crunch Home</title>
|
||||
<link rel="stylesheet" th:href="@{css/home.css}">
|
||||
<meta charset="UTF-8">
|
||||
<title>Thyme Crunch Home</title>
|
||||
<link rel="stylesheet" th:href="@{css/home.css}">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -11,54 +11,50 @@
|
||||
<img src="images/header_left.png" alt="Violin f-hole shape to the left of header." class="swirl">
|
||||
<h1 class="site-name">Thyme Crunch</h1>
|
||||
<img src="images/header_right.png" alt="Violin f-hole shape to the right of header." class="swirl">
|
||||
</header>
|
||||
</header>
|
||||
|
||||
<div class="container">
|
||||
<div class="container">
|
||||
<!--Navigation Bar -->
|
||||
<nav class="sidebar-left">
|
||||
<ul>
|
||||
<li><a href="#">Home</a></li>
|
||||
<li><a href="#">Explore</a></li>
|
||||
<li><a href="#">Profile</a></li>
|
||||
<li><a href="#">Saved</a></li>
|
||||
<li><a href="#"> <img src="images/logout_icon.png" alt="Log Out Icon" class="nav_icon"></a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="#">Home</a></li>
|
||||
<li><a href="#">Explore</a></li>
|
||||
<li><a href="#">Profile</a></li>
|
||||
<li><a href="#">Saved</a></li>
|
||||
<li>
|
||||
<form th:action="@{/logout}" method="post">
|
||||
<input type="image" th:src="@{images/logout_icon.png}" alt="Logout button" class="nav_icon"/>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
</nav>
|
||||
|
||||
<a href="#" target="_blank" class="create_icon">
|
||||
<img src="images/create_icon.png" alt="Description of the icon">
|
||||
</a>
|
||||
|
||||
<a href="#" target="_blank" class="create_icon">
|
||||
<img src="images/create_icon.png" alt="Description of the icon">
|
||||
</a>
|
||||
|
||||
<!-- Main Content -->
|
||||
<main class="main-content">
|
||||
<div class="recipe-card">
|
||||
|
||||
<div class="card" th:each="recipe : ${recipes}">
|
||||
<div class="card-text">
|
||||
<h2 th:text="${recipe.title}"></h2>
|
||||
<p th:text="${recipe.description}"></p>
|
||||
</div>
|
||||
<div class="card-right">
|
||||
<img th:src="@{${recipe.imageUrl}}" alt="${recipe.imageAltText}">
|
||||
<p th:text="${recipe.cost}"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="recipe-card">
|
||||
|
||||
<div class="card" th:each="recipe : ${recipes}">
|
||||
<div class="card-text">
|
||||
<h2 th:text="${recipe.title}"></h2>
|
||||
<p th:text="${recipe.description}"></p>
|
||||
</div>
|
||||
<div class="card-right">
|
||||
<img th:src="@{${recipe.imageUrl}}" alt="${recipe.imageAltText}">
|
||||
<p th:text="${recipe.cost}"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<div class="container">
|
||||
<!--New Bar -->
|
||||
<nav class="sidebar-right">
|
||||
<h1> NEW </h1>
|
||||
<h1> NEW </h1>
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</form>
|
||||
</div>
|
||||
<div class="sign_up">
|
||||
<h3> OR <a href="create-account.html"><b>SIGN UP</b></a> FOR AN ACCOUNT </h3>
|
||||
<h3> OR <a th:href="@{/register}"><b>SIGN UP</b></a> FOR AN ACCOUNT </h3>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user