Merge pull request 'gui: Home skeleton' (#7) from 3002833/Backend:main into main
Reviewed-on: Maradona/Backend#7pull/1/head
commit
67b9333c29
|
@ -0,0 +1,14 @@
|
|||
package com.maradona.backend.controllers;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
@Controller
|
||||
public class PageController {
|
||||
|
||||
@GetMapping("/")
|
||||
public String home(Model model) {
|
||||
return "index";
|
||||
}
|
||||
}
|
|
@ -21,3 +21,13 @@ spring:
|
|||
properties:
|
||||
hibernate:
|
||||
dialect: org.hibernate.dialect.H2Dialect
|
||||
|
||||
thymeleaf:
|
||||
prefix: "classpath:/templates/" # Path where Thymeleaf templates are stored
|
||||
suffix: ".html" # File extension for Thymeleaf templates
|
||||
cache: false # Disable caching for development (set to true in production)
|
||||
mode: "HTML5" # Template mode; Thymeleaf parses the templates as HTML5
|
||||
encoding: "UTF-8" # Character encoding for the templates
|
||||
servlet:
|
||||
content-type: "text/html" # Content type for the Thymeleaf-rendered HTML responses
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
<footer>
|
||||
<p>© 2024 My Website</p>
|
||||
</footer>
|
|
@ -0,0 +1,28 @@
|
|||
<header th:fragment="header(activePage)">
|
||||
<h1>My Skill Management System</h1>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
<a
|
||||
th:href="@{/}"
|
||||
th:classappend="${activePage == 'home' ? 'active' : ''}"
|
||||
>Home</a
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
th:href="@{/about}"
|
||||
th:classappend="${activePage == 'about' ? 'active' : ''}"
|
||||
>About</a
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
th:href="@{/contact}"
|
||||
th:classappend="${activePage == 'contact' ? 'active' : ''}"
|
||||
>Contact</a
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<title>My Website</title>
|
||||
</head>
|
||||
<body>
|
||||
<div th:replace="~{_header :: header(activePage=${home})}"></div>
|
||||
|
||||
<div th:replace="~{_footer :: footer}"></div>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue