Skip to content

Commit bd83f4b

Browse files
committed
PR corrections
1 parent 90e0287 commit bd83f4b

File tree

4 files changed

+68
-64
lines changed

4 files changed

+68
-64
lines changed

addon/components/es-blog-heading.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99

1010
export default Component.extend({
1111
layout,
12-
classNames: ['post-header'],
12+
classNames: ['es-blog-heading'],
1313

1414
author: null,
1515
postDate: null,

addon/styles/_es-blog-heading.scss

Lines changed: 54 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,62 @@
1-
h1.post-title {
2-
color: $secondary;
3-
font-size: 2.25em;
4-
margin-bottom: 0.01em;
5-
margin-top: 0.7em;
6-
}
1+
.es-blog-heading {
2+
.post-title {
3+
&.page-view {
4+
color: $secondary;
5+
font-size: 2.25em;
6+
margin-bottom: 0.01em;
7+
margin-top: 0.7em;
8+
}
79

8-
h2.post-title {
9-
color: $orange-darkest;
10-
font-size: 1.75em;
11-
font-weight: bold;
12-
letter-spacing: none;
13-
line-height: 1;
14-
margin-bottom: 0.19em;
15-
margin-top: 0.2em;
16-
a {
17-
color: $orange-darker;
18-
text-decoration: none;
19-
&:hover {
20-
text-decoration: underline;
10+
&.list-view {
11+
color: $orange-darkest;
12+
font-size: 1.75em;
13+
font-weight: bold;
14+
letter-spacing: none;
15+
line-height: 1;
16+
margin-bottom: 0.19em;
17+
margin-top: 0.2em;
18+
a {
19+
color: $orange-darker;
20+
text-decoration: none;
21+
&:hover {
22+
text-decoration: underline;
23+
}
24+
}
2125
}
2226
}
23-
}
2427

25-
.post-date {
26-
color: $gray;
27-
display: block;
28-
font-size: 0.8em;
29-
text-transform: uppercase;
30-
padding: 0.2em 0.25em 0 0;
31-
@media screen and (min-width: 768px) {
32-
display: inline-block;
33-
padding: 0 0.25em 0 0;
28+
.post-date {
29+
color: $gray;
30+
display: block;
31+
font-size: 0.8em;
32+
text-transform: uppercase;
33+
padding: 0.2em 0.25em 0 0;
34+
@media screen and (min-width: 768px) {
35+
display: inline-block;
36+
padding: 0 0.25em 0 0;
37+
}
3438
}
35-
}
3639

37-
.post-author {
38-
color: $blue;
39-
display: inline-block;
40-
font-size: 0.8em;
41-
font-weight: bold;
42-
text-transform: uppercase;
43-
}
40+
.post-author {
41+
color: $blue;
42+
display: inline-block;
43+
font-size: 0.8em;
44+
font-weight: bold;
45+
text-transform: uppercase;
46+
}
4447

45-
.post-tag {
46-
clear: both;
47-
display: block;
48-
font-size: 0.8em;
49-
line-height: 1;
50-
text-transform: uppercase;
51-
margin-top: 0.35em;
52-
&.syndicated {
53-
color: $blue;
54-
}
55-
&.guest {
56-
color: $gray;
57-
}
48+
.post-tag {
49+
clear: both;
50+
display: block;
51+
font-size: 0.8em;
52+
line-height: 1;
53+
text-transform: uppercase;
54+
margin-top: 0.35em;
55+
&.syndicated {
56+
color: $blue;
57+
}
58+
&.guest {
59+
color: $gray;
60+
}
61+
}
5862
}

addon/templates/components/es-blog-heading.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{{#if postUrl}}
2-
<h2 class="post-title">
2+
<h2 class="post-title list-view">
33
<a href={{postUrl}}>{{postTitle}}</a>
44
</h2>
55
{{else}}
6-
<h1 class="post-title">{{postTitle}}</h1>
6+
<h1 class="post-title page-view">{{postTitle}}</h1>
77
{{/if}}
88
<div class="post-date">{{moment-format postDate 'MMM DD, YYYY' 'MM-DD-YYYY'}}</div>
99
<div class="post-author">By {{author}}</div>

tests/integration/components/es-blog-heading-test.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ moduleForComponent('es-blog-heading', 'Integration | Component | es blog heading
4747

4848
test('it renders', function(assert) {
4949
assert.equal(
50-
find('.post-title a'),
50+
find('.post-title.list-view a'),
5151
postUrl,
5252
'displays title as link'
5353
);
5454
assert.equal(
55-
find('h2.post-title').textContent.trim(),
55+
find('.post-title.list-view').textContent.trim(),
5656
postTitle,
5757
'displays title'
5858
);
@@ -68,14 +68,14 @@ test('it renders', function(assert) {
6868
);
6969
assert.notOk(
7070
find('.post-tag'),
71-
'does not tag if not set'
71+
'does not display tag if not set'
7272
);
7373
});
7474

7575
test('displays proper tag', function(assert) {
7676
assert.notOk(
7777
find('.post-tag'),
78-
'does not tag if not set'
78+
'does not display tag if not set'
7979
);
8080

8181
run(() => {
@@ -101,25 +101,25 @@ test('displays proper tag', function(assert) {
101101

102102
test('renders correct title format', function(assert) {
103103
assert.equal(
104-
find('.post-title a'),
104+
find('.post-title.list-view a'),
105105
postUrl,
106106
'displays title as link when url is provided'
107107
);
108108
assert.ok(
109-
find('h2.post-title'),
110-
'displays title with h2 tag when url provided'
109+
find('.post-title.list-view'),
110+
'displays list view title when a url is provided'
111111
);
112112

113113
run(() => {
114114
set(this, 'postUrl', null);
115115
});
116116

117117
assert.notOk(
118-
find('.post-title a'),
119-
'does not display title as link when url is not provided'
118+
find('.post-title.list-view a'),
119+
'does not display title as link when a url is not provided'
120120
);
121121
assert.ok(
122-
find('h1.post-title'),
123-
'displays title with h1 tag when url provided'
122+
find('.post-title.page-view'),
123+
'displays page view title when a url is provided'
124124
);
125125
});

0 commit comments

Comments
 (0)