Skip to content

Commit a0d233e

Browse files
committed
created hbs views, layouts and partials
relates to issues #19 #15 #12
1 parent a04c7e7 commit a0d233e

30 files changed

+196
-2
lines changed

public/assets/arrow-grey.png

1.82 KB
Loading

public/assets/back-arrow.png

6.1 KB
Loading

public/assets/clock.png

6.88 KB
Loading

public/assets/droppin-grey.png

4.17 KB
Loading

public/assets/home.png

2.88 KB
Loading

public/assets/list.png

2.15 KB
Loading

public/assets/search-arrow.png

2.95 KB
Loading

src/views/add.hbs

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
add.hbs
2+
3+
<main>
4+
<form>
5+
Name of business:<br>
6+
<input type="text" name="Name of business"><br>
7+
Street:<br>
8+
<input type="text" name="Street">
9+
Postcode:<br>
10+
<input type="text" name="Postcode">
11+
<input type="submit" name="submit">Submit
12+
</form>

src/views/addMoreDetails.hbs

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
2+
<div class="placeDetails">
3+
<p> {{ placeName }} </p>
4+
<p> {{ placeStreet }} </p>
5+
<p> {{ placePostcode }} </p>
6+
</div>
7+
8+
<form class="moreDetails" method="GET" action="/add/details?">
9+
10+
Category:<br>
11+
<input type="checkbox" name="clothes" value="clothes">
12+
<label for="clothes">Clothes</label>
13+
<input type="checkbox" name="barsandrestaurants" value="barsandrestaurants">
14+
<label for="barsandrestaurants">Bars & Restaurants</label>
15+
<input type="checkbox" name="cafés" value="cafés">
16+
<label for="cafés">Cafés</label>
17+
<input type="checkbox" name="Groceries" value="Groceries">
18+
<label for="Groceries">Groceries</label>
19+
<input type="checkbox" name="Entertainment" value="Entertainment">
20+
<label for="Entertainment">Entertainment</label>
21+
<input type="checkbox" name="Other" value="Other">
22+
<label for="Other">Other</label>
23+
24+
Description:<br>
25+
<input type="text" name="description">
26+
27+
Values:<br>
28+
<input type="checkbox" name="Organic" value="Organic">
29+
<label for="Organic">Organic</label>
30+
<input type="checkbox" name="Eco" value="Eco">
31+
<label for="Eco">Eco</label>
32+
<input type="checkbox" name="Livingwage" value="Livingwage">
33+
<label for="Livingwage">Living Wage</label>
34+
<input type="checkbox" name="Veg*n" value="Veg*n">
35+
<label for="Veg*n">Veg*n</label>
36+
<input type="checkbox" name="Fairtrade" value="Fairtrade">
37+
<label for="Fairtrade">Fairtrade</label>
38+
<input type="checkbox" name="Non-profit" value="Non-profit">
39+
<label for="Non-profit">Non-profit</label>
40+
<input type="checkbox" name="Socialenterprise" value="Socialenterprise">
41+
<label for="Socialenterprise">Social Enterprise</label>
42+
<input type="checkbox" name="Bulkbins" value="Bulkbins">
43+
<label for="Bulkbins">Bulk bins available</label>
44+
<input type="checkbox" name="Tacklingwaste" value="Tacklingwaste">
45+
<label for="Tacklingwaste">Tackling waste</label>
46+
47+
Comment:<br>
48+
<input type="text" name="description">
49+
50+
<input type="submit" name="submit">Submit
51+
</form>

src/views/businessExists.hbs

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<main>
2+
<div class="messageBox">
3+
<h2>This business already exists! Go home to search for it, or go back to add a different business.</h2>
4+
</div>
5+
</main>

src/views/error.hbs

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<main>
2+
<div class="messageBcx">
3+
<h2>Sorry, there's been an error! Please go home to try again.</h2>
4+
</div>
5+
</main>

src/views/home.hbs

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
<h1>I want to...</h1>
12

3+
<button class="homePageButton">
4+
<a href="/add">Add a business</a>
5+
</div>
26

3-
<p> Hello </p>
7+
<div class="homePageButton">
8+
<a href="/search">See businesses</a>
9+
</div>

src/views/layouts/list.hbs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{{> head }}
2+
{{ body }}
3+
{{> navHomeMap }}
4+
{{> footer }}

src/views/layouts/main.hbs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
1+
{{> head }}
22
{{{ body }}}
3+
{{> footer }}

src/views/layouts/map.hbs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{{> head }}
2+
{{ body }}
3+
{{> navHomeList }}
4+
{{> footer }}

src/views/layouts/navHome.hbs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{{> head }}
2+
{{{ body }}}
3+
{{> navHome}}
4+
{{> footer }}

src/views/layouts/navHomeBack.hbs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{{> head }}
2+
{{{ body }}}
3+
{{> navHomeBack}}
4+
{{> footer }}

src/views/layouts/place.hbs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{{> head }}
2+
{{{ body }}}
3+
{{> navHomeBack}}
4+
{{> footer }}

src/views/listView.hbs

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<main class="listResults">
2+
{{#each resultsArr}}
3+
<section class="results">
4+
<img class="resultImg" src={{ resImg }}></img>
5+
<p>{{ resName }}</p>
6+
<p>{{ resDistance }}</p>
7+
<p>{{ resStatus }}</p>
8+
<i class="fa fa-arrow-circle-up" aria-hidden="true">{{ resVotes }}</i>
9+
</section>
10+
{{/each}}
11+
</main>

src/views/map.hbs

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<div class="map">
2+
</div>

src/views/partials/footer.hbs

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
</body>
2+
<footer>
3+
<script type="text/javascript" src='/logic.js'></script>
4+
</footer>
5+
</html>

src/views/partials/head.hbs

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
8+
<link rel="stylesheet" href="/style.css">
9+
<script src="https://use.fontawesome.com/beb3acbeeb.js"></script>
10+
<title>upShop</title>
11+
<link href="https://fonts.googleapis.com/css?family=Assistant" rel="stylesheet">
12+
</head>

src/views/partials/nav.hbs

Whitespace-only changes.

src/views/partials/navHome.hbs

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
<nav class="navbar">
3+
<div class="navHome">
4+
<a href="/"><img class="home_img" src="../../public/assets/home.png">
5+
</div>
6+
</nav>
7+
8+

src/views/partials/navHomeBack.hbs

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<nav class="navbar">
2+
<div class="navHomeBack">
3+
<a href="/"><img class="home_img" src="../../public/assets/home.png">
4+
<a href=previousPage><img class="back_img" src="../../public/assets/arrow-grey.png">
5+
</div>
6+
</nav>

src/views/partials/navHomeList.hbs

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<nav class="navbar">
2+
<div class="navHomeBack">
3+
<a href="/"><img class="home_img" src="../../public/assets/home.png">
4+
<a href=listPage><img class="list_img" src="../../public/assets/list.png">
5+
</div>
6+
</nav>

src/views/partials/navHomeMap.hbs

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<nav class="navbar">
2+
<div class="navHomeBack">
3+
<a href="/"><img class="home_img" src="../../public/assets/home.png">
4+
<a href=mapPage><img class="map_img" src="../../public/assets/droppin-grey.png">
5+
</div>
6+
</nav>

src/views/placeDetails.hbs

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
placeDetails.hbs
2+
<main>
3+
<h2>{{ resName }}</h2>
4+
<p>{{ resSite }}</p>
5+
<p>{{ resDesc }}</p>
6+
<img src="../../public/assets/droppin-grey.png">{{ resAddress }}
7+
<img src="../public/assets/clock.png">Hours
8+
<div class="times"> {{ resTimes }}</div>
9+
</main>
10+
11+
<section class="values">
12+
<h3>Values</h3>
13+
<ul>
14+
{{#each resValues }}
15+
<li> {{ resValue}} </li>
16+
{{/each }}
17+
18+
</section>

src/views/search.hbs

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<h2>I'm looking for...</h2>
2+
3+
<main class="categoryDisplay">
4+
<div class="categoryBtn">Clothes</div>
5+
<div class="categoryBtn">Bars and Restaurants</div>
6+
<div class="categoryBtn">Cafés</div>
7+
<div class="categoryBtn">Groceries</div>
8+
<div class="categoryBtn">Entertainment</div>
9+
<div class="categoryBtn">Other</div>
10+
</main>
11+
12+
<h2>In...</h2>
13+
<input type="text" placeholder="Enter postcode">
14+
<img class="location_img" src="../../public/assets/search-arrow.png">
15+
<button type="submit" name="submit">Go!</button>

src/views/success.hbs

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<main>
2+
<div class="messageBox">
3+
<h2>This business has been added. Thanks for contributing to upShop!</h2>
4+
</div>
5+
</main>

0 commit comments

Comments
 (0)