Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

created hbs views, layouts and partials #32

Merged
merged 2 commits into from
Jan 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added public/assets/arrow-grey.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/back-arrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/clock.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/droppin-grey.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/search-arrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/views/add.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
add.hbs

<main>
<form>
Name of business:<br>
<input type="text" name="Name of business"><br>
Street:<br>
<input type="text" name="Street">
Postcode:<br>
<input type="text" name="Postcode">
<input type="submit" name="submit">Submit
</form>
51 changes: 51 additions & 0 deletions src/views/addMoreDetails.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@

<div class="placeDetails">
<p> {{ placeName }} </p>
<p> {{ placeStreet }} </p>
<p> {{ placePostcode }} </p>
</div>

<form class="moreDetails" method="GET" action="/add/details?">

Category:<br>
<input type="checkbox" name="clothes" value="clothes">
<label for="clothes">Clothes</label>
<input type="checkbox" name="barsandrestaurants" value="barsandrestaurants">
<label for="barsandrestaurants">Bars & Restaurants</label>
<input type="checkbox" name="cafés" value="cafés">
<label for="cafés">Cafés</label>
<input type="checkbox" name="Groceries" value="Groceries">
<label for="Groceries">Groceries</label>
<input type="checkbox" name="Entertainment" value="Entertainment">
<label for="Entertainment">Entertainment</label>
<input type="checkbox" name="Other" value="Other">
<label for="Other">Other</label>

Description:<br>
<input type="text" name="description">

Values:<br>
<input type="checkbox" name="Organic" value="Organic">
<label for="Organic">Organic</label>
<input type="checkbox" name="Eco" value="Eco">
<label for="Eco">Eco</label>
<input type="checkbox" name="Livingwage" value="Livingwage">
<label for="Livingwage">Living Wage</label>
<input type="checkbox" name="Veg*n" value="Veg*n">
<label for="Veg*n">Veg*n</label>
<input type="checkbox" name="Fairtrade" value="Fairtrade">
<label for="Fairtrade">Fairtrade</label>
<input type="checkbox" name="Non-profit" value="Non-profit">
<label for="Non-profit">Non-profit</label>
<input type="checkbox" name="Socialenterprise" value="Socialenterprise">
<label for="Socialenterprise">Social Enterprise</label>
<input type="checkbox" name="Bulkbins" value="Bulkbins">
<label for="Bulkbins">Bulk bins available</label>
<input type="checkbox" name="Tacklingwaste" value="Tacklingwaste">
<label for="Tacklingwaste">Tackling waste</label>

Comment:<br>
<input type="text" name="description">

<input type="submit" name="submit">Submit
</form>
5 changes: 5 additions & 0 deletions src/views/businessExists.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<main>
<div class="messageBox">
<h2>This business already exists! Go home to search for it, or go back to add a different business.</h2>
</div>
</main>
5 changes: 5 additions & 0 deletions src/views/error.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<main>
<div class="messageBox">
<h2>Sorry, there's been an error! Please go home to try again.</h2>
</div>
</main>
8 changes: 7 additions & 1 deletion src/views/home.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<h1>I want to...</h1>

<button class="homePageButton">
<a href="/add">Add a business</a>
</div>

<p> Hello </p>
<div class="homePageButton">
<a href="/search">See businesses</a>
</div>
4 changes: 4 additions & 0 deletions src/views/layouts/list.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{> head }}
{{ body }}
{{> navHomeMap }}
{{> footer }}
3 changes: 2 additions & 1 deletion src/views/layouts/main.hbs
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@

{{> head }}
{{{ body }}}
{{> footer }}
4 changes: 4 additions & 0 deletions src/views/layouts/map.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{> head }}
{{ body }}
{{> navHomeList }}
{{> footer }}
4 changes: 4 additions & 0 deletions src/views/layouts/navHome.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{> head }}
{{{ body }}}
{{> navHome}}
{{> footer }}
4 changes: 4 additions & 0 deletions src/views/layouts/navHomeBack.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{> head }}
{{{ body }}}
{{> navHomeBack}}
{{> footer }}
4 changes: 4 additions & 0 deletions src/views/layouts/place.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{> head }}
{{{ body }}}
{{> navHomeBack}}
{{> footer }}
11 changes: 11 additions & 0 deletions src/views/listView.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<main class="listResults">
{{#each resultsArr}}
<section class="results">
<img class="resultImg" src={{ resImg }}></img>
<p>{{ resName }}</p>
<p>{{ resDistance }}</p>
<p>{{ resStatus }}</p>
<i class="fa fa-arrow-circle-up" aria-hidden="true">{{ resVotes }}</i>
</section>
{{/each}}
</main>
2 changes: 2 additions & 0 deletions src/views/map.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<div class="map">
</div>
5 changes: 5 additions & 0 deletions src/views/partials/footer.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
</body>
<footer>
<script type="text/javascript" src='/logic.js'></script>
</footer>
</html>
12 changes: 12 additions & 0 deletions src/views/partials/head.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="/style.css">
<script src="https://use.fontawesome.com/beb3acbeeb.js"></script>
<title>upShop</title>
<link href="https://fonts.googleapis.com/css?family=Assistant" rel="stylesheet">
</head>
Empty file removed src/views/partials/nav.hbs
Empty file.
8 changes: 8 additions & 0 deletions src/views/partials/navHome.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

<nav class="navbar">
<div class="navHome">
<a href="/"><img class="home_img" src="../../public/assets/home.png">
</div>
</nav>


6 changes: 6 additions & 0 deletions src/views/partials/navHomeBack.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<nav class="navbar">
<div class="navHomeBack">
<a href="/"><img class="home_img" src="../../public/assets/home.png">
<a href=previousPage><img class="back_img" src="../../public/assets/arrow-grey.png">
</div>
</nav>
6 changes: 6 additions & 0 deletions src/views/partials/navHomeList.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<nav class="navbar">
<div class="navHomeBack">
<a href="/"><img class="home_img" src="../../public/assets/home.png">
<a href=listPage><img class="list_img" src="../../public/assets/list.png">
</div>
</nav>
6 changes: 6 additions & 0 deletions src/views/partials/navHomeMap.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<nav class="navbar">
<div class="navHomeBack">
<a href="/"><img class="home_img" src="../../public/assets/home.png">
<a href=mapPage><img class="map_img" src="../../public/assets/droppin-grey.png">
</div>
</nav>
18 changes: 18 additions & 0 deletions src/views/placeDetails.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
placeDetails.hbs
<main>
<h2>{{ resName }}</h2>
<p>{{ resSite }}</p>
<p>{{ resDesc }}</p>
<img src="../../public/assets/droppin-grey.png">{{ resAddress }}
<img src="../public/assets/clock.png">Hours
<div class="times"> {{ resTimes }}</div>
</main>

<section class="values">
<h3>Values</h3>
<ul>
{{#each resValues }}
<li> {{ resValue}} </li>
{{/each }}

</section>
15 changes: 15 additions & 0 deletions src/views/search.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<h2>I'm looking for...</h2>

<main class="categoryDisplay">
<div class="categoryBtn">Clothes</div>
<div class="categoryBtn">Bars and Restaurants</div>
<div class="categoryBtn">Cafés</div>
<div class="categoryBtn">Groceries</div>
<div class="categoryBtn">Entertainment</div>
<div class="categoryBtn">Other</div>
</main>

<h2>In...</h2>
<input type="text" placeholder="Enter postcode">
<img class="location_img" src="../../public/assets/search-arrow.png">
<button type="submit" name="submit">Go!</button>
5 changes: 5 additions & 0 deletions src/views/success.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<main>
<div class="messageBox">
<h2>This business has been added. Thanks for contributing to upShop!</h2>
</div>
</main>