-
-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
55e8b3c
commit 0d40cd8
Showing
92 changed files
with
3,129 additions
and
4,063 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,6 @@ | |
/npm-debug.log* | ||
/testem.log | ||
/yarn-error.log | ||
/.projectile | ||
|
||
# ember-try | ||
/.node_modules.ember-try/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
extends: 'recommended', | ||
rules: { | ||
'no-implicit-this': true, | ||
}, | ||
extends: 'octane' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
import DS from 'ember-data'; | ||
import JSONAPIAdapter from '@ember-data/adapter/json-api'; | ||
|
||
export default DS.JSONAPIAdapter.extend({ | ||
namespace: 'api' | ||
}); | ||
export default class ApplicationAdapter extends JSONAPIAdapter { | ||
namespace = 'api'; | ||
|
||
buildURL(...args) { | ||
return `${super.buildURL(...args)}.json`; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
import Application from '@ember/application'; | ||
import Resolver from './resolver'; | ||
import Resolver from 'ember-resolver'; | ||
import loadInitializers from 'ember-load-initializers'; | ||
import config from './config/environment'; | ||
|
||
const App = Application.extend({ | ||
modulePrefix: config.modulePrefix, | ||
podModulePrefix: config.podModulePrefix, | ||
Resolver | ||
}); | ||
export default class App extends Application { | ||
modulePrefix = config.modulePrefix; | ||
podModulePrefix = config.podModulePrefix; | ||
Resolver = Resolver; | ||
} | ||
|
||
loadInitializers(App, config.modulePrefix); | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<div class="jumbo"> | ||
<div class="right tomster"></div> | ||
{{yield}} | ||
</div> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<div class="map"> | ||
<img | ||
alt="Map image at coordinates {{@lat}},{{@lng}}" | ||
...attributes | ||
src={{this.src}} | ||
width={{@width}} height={{@height}} | ||
> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import Component from '@glimmer/component'; | ||
import ENV from 'super-rentals/config/environment'; | ||
|
||
const MAPBOX_API = 'https://api.mapbox.com/styles/v1/mapbox/streets-v11/static'; | ||
|
||
export default class MapComponent extends Component { | ||
get src() { | ||
let { lng, lat, width, height, zoom } = this.args; | ||
|
||
let coordinates = `${lng},${lat},${zoom}`; | ||
let dimensions = `${width}x${height}`; | ||
let accessToken = `access_token=${this.token}`; | ||
|
||
return `${MAPBOX_API}/${coordinates}/${dimensions}@2x?${accessToken}`; | ||
} | ||
|
||
get token() { | ||
return encodeURIComponent(ENV.MAPBOX_ACCESS_TOKEN); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<nav class="menu"> | ||
<LinkTo @route="index" class="menu-index"> | ||
<h1>SuperRentals</h1> | ||
</LinkTo> | ||
<div class="links"> | ||
<LinkTo @route="about" class="menu-about"> | ||
About | ||
</LinkTo> | ||
<LinkTo @route="contact" class="menu-contact"> | ||
Contact | ||
</LinkTo> | ||
</div> | ||
</nav> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<article class="rental"> | ||
<Rental::Image | ||
src={{@rental.image}} | ||
alt="A picture of {{@rental.title}}" | ||
/> | ||
<div class="details"> | ||
<h3> | ||
<LinkTo @route="rental" @model={{@rental}}> | ||
{{@rental.title}} | ||
</LinkTo> | ||
</h3> | ||
<div class="detail owner"> | ||
<span>Owner:</span> {{@rental.owner}} | ||
</div> | ||
<div class="detail type"> | ||
<span>Type:</span> {{@rental.type}} | ||
</div> | ||
<div class="detail location"> | ||
<span>Location:</span> {{@rental.city}} | ||
</div> | ||
<div class="detail bedrooms"> | ||
<span>Number of bedrooms:</span> {{@rental.bedrooms}} | ||
</div> | ||
</div> | ||
<Map | ||
@lat={{@rental.location.lat}} | ||
@lng={{@rental.location.lng}} | ||
@zoom="9" | ||
@width="150" | ||
@height="150" | ||
alt="A map of {{@rental.title}}" | ||
/> | ||
</article> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<Jumbo> | ||
<h2>{{@rental.title}}</h2> | ||
<p>Nice find! This looks like a nice place to stay near {{@rental.city}}.</p> | ||
<ShareButton | ||
@text="Check out {{@rental.title}} on Super Rentals!" | ||
@hashtags="vacation,travel,authentic,blessed,superrentals" | ||
@via="emberjs" | ||
> | ||
Share on Twitter | ||
</ShareButton> | ||
</Jumbo> | ||
|
||
<article class="rental detailed"> | ||
<Rental::Image | ||
src={{@rental.image}} | ||
alt="A picture of {{@rental.title}}" | ||
/> | ||
|
||
<div class="details"> | ||
<h3>About {{@rental.title}}</h3> | ||
|
||
<div class="detail owner"> | ||
<span>Owner:</span> {{@rental.owner}} | ||
</div> | ||
<div class="detail type"> | ||
<span>Type:</span> {{@rental.type}} – {{@rental.category}} | ||
</div> | ||
<div class="detail location"> | ||
<span>Location:</span> {{@rental.city}} | ||
</div> | ||
<div class="detail bedrooms"> | ||
<span>Number of bedrooms:</span> {{@rental.bedrooms}} | ||
</div> | ||
<div class="detail description"> | ||
<p>{{@rental.description}}</p> | ||
</div> | ||
</div> | ||
|
||
<Map | ||
@lat={{@rental.location.lat}} | ||
@lng={{@rental.location.lng}} | ||
@zoom="12" | ||
@width="894" | ||
@height="600" | ||
alt="A map of {{@rental.title}}" | ||
class="large" | ||
/> | ||
</article> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<button type="button" class="image {{if this.isLarge "large"}}" {{on "click" this.toggleSize}}> | ||
<img ...attributes> | ||
<small>View {{if this.isLarge "Smaller" "Larger"}}</small> | ||
</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import Component from '@glimmer/component'; | ||
import { tracked } from '@glimmer/tracking'; | ||
import { action } from '@ember/object'; | ||
|
||
export default class RentalImageComponent extends Component { | ||
@tracked isLarge = false; | ||
|
||
@action toggleSize() { | ||
this.isLarge = !this.isLarge; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<div class="rentals"> | ||
<label> | ||
<span>Where would you like to stay?</span> | ||
<Input @value={{this.query}} class="light" /> | ||
</label> | ||
|
||
<ul class="results"> | ||
<Rentals::Filter @rentals={{@rentals}} @query={{this.query}} as |results|> | ||
{{#each results as |rental|}} | ||
<li><Rental @rental={{rental}} /></li> | ||
{{/each}} | ||
</Rentals::Filter> | ||
</ul> | ||
</div> |
Oops, something went wrong.