diff --git a/app/index.html b/app/index.html index 1438998..3dfde9f 100644 --- a/app/index.html +++ b/app/index.html @@ -12,6 +12,8 @@ + + {{content-for "head-footer"}}
diff --git a/app/pods/application/controller.js b/app/pods/application/controller.js new file mode 100644 index 0000000..7d94454 --- /dev/null +++ b/app/pods/application/controller.js @@ -0,0 +1,17 @@ +import Controller from '@ember/controller'; +import { computed } from '@ember/object'; + +export default Controller.extend({ + isShowingNav: true, + + isShowingSpeedControl: computed({ + get() { + return window.localStorage.getItem('isShowingSpeedControl') === 'true'; + }, + + set(key, value) { + window.localStorage.setItem('isShowingSpeedControl', value); + return value; + } + }), +}); diff --git a/app/pods/application/template.hbs b/app/pods/application/template.hbs index 199beb2..42b16b5 100644 --- a/app/pods/application/template.hbs +++ b/app/pods/application/template.hbs @@ -11,32 +11,46 @@{{highlightedLabel}}
+
Are you sure you want to delete {{post.title}}? This action cannot be undone.
diff --git a/app/pods/components/speed-control/component.js b/app/pods/components/speed-control/component.js new file mode 100644 index 0000000..432cbd0 --- /dev/null +++ b/app/pods/components/speed-control/component.js @@ -0,0 +1,30 @@ +import Component from '@ember/component'; +import { computed } from '@ember/object'; + +export default Component.extend({ + didInsertElement() { + this._super(...arguments); + + if (!this.timing) { + this.set('timing', window.server.timing); + } + }, + + timing: computed({ + get() { + return window.localStorage.getItem('timing'); + }, + + set(key, value) { + window.localStorage.setItem('timing', value); + window.server.timing = +value; + return value; + } + }), + + actions: { + updateTiming(event) { + this.set('timing', event.target.value); + } + } +}); diff --git a/app/pods/components/speed-control/template.hbs b/app/pods/components/speed-control/template.hbs new file mode 100644 index 0000000..1ecc931 --- /dev/null +++ b/app/pods/components/speed-control/template.hbs @@ -0,0 +1,28 @@ +{{yield}}
- +{{yield}}
+ ×Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
{{/ui-card}}Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
{{/ui-card}}Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
{{/ui-card}} diff --git a/app/pods/forms/controller.js b/app/pods/forms/controller.js new file mode 100644 index 0000000..d925584 --- /dev/null +++ b/app/pods/forms/controller.js @@ -0,0 +1,9 @@ +import Controller from '@ember/controller'; + +export default Controller.extend({ + actions: { + save() { + alert("Saved!"); + } + } +}); diff --git a/app/pods/forms/template.hbs b/app/pods/forms/template.hbs new file mode 100644 index 0000000..db69b85 --- /dev/null +++ b/app/pods/forms/template.hbs @@ -0,0 +1,19 @@ +{{#ui-form onSubmit=(action "save") as |form|}} + + {{#form.label}} + my label + {{/form.label}} + + {{form.input + value=name + placeholder="my input"}} + + {{#form.submit}} + Save + {{/form.submit}} + + {{#ui-button onClick=(action (mut name) "")}} + Reset + {{/ui-button}} + +{{/ui-form}} diff --git a/app/pods/future/horizontal-form/template.hbs b/app/pods/future/horizontal-form/template.hbs new file mode 100644 index 0000000..c06e7ed --- /dev/null +++ b/app/pods/future/horizontal-form/template.hbs @@ -0,0 +1,88 @@ +{{!-- {{#ui-modal as |modal|}} + +{{album.title}}
+ class='w-32 h-32 rounded border border-grey'> +{{album.title}}
{{/link-to}} {{/each}}+ class='flex no-underline text-bold text-grey-dark mr-4 border-bottom border-color-transparent' + activeClass='border-color-inherit'}} +
+LIGHT
{{/link-to}} {{#link-to 'media.styles.style' 'dark' - class='flex link b near-black pb2 bb bw1 b--transparent' - activeClass='b--inherit'}} - -+ class='flex no-underline text-bold text-black border-bottom-1 border-color-transparent' + activeClass='border-color-inherit'}} +
+DARK
{{/link-to}} diff --git a/app/pods/media/template.hbs b/app/pods/media/template.hbs index 11f3b61..aa0738d 100644 --- a/app/pods/media/template.hbs +++ b/app/pods/media/template.hbs @@ -1,11 +1,15 @@ -{{#link-to 'media.albums' class='link dark-gray dim mr3' activeClass='silver'}} +{{#link-to 'media.albums' + class='no-underline text-grey-darkest dim mr-4' + activeClass='text-grey-dark'}} Albums {{/link-to}} -{{#link-to 'media.styles' class='link dark-gray dim' activeClass='silver'}} +{{#link-to 'media.styles' + class='no-underline text-grey-darkest dim' + activeClass='text-grey-dark'}} Styles {{/link-to}} -| @@ -64,18 +64,20 @@ {{keyboard-press key="Enter" on-press=(action "openPost" navigatedPost)}} {{#each posts as |post|}} - | |||||
|---|---|---|---|---|---|
| - {{#link-to 'posts.post' post.id class='link dark-gray dim'}} + {{#link-to 'posts.post' post.id class='no-underline text-grey-darkest'}} {{post.title}} {{/link-to}} | {{moment-format post.date 'MMM D, YYYY'}} | {{post.author}} | {{tag-list tags=post.tags}} | -+ |
+ class="hidden group-hover:block no-transition text-grey-dark no-underline">
{{fa-icon "trash"}}
Delete
diff --git a/app/pods/posts/post/edit/template.hbs b/app/pods/posts/post/edit/template.hbs
index 38a2232..7c3dd67 100644
--- a/app/pods/posts/post/edit/template.hbs
+++ b/app/pods/posts/post/edit/template.hbs
@@ -1,22 +1,28 @@
-
-
-
- {{input value=model.title class='w-100 pa2'}}
+
+ + {{input + value=model.title + class='w-full p-2 border border-grey-lighter'}}-
+
-
{{textarea value=model.text rows=20
- class='pa2 b--light-gray w-100'}}
+ class='p-2 border border-grey-lighter w-full'}}
+
{{#ui-button task=save data-test-id="save"}}
Save
{{/ui-button}}
+ {{#ui-button task=save style="gray" data-test-id="save"}}
+ Cancel
+ {{/ui-button}}
+
{{#if save.last.isError}}
- + {{fa-icon 'exclamation-circle'}} Whoops - your post was not saved. Please try again! diff --git a/app/pods/posts/post/index/template.hbs b/app/pods/posts/post/index/template.hbs index d937c03..c1cabec 100644 --- a/app/pods/posts/post/index/template.hbs +++ b/app/pods/posts/post/index/template.hbs @@ -1,21 +1,25 @@{{model.title}}-- {{#link-to 'posts.post.edit' model.id class='dim link silver'}} + + {{#link-to 'posts.post.edit' model.id class='dim no-underline text-grey-dark'}} Edit post {{/link-to}}
- + -+ -
+
{{{model.text}}}
@@ -35,13 +39,13 @@
Activity
-
+
+
{{#if model.comments}}
- {{#link-to 'posts' class='link silver ttu dim'}}
+
+ {{#link-to 'posts' class='text-grey-dark uppercase no-underline dim'}}
Blog posts
{{/link-to}}
-
+
/
diff --git a/app/pods/tags/index/route.js b/app/pods/tags/index/route.js
index 185eacf..03ea1cb 100644
--- a/app/pods/tags/index/route.js
+++ b/app/pods/tags/index/route.js
@@ -3,7 +3,7 @@ import Route from '@ember/routing/route';
export default Route.extend({
model() {
- return this.get('store').findAll('tag', {
+ return this.get('store').query('tag', {
include: 'posts'
});
}
diff --git a/app/pods/tags/index/template.hbs b/app/pods/tags/index/template.hbs
index 4e9476e..76c642e 100644
--- a/app/pods/tags/index/template.hbs
+++ b/app/pods/tags/index/template.hbs
@@ -2,8 +2,8 @@
Tags+ +
- {{#link-to 'tags' class='link silver ttu dim'}}
+
+ {{#link-to 'tags' class='no-underline text-grey-dark uppercase dim'}}
Tags
{{/link-to}}
-
+
/
@@ -12,8 +12,8 @@
|