Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Machy8 committed Oct 26, 2023
1 parent be90424 commit 5117c88
Show file tree
Hide file tree
Showing 8 changed files with 857 additions and 784 deletions.
60 changes: 47 additions & 13 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta snippet="spa-cache-control" name="spa-cache-control" content="cache">
<title snippet="title">First page</title>
<title snippet="title">Index page</title>
<script type="module" src="http://localhost:5173/@vite/client"></script>
</head>

Expand All @@ -17,7 +17,7 @@
}
</style>

<!-- <div $text="" $count="1000" cloak>
<div $text="" $count="5" cloak>
<input :value="text">
<button @click="count.set(count() + 1)">Přidej<span :text="count"></span></button>
<button @click="count.set(count() - 1)">Odeber<span :text="count"></span></button><br>
Expand All @@ -35,7 +35,7 @@
</div>
</template>
</ul>
</div> -->
</div>

<!-- <form $items="{}" $text="" @submit="
event.preventDefault();
Expand Down Expand Up @@ -116,23 +116,57 @@
<div>Yupí! <span :html="number"></span></div>
</template>
</div> -->
<!-- <div id="cart-form"></div>
<div $count="1">
<button @click="count.set(count() + 1)">+</button>
<button @click="count.set(count() - 1)">-</button>
<template id="loop" singleroot :if="count > 0">
<div></div>
</template>
<div template="loop">
<div></div>
</div>
</div> -->

<!-- <div $items="{
birth: 0,
label: 2
}">
<template :for="key in items">
<div :html="key + ' - ' + items()[key]"></div>
</template>
</div>
-->

<div>
<!-- <div $renderForm>
<template :if="renderForm">
<div>Text</div>
</template>
<template :if="!renderForm">
</template>
</div>
-->

<!-- <div $count="1">
<button @click="count.set(count() + 1)">+</button>
<button @click="count.set(count() - 1)">-</button>
<template template="text" :if="count() > 0">
Ahoj
</template> -->
<!-- template -->
<!-- Ahoj -->
<!-- /template -->
<!-- </div> -->

<script type="module">
import Signalize from 'signalizejs';
import Directives from 'signalizejs/directives';

const { Signal } = new Signalize();
class Number extends Signal {
increment() {
this.set(this.get() + 1);
}
}
const number = new Number(0);
number.increment();
console.log(number())
const { use } = new Signalize();
use(Directives);
</script>

</body>
Expand Down
Loading

0 comments on commit 5117c88

Please sign in to comment.