Skip to content

Commit 8b76fcb

Browse files
authored
Merge pull request #39 from ankushdharkar/feature/post-page-implement
Post Page implementation Emberify + Redesign
2 parents 57f8e7f + 510c077 commit 8b76fcb

File tree

6 files changed

+103
-316
lines changed

6 files changed

+103
-316
lines changed

addon/components/author-list.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
By
22
{{#each @post.authors as |author index|~}}
33
{{if index ','}}
4-
<LinkTo @route="author" @model={{author.id}} class="blog-post-author">
4+
<LinkTo @route="author" @model={{author.id}}>
55
{{~author.name~}}
66
</LinkTo>
77
{{~/each}}

addon/styles/addon.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
11
@import 'blockquote.css';
2+
3+
/* remove this when we fix https://github.com/ember-learn/ember-styleguide/issues/348 */
4+
hr {
5+
margin-top: var(--spacing-4);
6+
margin-bottom: var(--spacing-4);
7+
}

app/templates/page.hbs

Lines changed: 0 additions & 10 deletions
This file was deleted.

app/templates/post.hbs

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,20 @@
11
{{#let @model.post as |post|}}
22
<article class="post-content {{unless post.image 'no-image'}}">
3-
4-
<header class="post-content-header">
5-
<h1 class="post-content-title">{{post.title}}</h1>
3+
<header>
4+
<h1 class="post-content-title bold">{{post.title}}</h1>
65
</header>
76

8-
{{#if post.image}}
9-
<div class="post-content-image">
10-
<img class="kg-image" src={{post.image}} alt={{post.title}} />
11-
</div>
12-
{{/if}}
7+
<div class="text-muted">
8+
<time>{{moment-format @post.date 'MMM Do, YYYY'}}</time> &ndash;
9+
<AuthorList @post={{post}} />
10+
</div>
1311

14-
<div class="post-content-body">
12+
<div class="mt-2">
1513
{{markdown-to-html post.content tagName=""}}
1614
</div>
1715

18-
<footer class="post-content-footer">
19-
20-
{{!-- There are two options for how we display the byline/author-info.
21-
If the post has more than one author, we load a specific template
22-
from includes/byline-multiple.hbs, otherwise, we just use the
23-
default byline. --}}
24-
25-
</footer>
16+
<hr class="my-6">
2617

2718
<Comments @post={{post}} />
28-
2919
</article>
30-
{{/let}}
20+
{{/let}}

0 commit comments

Comments
 (0)