Skip to content

Commit f0c1f4d

Browse files
committed
added demo
1 parent a8c2053 commit f0c1f4d

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ citizens. The main features are:
1818
- Works with async out of the box.
1919
- It is tested.
2020

21+
# Demo
22+
23+
Have a look at a [simple todo App demo](https://webcomponenthelpers.github.io/ImperaJS/demo/) made with ImperaJs.
24+
2125
# Getting Started
2226

2327
Of course... new framework, new sets of names for the same things... So let's first get the namings right:

demo/webComponents.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ let mxn_todo = html`
5555
</style>
5656
5757
<div class="tags has-addons is-centered" style="margin-bottom:0rem">
58-
<span ${"#-status"} class="tag is-warning" onclick="this.root.toggle.bind(this.root)()">Pending</span>
58+
<span ${"#-status"} class="tag is-warning" onclick="this.root.toggle()">Pending</span>
5959
<span ${"#-text"} class="tag is-info">Todo text</span>
6060
<a class="tag is-delete is-light" onclick="this.root.applyTransition('removeTodo',this.root.index)"></a>
6161
</div>
@@ -87,20 +87,23 @@ dfn("my-todo", class extends mxn_todo(StateElement){
8787
let mxn_container = html`
8888
${bulma}
8989
<style>
90-
div.box{
90+
div.container{
9191
margin:20% auto;
9292
max-width: 30rem;
9393
}
9494
.withmargin{
9595
margin-top:2rem;
9696
}
9797
</style>
98+
<div class="container">
99+
<span class="subtitle is-4 has-text-info"> ImperaJs</span> <span class="subtitle is-4">Todo App</span>
98100
<div class ="box" style="padding:3rem">
99101
<slot name="head"></slot>
100102
<div class="withmargin" >
101103
<div ${"#-content"}></div>
102104
</div>
103105
</div>
106+
</div>
104107
`;
105108
dfn("my-container", class extends mxn_container(StateElement){
106109
on_todos_update(val){

0 commit comments

Comments
 (0)