Skip to content

Commit

Permalink
[OGUI-511] Remove helping content (graduta#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
graduta authored Mar 11, 2020
1 parent 8d23138 commit abeb024
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 19 deletions.
3 changes: 0 additions & 3 deletions public/Model.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ export default class Model extends Observable {
this.session = sessionService.get();
this.session.personid = parseInt(this.session.personid, 10); // cast, sessionService has only strings

this.loader = new Loader(this);
this.loader.bubbleTo(this);

// Setup router
this.router = new QueryRouter();
this.router.observe(this.handleLocationChange.bind(this));
Expand Down
25 changes: 9 additions & 16 deletions public/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,24 @@ import {h, switchCase} from '/js/src/index.js';
*/
export default (model) => [
h('.flex-column.absolute-fill', [
header(model),
content(model)
header(),
content()
])
];

/**
* Top header depending on the query string handler by router model
* Top header of the page
* @param {object} model
* @return {vnode}
*/
const header = (model) => h('', [
switchCase(model.router.params.page, {
home: () => h('.w-100.bg-white.flex-row.p2.shadow-level2.level2', {
style: 'display: flex; justify-content: center'
}, 'Welcome to your home page')
})(model)
]);
const header = () =>
h('.p2.shadow-level2.level2', {
style: 'display: flex; justify-content: center'
}, 'Welcome to your home page');

/**
* Page content depending on the query string handler by router model
* Page content
* @param {object} model
* @return {vnode}
*/
const content = (model) => [
switchCase(model.router.params.page, {
home: () => h('', 'Add your content here')
})(model)
];
const content = () => h('', 'Add your content here');

0 comments on commit abeb024

Please sign in to comment.