mirror of
https://gitlab.com/etc404/software-engineering-project.git
synced 2026-05-10 20:52:58 +00:00
7d59e99f7d
- /src/main/resources/templates/explore.html - /src/main/resources/templates/my-profile.html - /src/main/resources/templates/public-profile.html
83 lines
3.1 KiB
HTML
83 lines
3.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en" xmlns:th="http://www.thymeleaf.org">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="_csrf_header" th:content="${_csrf.headerName}"/>
|
|
<meta name="_csrf" th:content="${_csrf.token}"/>
|
|
<title>Public Profile - Thyme Crunch</title>
|
|
<!--<link rel="stylesheet" th:href="@{css/public-profile.css}"> -->
|
|
<link href="https://fonts.googleapis.com/css2?family=Delius+Swash+Caps&family=Mali:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;1,200;1,300;1,400;1,500;1,600;1,700" rel="stylesheet">
|
|
</head>
|
|
<body>
|
|
|
|
<header class="top-header">
|
|
<img th: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 th:src="@{images/header_right.png}" alt="Violin f-hole shape to the right of header." class="swirl">
|
|
</header>
|
|
|
|
<div class="form-wrap">
|
|
<div class="form-split">
|
|
|
|
<h1 th:text="${profile.displayName != null and !#strings.isEmpty(profile.displayName) ? profile.displayName : profile.username}">
|
|
Display Name
|
|
</h1>
|
|
|
|
<nav>
|
|
<a th:href="@{/}">Home</a> |
|
|
<a th:href="@{/explore}">Explore</a> |
|
|
<a th:href="@{/my-profile}">Profile</a>
|
|
</nav>
|
|
|
|
<br>
|
|
|
|
<p>
|
|
<strong>Username:</strong>
|
|
<span th:text="${profile.username}">username</span>
|
|
</p>
|
|
|
|
<h2>Bio</h2>
|
|
<p th:if="${profile.bio != null and !#strings.isEmpty(profile.bio)}" th:text="${profile.bio}">
|
|
Bio text
|
|
</p>
|
|
<p th:unless="${profile.bio != null and !#strings.isEmpty(profile.bio)}">
|
|
This user has not added a bio yet.
|
|
</p>
|
|
|
|
<h2>Recipes</h2>
|
|
|
|
<div th:if="${#lists.isEmpty(profile.recipes)}">
|
|
<p>This user has not created any recipes yet.</p>
|
|
</div>
|
|
|
|
<div th:unless="${#lists.isEmpty(profile.recipes)}">
|
|
<div th:each="recipe : ${profile.recipes}" class="recipe-block" style="margin-bottom: 20px;">
|
|
<h3>
|
|
<a th:href="@{/recipes/{id}(id=${recipe.id})}" th:text="${recipe.title}">Recipe Title</a>
|
|
</h3>
|
|
|
|
<p>
|
|
<strong>Author:</strong>
|
|
<a th:href="@{/users/{id}(id=${recipe.userDto.id})}"
|
|
th:text="${recipe.userDto.displayName != null and !#strings.isEmpty(recipe.userDto.displayName) ? recipe.userDto.displayName : recipe.userDto.username}">
|
|
Author Name
|
|
</a>
|
|
</p>
|
|
|
|
<p th:text="${recipe.description}">Recipe description</p>
|
|
|
|
<div th:if="${recipe.images != null and !#lists.isEmpty(recipe.images)}">
|
|
<img th:src="${recipe.images[0].imageUrl}" alt="Recipe Image" style="max-width: 200px;">
|
|
</div>
|
|
|
|
<p>
|
|
<a th:href="@{/recipes/{id}(id=${recipe.id})}">View Recipe</a>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html> |