From 91d1a681a4a33ff710260f1fcd6e3b9250248ab4 Mon Sep 17 00:00:00 2001 From: Todd Jordan Date: Thu, 5 May 2016 23:53:21 -0400 Subject: [PATCH 1/3] Style Super Rentals! Updates for style add installed style addon small tweaks another minor fix Update simple component to display styles, and to toggle image size style addon published to npm display maps properly make tomster a background image, so that it comes with the style addon Ember Rentals -> Super Rentals --- app/components/rental-listing.js | 9 +- app/services/maps.js | 2 - app/templates/about.hbs | 19 +- app/templates/application.hbs | 22 +- app/templates/components/list-filter.hbs | 2 +- app/templates/components/rental-listing.hbs | 34 +- app/templates/contact.hbs | 36 +-- app/templates/index.hbs | 21 +- package.json | 1 + .../components/rental-listing-test.js | 26 ++ vendor/ember-tutorial.css | 302 ++++++++++++++++++ 11 files changed, 416 insertions(+), 58 deletions(-) create mode 100644 tests/integration/components/rental-listing-test.js create mode 100644 vendor/ember-tutorial.css diff --git a/app/components/rental-listing.js b/app/components/rental-listing.js index 826f7ac81..71a03dc7e 100644 --- a/app/components/rental-listing.js +++ b/app/components/rental-listing.js @@ -1,13 +1,10 @@ import Ember from 'ember'; export default Ember.Component.extend({ - isImageShowing: false, + isWide: false, actions: { - imageShow() { - this.set('isImageShowing', true); - }, - imageHide() { - this.set('isImageShowing', false); + toggleImageSize() { + this.toggleProperty('isWide'); } } }); diff --git a/app/services/maps.js b/app/services/maps.js index 98709639d..17c025ce1 100644 --- a/app/services/maps.js +++ b/app/services/maps.js @@ -26,8 +26,6 @@ export default Ember.Service.extend({ createMapElement() { let element = document.createElement('div'); element.className = 'map'; - element.setAttribute('style', 'width:300px;height:300px;'); return element; } - }); diff --git a/app/templates/about.hbs b/app/templates/about.hbs index 8ecd585d6..346337a5a 100644 --- a/app/templates/about.hbs +++ b/app/templates/about.hbs @@ -1,7 +1,12 @@ -

About Super Rentals

- -

The Super Rentals website is a delightful project created to explore Ember.
- By building a property rental site, we can simultaneously imagine traveling
- AND building Ember applications simultaneously.

- -{{#link-to 'contact'}}Click here to contact us.{{/link-to}} \ No newline at end of file +
+
+

About Ember Rentals

+

+ The Super Rentals website is a delightful project created to explore Ember. + By building a property rental site, we can simultaneously imagine traveling + AND building Ember applications. +

+ {{#link-to 'index' class="button"}} + Get Started! + {{/link-to}} +
diff --git a/app/templates/application.hbs b/app/templates/application.hbs index f8bc38e7b..a5cca3c45 100644 --- a/app/templates/application.hbs +++ b/app/templates/application.hbs @@ -1,3 +1,21 @@ -

Welcome to Ember

+
+ +
+ {{outlet}} +
+
-{{outlet}} diff --git a/app/templates/components/list-filter.hbs b/app/templates/components/list-filter.hbs index 111d7c01b..63253902e 100644 --- a/app/templates/components/list-filter.hbs +++ b/app/templates/components/list-filter.hbs @@ -1,2 +1,2 @@ -City: {{input value=value key-up=(action 'handleFilterEntry')}} +{{input value=value key-up=(action 'handleFilterEntry') class="light" placeholder="Filter By City"}} {{yield results}} diff --git a/app/templates/components/rental-listing.hbs b/app/templates/components/rental-listing.hbs index ffb58f299..070cb708e 100644 --- a/app/templates/components/rental-listing.hbs +++ b/app/templates/components/rental-listing.hbs @@ -1,14 +1,20 @@ -

{{rental.title}}

-

Owner: {{rental.owner}}

-

Type: {{rental-property-type rental.type}} - {{rental.type}}

-

Location: {{rental.city}}

-

Number of bedrooms: {{rental.bedrooms}}

-{{#if isImageShowing}} -

- {{rental.type}} -

- -{{else}} - -{{/if}} -{{location-map location=rental.city}} +
+ + + View Larger + +

{{rental.title}}

+
+ Owner: {{rental.owner}} +
+
+ Type: {{rental-property-type rental.type}} - {{rental.type}} +
+
+ Location: {{rental.city}} +
+
+ Number of bedrooms: {{rental.bedrooms}} +
+ {{location-map location=rental.city}} +
diff --git a/app/templates/contact.hbs b/app/templates/contact.hbs index 90644b558..af5393193 100644 --- a/app/templates/contact.hbs +++ b/app/templates/contact.hbs @@ -1,18 +1,18 @@ -

Super Rentals Representatives would love to help you choose a destination or answer -any questions you may have.

- -

Contact us today:

- -

- Super Rentals HQ -

- 1212 Test Address Avenue
- Testington, OR 97233 -
-

- -

(503)555-1212

- -

superrentalsrep@superrentals.com

- -{{#link-to 'about'}}About{{/link-to}} +
+
+

Contact Us

+

Super Rentals Representatives would love to help you
choose a destination or answer + any questions you may have.

+

+ Super Rentals HQ +

+ 1212 Test Address Avenue
+ Testington, OR 97233 +
+ +1 (503) 555-1212
+ superrentalsrep@emberjs.com +

+ {{#link-to 'about' class="button"}} + About + {{/link-to}} +
diff --git a/app/templates/index.hbs b/app/templates/index.hbs index 954b63f21..d70ab91bd 100644 --- a/app/templates/index.hbs +++ b/app/templates/index.hbs @@ -1,17 +1,22 @@ -

Welcome to Super Rentals

-We hope you find exactly what you're looking for in a place to stay. -

+
+
+

Welcome!

+

+ We hope you find exactly what you're looking for in a place to stay. +
Browse our listings, or use the search box above to narrow your search. +

+ {{#link-to 'about' class="button"}} + About Us + {{/link-to}} +
{{#list-filter filter=(action 'filterByCity') as |rentals|}} -