Skip to content

Commit

Permalink
wrap html inside main tags
Browse files Browse the repository at this point in the history
Relates 28
  • Loading branch information
alaa-yasin committed Aug 28, 2019
1 parent ce3ef36 commit cafb583
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 39 deletions.
10 changes: 6 additions & 4 deletions src/views/404.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<section class="error">
<p class="error__desc">404. <span class="error__msg">Page not found</span></p>
<img class="error__image" src="../../public/images/error.png" alt="error">
</section>
<main>
<section class="error">
<p class="error__desc">404. <span class="error__msg">Page not found</span></p>
<img class="error__image" src="../../public/images/error.png" alt="error">
</section>
</main>
10 changes: 6 additions & 4 deletions src/views/500.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<section class="error">
<p class="error__desc">500. <span class="error__msg">Server Error</span></p>
<img class="error__image" src="../../public/images/error.png" alt="error">
</section>
<main>
<section class="error">
<p class="error__desc">500. <span class="error__msg">Server Error</span></p>
<img class="error__image" src="../../public/images/error.png" alt="error">
</section>
</main>
24 changes: 13 additions & 11 deletions src/views/home.hbs
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{{> header}}
<section class="post-section">
{{#each postsArray}}
<div class="post-content">
<h1 class="username">{{this.username}}</h1>
<h2 class='post-category'>{{this.category}}</h2>
<p class="post-text">{{this.content}}</p>
<div class="img-container">
<img class="post-img" src={{this.img_url}} alt="post image">
<main>
<section class="post-section">
{{#each postsArray}}
<div class="post-content">
<h1 class="username">{{this.username}}</h1>
<h2 class='post-category'>{{this.category}}</h2>
<p class="post-text">{{this.content}}</p>
<div class="img-container">
<img class="post-img" src={{this.img_url}} alt="post image">
</div>
</div>
</div>
{{/each}}
</section>
{{/each}}
</section>
</main>
42 changes: 22 additions & 20 deletions src/views/profile.hbs
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
{{> header}}
<section class="form-section">
<form action="/addPost" method="post">
<textarea name="post-text" id="text" class="post-text" cols="30" rows="10" placeholder="Write your post here"></textarea>
<label for="post-category">Category</label>
<input name="post-category" type="text">
<input type="text" name="post-img" id="post-image" placeholder="Add image URL here">
<button class="add-post-btn" type="submit">Add Post</button>
</form>
</section>
<main>
<section class="form-section">
<form action="/addPost" method="post">
<textarea name="post-text" id="text" class="post-text" cols="30" rows="10" placeholder="Write your post here"></textarea>
<label for="post-category">Category</label>
<input name="post-category" type="text">
<input type="text" name="post-img" id="post-image" placeholder="Add image URL here">
<button class="add-post-btn" type="submit">Add Post</button>
</form>
</section>

<section class="post-section">
{{#each postsArray}}
<div class="post-content">
<h1 class="username">{{this.username}}</h1>
<h2 class='post-category'>{{this.category}}</h2>
<p class="post-text">{{this.content}}</p>
<div class="img-container">
<img class="post-img" src={{this.img_url}} alt="post image">
<section class="post-section">
{{#each postsArray}}
<div class="post-content">
<h1 class="username">{{this.username}}</h1>
<h2 class='post-category'>{{this.category}}</h2>
<p class="post-text">{{this.content}}</p>
<div class="img-container">
<img class="post-img" src={{this.img_url}} alt="post image">
</div>
</div>
</div>
{{/each}}
</section>
{{/each}}
</section>
</main>

0 comments on commit cafb583

Please sign in to comment.