diff --git a/app/helpers/convert-aeoaa.js b/app/helpers/convert-aeoaa.js
index f4a9d43..1b497a4 100644
--- a/app/helpers/convert-aeoaa.js
+++ b/app/helpers/convert-aeoaa.js
@@ -1,8 +1,15 @@
import Ember from 'ember';
-export function convertAeoaa(params/*, hash*/ ) {
- var res = params[0].replace('æ', 'ae').replace('ø', 'oe').replace('å', 'aa').replace('å', 'aa').replace(' ', '-').replace(' ', '-').replace(' ', '-').replace(' ', '-').replace(' ', '-').replace(' ', '-').replace(' ', '-').replace(' ', '-').replace(' ', '-');
- return res;
+export function convertAeoaa(params /*, hash*/ ) {
+
+ if (typeof params[0] === 'undefined') {
+ return;
+ } else {
+
+
+ var res = params[0].replace('æ', 'ae').replace('ø', 'oe').replace('å', 'aa').replace('å', 'aa').replace(' ', '-').replace(' ', '-').replace(' ', '-').replace(' ', '-').replace(' ', '-').replace(' ', '-').replace(' ', '-').replace(' ', '-').replace(' ', '-');
+ return res;
+ }
}
export default Ember.Helper.helper(convertAeoaa);
diff --git a/app/pods/components/content-section/template.hbs b/app/pods/components/content-section/template.hbs
index d6484a4..517d28f 100644
--- a/app/pods/components/content-section/template.hbs
+++ b/app/pods/components/content-section/template.hbs
@@ -1,34 +1,40 @@
-
-
-
-
-{{#if titletype}}
-{{#if (eq titletype 1)}}
-{{title}}
-{{/if}}
-
-{{#if (eq titletype 2)}}
-{{title}}
-{{/if}}
-
-{{#if (eq titletype 3)}}
-{{title}}
-{{/if}}
-{{else}}
-{{title}}
-{{/if}}
-
-{{markdown-to-html markdown=content}}
-
-{{#if assetpath}}
-
-{{/if}}
+ {{#if titletype}}
+ {{#if (eq titletype 1)}}
+ {{title}}
+ {{/if}}
+
+ {{#if (eq titletype 2)}}
+ {{title}}
+ {{/if}}
+
+ {{#if (eq titletype 3)}}
+ {{title}}
+ {{/if}}
+ {{else}}
+ {{title}}
+ {{/if}}
+
+ {{markdown-to-html markdown=content}}
+
+ {{#if assetpath}}
+
+ {{/if}}
{{#if illustration}}
{{else}}
-
+
{{/if}}
-
diff --git a/app/pods/components/tool-presentation/component.js b/app/pods/components/tool-presentation/component.js
new file mode 100644
index 0000000..926b613
--- /dev/null
+++ b/app/pods/components/tool-presentation/component.js
@@ -0,0 +1,4 @@
+import Ember from 'ember';
+
+export default Ember.Component.extend({
+});
diff --git a/app/pods/components/tool-presentation/template.hbs b/app/pods/components/tool-presentation/template.hbs
new file mode 100644
index 0000000..889d9ee
--- /dev/null
+++ b/app/pods/components/tool-presentation/template.hbs
@@ -0,0 +1 @@
+{{yield}}
diff --git a/app/pods/template/route.js b/app/pods/template/route.js
index 5cf8c3d..6f2b035 100644
--- a/app/pods/template/route.js
+++ b/app/pods/template/route.js
@@ -2,8 +2,8 @@ import Ember from 'ember';
export default Ember.Route.extend({
model: function() {
- var data = Ember.$.getJSON('http://hiof.no/api/v1/designguidelines/?type=templates');
- //console.log(data);
+ var data = Ember.$.getJSON('http://hiof.no/api/v2/designguidelines/?type=templates');
+ console.log(data);
return data;
}
});
diff --git a/app/pods/template/template.hbs b/app/pods/template/template.hbs
index 8008afe..d9f0397 100644
--- a/app/pods/template/template.hbs
+++ b/app/pods/template/template.hbs
@@ -3,7 +3,7 @@
Dokumentmaler
{{#each model.data as |post|}}
- {{content-section type=post.type basename=post.attributes.slug title=post.attributes.title content=post.attributes.body author=post.attributes.author date=post.attributes.date illustration=post.attributes.illustration assetpath=post.attributes.assetpath url=post.attributes.url}}
+ {{content-section type=post.type basename=post.attributes.slug title=post.attributes.title content=post.attributes.body author=post.attributes.author date=post.attributes.date illustration=post.attributes.illustration assetpath=post.attributes.assetpath url=post.attributes.relatedassets}}
{{/each}}
-{{nav-internal}}
\ No newline at end of file
+{{nav-internal}}
diff --git a/app/pods/webcomponent/route.js b/app/pods/webcomponent/route.js
index 68b4eac..e473d23 100644
--- a/app/pods/webcomponent/route.js
+++ b/app/pods/webcomponent/route.js
@@ -2,8 +2,9 @@ import Ember from 'ember';
export default Ember.Route.extend({
model: function() {
+
var data = Ember.$.getJSON('http://hiof.no/api/v1/designguidelines/?type=webcomponents');
- //console.log(data);
+ console.log(data);
return data;
},
didInsertElement: function() {
diff --git a/app/styles/app.scss b/app/styles/app.scss
index 28078e2..e6a0da2 100644
--- a/app/styles/app.scss
+++ b/app/styles/app.scss
@@ -7,6 +7,7 @@
@import "pod-styles";
html {
overflow-x: hidden;
+
}
h1,
diff --git a/package.json b/package.json
index 5f11274..7a2bfc1 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "design",
- "version": "0.0.5",
+ "version": "0.0.6",
"description": "Small description for designguidlines goes here",
"private": true,
"directories": {
diff --git a/tests/integration/pods/components/tool-presentation/component-test.js b/tests/integration/pods/components/tool-presentation/component-test.js
new file mode 100644
index 0000000..a9c7d8a
--- /dev/null
+++ b/tests/integration/pods/components/tool-presentation/component-test.js
@@ -0,0 +1,26 @@
+import { moduleForComponent, test } from 'ember-qunit';
+import hbs from 'htmlbars-inline-precompile';
+
+moduleForComponent('tool-presentation', 'Integration | Component | tool presentation', {
+ integration: true
+});
+
+test('it renders', function(assert) {
+ assert.expect(2);
+
+ // Set any properties with this.set('myProperty', 'value');
+ // Handle any actions with this.on('myAction', function(val) { ... });
+
+ this.render(hbs`{{tool-presentation}}`);
+
+ assert.equal(this.$().text().trim(), '');
+
+ // Template block usage:
+ this.render(hbs`
+ {{#tool-presentation}}
+ template block text
+ {{/tool-presentation}}
+ `);
+
+ assert.equal(this.$().text().trim(), 'template block text');
+});