-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updating models added a serializer to make the magic work extracted footer to component fixes models and adds index to articles adding basic layout to article templates update styling Adds blogpost + Anne-Greeth as author changing targets in config ran linters and fixed prettier complaints updating readme more updates added missing tag more updates adding author model to route added dynamic page title article template extracting primary navbar to component tweak to navbar working on some spacing working on the card element for the article links more work on article card trying to fix the error that is causing build failure tadjusting prember urls added prember-middleware removed pagination from in-repo addon config tweaking primary nav added links to homepage few small tweaks updating styles updating styles ember-data forced attribute rename trying again
- Loading branch information
Showing
51 changed files
with
9,552 additions
and
4,381 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
/.pnp* | ||
/.sass-cache | ||
/.eslintcache | ||
/.vscode/ | ||
/connect.lock | ||
/coverage/ | ||
/libpeerconnection.log | ||
|
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 @@ | ||
/* /index.html 200 |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import JSONAPIAdapter from '@ember-data/adapter/json-api'; | ||
|
||
export default class ApplicationAdapter extends JSONAPIAdapter { | ||
urlForFindAll(modelName) { | ||
const path = this.pathForType(modelName); | ||
return `/${path}/all.json`; | ||
} | ||
|
||
urlForFindRecord(id, modelName) { | ||
const path = this.pathForType(modelName); | ||
return `/${path}/${id}.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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<footer> | ||
<div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 lg:max-w-8xl"> | ||
<div class="border-t border-gray-200 py-8 text-sm text-center sm:text-left"> | ||
<span class="block sm:inline">An open-source project made <span class="emoji">with ❤️</span> by <a href="https://twitter.com/agvanherwijnen" class="underline" rel="external">Anne-Greeth</a> & <a href="https://twitter.com/melaniersumner" class="underline" rel="external">Melanie</a>. Hosted by <a href="https://www.netlify.com" class="underline" rel="external">Netlify</a>.</span> | ||
<span class="block sm:inline mt-4 md:mt-0">Have a problem, question or suggestion? Let us know by filing an issue in this project's <a href="https://github.com/the-zen-dev/thezendevapp/issues" class="underline" rel="external">GitHub repository</a>.</span> | ||
</div> | ||
</div> | ||
</footer> |
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,15 @@ | ||
<nav> | ||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> | ||
<div class="flex justify-center h-16"> | ||
<div class="sm:ml-6 sm:flex sm:space-x-8"> | ||
<a href="/" class="border-transparent text-yellow-100 hover:border-yellow-300 hover:text-yellow-300 inline-flex items-center px-1 pt-1 border-b-2 text-md font-medium"> | ||
The Zen Dev | ||
</a> | ||
<a href="/articles" class="border-transparent text-yellow-100 hover:border-yellow-300 hover:text-yellow-300 inline-flex items-center px-1 pt-1 border-b-2 text-md font-medium"> | ||
Articles | ||
</a> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
</nav> |
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,5 @@ | ||
import Model from '@ember-data/model'; | ||
|
||
export default class ApplicationModel extends Model { | ||
|
||
} |
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 Model, { attr, hasMany } from '@ember-data/model'; | ||
|
||
export default class articleModel extends Model { | ||
@attr content; | ||
@attr created; | ||
@attr html; | ||
@attr image; | ||
@attr title; | ||
@attr unsplashtext; | ||
@attr unsplashurl; | ||
@hasMany('author') authors; | ||
@hasMany('tag') tags; | ||
|
||
@attr('date', { | ||
defaultValue() { | ||
return new Date(); | ||
}, | ||
}) | ||
createdAt; | ||
} |
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,9 @@ | ||
import Model, { attr, hasMany } from '@ember-data/model'; | ||
|
||
export default class AuthorModel extends Model { | ||
@attr first; | ||
@attr last; | ||
@attr site; | ||
@attr url; | ||
@hasMany('article') articles; | ||
} |
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,6 @@ | ||
import Model, { attr, hasMany } from '@ember-data/model'; | ||
|
||
export default class TagModel extends Model { | ||
@attr title; | ||
@hasMany('article') articles; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import Route from '@ember/routing/route'; | ||
import { inject as service } from '@ember/service'; | ||
export default class ArticlesRoute extends Route { | ||
@service store; | ||
|
||
model() { | ||
return this.store.findAll('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,24 @@ | ||
import Route from '@ember/routing/route'; | ||
import { inject as service } from '@ember/service'; | ||
|
||
export default class ArticlesArticleRoute extends Route { | ||
@service store; | ||
|
||
model(params) { | ||
let article = this.store.peekAll('article', params.id); | ||
if (!article) { | ||
console.log('sorry, no article for this one ' + params.id); | ||
} | ||
console.log(`found it: ${article}`); | ||
return this.store.findRecord('article', params.id); | ||
} | ||
|
||
// make sure that tags are loaded in ember-data before template is rendered | ||
// to ensure fastboot has all data on time | ||
// (note: "before the template is rendered" meaning it pauses the render of the route) | ||
async afterModel(model) { | ||
await model.get('tags'); | ||
await model.get('authors'); | ||
return model; | ||
} | ||
} |
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,9 @@ | ||
import Route from '@ember/routing/route'; | ||
import { inject as service } from '@ember/service'; | ||
|
||
export default class ArticlesIndexRoute extends Route { | ||
@service store; | ||
model() { | ||
return this.store.findAll('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,3 @@ | ||
import Route from '@ember/routing/route'; | ||
|
||
export default class IndexRoute extends Route {} |
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,3 @@ | ||
import JSONAPISerializer from '@ember-data/serializer/json-api'; | ||
|
||
export default class ApplicationSerializer extends JSONAPISerializer {} |
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 |
---|---|---|
|
@@ -13,3 +13,6 @@ body { | |
font-family: 'Merienda', cursive; | ||
} | ||
|
||
.author-separator { | ||
background-color: var(--deep-space-sparkle); | ||
} |
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
Oops, something went wrong.