mirror of
https://gitlab.com/etc404/software-engineering-project.git
synced 2026-05-10 20:52:58 +00:00
create account and recipe working. Explore kind of works
This commit is contained in:
@@ -191,15 +191,18 @@ body, html {
|
||||
.main-content {
|
||||
width: 100%;
|
||||
flex-grow: 1;
|
||||
display: flex;
|
||||
/*display: flex; this line was breaking the searched results. They returned recipes would not load at the top of the page*/
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-start;
|
||||
overflow: scroll;
|
||||
overflow: auto;
|
||||
scrollbar-color: var(--dusty-red) var(--pale-yellow);
|
||||
height: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* safari and old browsers*/
|
||||
::-webkit-scrollbar-track {
|
||||
background: var(--pale-yellow);
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta charset="UTF-8">
|
||||
<meta name="_csrf_header" th:content="${_csrf.headerName}"/>
|
||||
<meta name="_csrf" th:content="${_csrf.token}"/>
|
||||
<title>Create Thyme Crunch Account</title>
|
||||
<link rel="stylesheet" th:href="@{css/create-account.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">
|
||||
@@ -85,12 +88,17 @@
|
||||
hashedpassword: password,
|
||||
role: "USER"
|
||||
};
|
||||
|
||||
const csrfToken = document.querySelector('meta[name="_csrf"]').getAttribute('content');
|
||||
const csrfHeader = document.querySelector('meta[name="_csrf_header"]').getAttribute('content');
|
||||
|
||||
console.log("JSON to submit:", JSON.stringify(userData, null, 2));
|
||||
|
||||
fetch("http://localhost:8080/api/users", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
[csrfHeader]: csrfToken,
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
});
|
||||
|
||||
|
||||
@@ -40,10 +40,10 @@
|
||||
<!-- Main Content -->
|
||||
<main class="main-content">
|
||||
<div class="search-bar">
|
||||
<form action="/search" method="get">
|
||||
<form action="/explore" method="get">
|
||||
<label for="site-search">Search:</label>
|
||||
<div class="search-btn">
|
||||
<input type="search" id="site-search" name="q" placeholder="Search for recipes...">
|
||||
<input type="search" id="site-search" name="q" th:value="${q}" placeholder="Search for recipes...">
|
||||
<button type="submit"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</form>
|
||||
@@ -68,8 +68,29 @@
|
||||
<div class="body-right">
|
||||
<div class="sidebar-right">
|
||||
<h1> FILTER </h1>
|
||||
<form id="filter-form">
|
||||
<h3>Price</h3>
|
||||
|
||||
<label>
|
||||
<input type="checkbox" name="price" value="1"> $
|
||||
</label><br>
|
||||
|
||||
<label>
|
||||
<input type="checkbox" name="price" value="2"> $$
|
||||
</label><br>
|
||||
|
||||
<label>
|
||||
<input type="checkbox" name="price" value="3"> $$$
|
||||
</label><br>
|
||||
|
||||
<label>
|
||||
<input type="checkbox" name="price" value="4"> $$$$
|
||||
</label>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user