Skip to content

Commit 37d1d44

Browse files
committed
Add Children's Church in group showcase
1 parent 7be62e1 commit 37d1d44

File tree

4 files changed

+26
-6
lines changed

4 files changed

+26
-6
lines changed

app/controllers/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import Ember from 'ember';
22

33
export default Ember.Controller.extend({
44
actions: {
5-
viewEnglishService() {
6-
this.transitionToRoute("group.index", "english-service");
5+
viewGroup(slug) {
6+
this.transitionToRoute("group.index", slug);
77
},
88
viewOnlineSermons() {
99
this.transitionToRoute("bulletin/sunday");

app/styles/pages/index.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,15 @@
3232

3333
.group {
3434
text-align: center;
35+
margin-top: $padding-l;
3536

3637
.description {
3738
margin-top: $padding-m;
3839
}
40+
41+
&:first-of-type {
42+
margin-top: 0
43+
}
3944
}
4045
}
4146

@@ -57,6 +62,12 @@
5762
background-color: $gray-blue-light;
5863
}
5964

65+
.around-church {
66+
.group, .group:first-of-type {
67+
margin-top: 0;
68+
}
69+
}
70+
6071
section {
6172
font-size: 22px;
6273
padding-bottom: $padding-xl * 2;

app/templates/index.hbs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,16 @@
2424
</div>
2525
</div>
2626
<div class="row">
27-
<div class="col-sm-offset-4 col-sm-4 group" {{action "viewEnglishService"}}>
27+
<div class="col-sm-offset-2 col-sm-4 group" {{action "viewGroup" "childrens-church"}}>
28+
<img src={{cloudinary-fetch url="https://mcac.s3.amazonaws.com/groups/fabe359d-8611-4112-b675-842cd40ef57e.jpg"
29+
width=200
30+
radius="max"
31+
height=200 crop="fill"}} />
32+
<div class="description">
33+
Children's Church
34+
</div>
35+
</div>
36+
<div class="col-sm-4 group" {{action "viewGroup" "english-service"}}>
2837
<img src={{cloudinary-fetch url="https://mcac.s3.amazonaws.com/groups/5c7d76a8-d195-4907-951d-5b3fb00c438d.jpg"
2938
width=200
3039
radius="max"

tests/unit/controllers/index-test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ test("viewOnlineSermons: it redirects to sunday's bulletin", function(assert) {
1717
controller.send("viewOnlineSermons");
1818
});
1919

20-
test("viewEnglishService: it redirects to english service hub", function(assert) {
20+
test("viewGroup: it redirects to group with group slug", function(assert) {
2121
const controller = this.subject();
2222

2323
const done = assert.async();
2424
controller.transitionToRoute = function(name, model) {
2525
assert.equal(name, "group.index");
26-
assert.equal(model, "english-service");
26+
assert.equal(model, "random-slug");
2727
done();
2828
};
2929

30-
controller.send("viewEnglishService");
30+
controller.send("viewGroup", "random-slug");
3131
});

0 commit comments

Comments
 (0)