W7 done
This commit is contained in:
parent
a101924587
commit
f662d9933f
13 changed files with 2691 additions and 0 deletions
31
w6/templates/categoryPage.html
Normal file
31
w6/templates/categoryPage.html
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Goods page</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Smooch+Sans:wght@300;400;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="/css/styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<main id="mainPageMain">
|
||||
<section class="goodsSection">
|
||||
<a href="/">>>> Go home</a>
|
||||
<hr>
|
||||
<h2>Goods in category "{{category}}":</h2>
|
||||
<div class="goods">
|
||||
{{#goods}}
|
||||
<div class="goodsCard">
|
||||
<h3>{{title}} # {{id}}</h3>
|
||||
<p class="description">{{description}}</p>
|
||||
<a class="goodsLink" href="/goods/{{guid}}">More info...</a>
|
||||
</div>
|
||||
{{/goods}}
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
35
w6/templates/goodsPage.html
Normal file
35
w6/templates/goodsPage.html
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>"{{good.title}}" good page</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Smooch+Sans:wght@300;400;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="/css/styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<main id="mainPageMain">
|
||||
<section class="goodsSection">
|
||||
<a href="/category/{{good.category}}">>>> Go back to category "{{good.category}}"</a>
|
||||
<hr>
|
||||
<h2>Vieweing "{{good.title}}":</h2>
|
||||
<p>In system since: {{good.registered}}</p>
|
||||
|
||||
<hr>
|
||||
|
||||
Seller profile: <a href="/user/{{user.guid}}">{{user.fullName}}</a>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Description:</h3>
|
||||
<p>{{good.description}}</p>
|
||||
<br>
|
||||
<h3>Price:</h3>
|
||||
<p>{{good.price}} CR per unit</p>
|
||||
</section>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
58
w6/templates/mainPage.html
Normal file
58
w6/templates/mainPage.html
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Main page</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Smooch+Sans:wght@300;400;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="/css/styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<main id="mainPageMain">
|
||||
<section class="jumbotronSection">
|
||||
<h1>Welcome to our store!</h1>
|
||||
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Neque labore perspiciatis ad reprehenderit magni, fugiat eligendi! Porro dignissimos rerum accusantium!</p>
|
||||
</section>
|
||||
<section class="searchSection">
|
||||
<form action="/search" method="post">
|
||||
<input type="text" name="searchTerm" placeholder="Search term">
|
||||
|
||||
<h4>Search for:</h4>
|
||||
<div>
|
||||
<label for="both">Users and goods</label>
|
||||
<input type="radio" id="both" name="searchType" value="both" checked>
|
||||
|
||||
<br>
|
||||
|
||||
<label for="userOnly">Users only</label>
|
||||
<input type="radio" id="userOnly" name="searchType" value="usersOnly">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="goodsOnly">Goods only</label>
|
||||
<input type="radio" id="goodsOnly" name="searchType" value="goodsOnly">
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<button type="submit">Search!</button>
|
||||
</form>
|
||||
</section>
|
||||
<section class="categoriesSection">
|
||||
<h3>You can choose from a wide range of categories:</h3>
|
||||
<div class="categories">
|
||||
{{#categories}}
|
||||
<a class="categoryCard" href="/category/{{.}}">
|
||||
<img src="https://api.lorem.space/image?w=150&h=180&{{.}}" alt="{{.}}">
|
||||
<p>
|
||||
{{.}}
|
||||
</p>
|
||||
</a>
|
||||
{{/categories}}
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
62
w6/templates/searchPage.html
Normal file
62
w6/templates/searchPage.html
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Search for "{{term}}"</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Smooch+Sans:wght@300;400;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="/css/styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<main id="mainPageMain">
|
||||
<section class="searchSection">
|
||||
<h4>Search term: "{{term}}"</h4>
|
||||
<h5>Searching for {{#showUsers}}users{{#showGoods}} and {{/showGoods}}{{/showUsers}}{{#showGoods}}goods{{/showGoods}}</h5>
|
||||
<a href="/">>>> Go home</a>
|
||||
</section>
|
||||
<section class="searchDataSection">
|
||||
{{#showUsers}}
|
||||
<h3>Found users:</h3>
|
||||
<div class="categories">
|
||||
{{#users}}
|
||||
<a class="categoryCard" href="/user/{{guid}}">
|
||||
<img src="{{photo}}&{{guid}}" alt="{{fullName}} photo">
|
||||
<p>
|
||||
{{fullName}}
|
||||
</p>
|
||||
</a>
|
||||
{{/users}}
|
||||
{{^users}}
|
||||
No users found for this search!
|
||||
{{/users}}
|
||||
</div>
|
||||
|
||||
{{#showGoods}}
|
||||
<br>
|
||||
<hr>
|
||||
<br>
|
||||
{{/showGoods}}
|
||||
{{/showUsers}}
|
||||
|
||||
{{#showGoods}}
|
||||
<h3>Found goods:</h3>
|
||||
<div class="goodsSearches">
|
||||
{{#goods}}
|
||||
<div class="goodsCard">
|
||||
<h3>{{title}} # {{id}}</h3>
|
||||
<p class="description">Category: {{category}}</p>
|
||||
<a class="goodsLink" href="/goods/{{guid}}">More info...</a>
|
||||
</div>
|
||||
{{/goods}}
|
||||
{{^goods}}
|
||||
No goods found for this search!
|
||||
{{/goods}}
|
||||
</div>
|
||||
{{/showGoods}}
|
||||
</section>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
42
w6/templates/userPage.html
Normal file
42
w6/templates/userPage.html
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{user.fulName}}'s page</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Smooch+Sans:wght@300;400;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="/css/styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<main id="mainPageMain">
|
||||
<section class="goodsSection">
|
||||
<a href="/">>>> Go home</a>
|
||||
<br>
|
||||
<a href="javascript:history.back()"><<< Go back</a>
|
||||
<hr>
|
||||
<div class="userCard">
|
||||
<img src="{{user.photo}}" alt="{{user.fullName}} avatar" class="avatar">
|
||||
<h2>User "{{user.fullName}}"</h2>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<p>User has {{goodsCount}} goods in our store.</p>
|
||||
<p>Their goods:</p>
|
||||
<div class="goods">
|
||||
{{#goods}}
|
||||
<div class="goodsCard">
|
||||
<h3>{{title}} # {{id}}</h3>
|
||||
<h4>Category: {{category}}</h4>
|
||||
<p class="description">{{description}}</p>
|
||||
<a class="goodsLink" href="/goods/{{guid}}">More info...</a>
|
||||
</div>
|
||||
{{/goods}}
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue