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 {
|
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
|
||||||
http
|
http
|
||||||
.authorizeHttpRequests(auth -> auth
|
.authorizeHttpRequests(auth -> auth
|
||||||
.requestMatchers("/login", "/css/**").permitAll()
|
.requestMatchers("/login", "/register", "/css/**").permitAll()
|
||||||
.anyRequest().authenticated()
|
.anyRequest().authenticated()
|
||||||
)
|
)
|
||||||
.formLogin(form -> form
|
.formLogin(form -> form
|
||||||
|
|||||||
@@ -17,4 +17,9 @@ public class SiteController {
|
|||||||
public String viewLoginPage(Model model) {
|
public String viewLoginPage(Model model) {
|
||||||
return "login";
|
return "login";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/register")
|
||||||
|
public String viewRegisterPage(Model model) {
|
||||||
|
return "create-account";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -11,9 +11,9 @@
|
|||||||
<img src="images/header_left.png" alt="Violin f-hole shape to the left of header." class="swirl">
|
<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>
|
<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">
|
<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 -->
|
<!--Navigation Bar -->
|
||||||
<nav class="sidebar-left">
|
<nav class="sidebar-left">
|
||||||
<ul>
|
<ul>
|
||||||
@@ -21,17 +21,18 @@
|
|||||||
<li><a href="#">Explore</a></li>
|
<li><a href="#">Explore</a></li>
|
||||||
<li><a href="#">Profile</a></li>
|
<li><a href="#">Profile</a></li>
|
||||||
<li><a href="#">Saved</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>
|
<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>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
</nav>
|
<a href="#" target="_blank" class="create_icon">
|
||||||
|
|
||||||
<a href="#" target="_blank" class="create_icon">
|
|
||||||
<img src="images/create_icon.png" alt="Description of the icon">
|
<img src="images/create_icon.png" alt="Description of the icon">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
<!-- Main Content -->
|
<!-- Main Content -->
|
||||||
<main class="main-content">
|
<main class="main-content">
|
||||||
@@ -48,17 +49,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
<!--New Bar -->
|
<!--New Bar -->
|
||||||
<nav class="sidebar-right">
|
<nav class="sidebar-right">
|
||||||
<h1> NEW </h1>
|
<h1> NEW </h1>
|
||||||
</nav>
|
</nav>
|
||||||
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="sign_up">
|
<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>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Reference in New Issue
Block a user