diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 00000000..bfadc75e --- /dev/null +++ b/.jshintrc @@ -0,0 +1,3 @@ +{ + "esversion": 9 +} diff --git a/examples/demo/app.css b/examples/demo/app.css new file mode 100644 index 00000000..6f710546 --- /dev/null +++ b/examples/demo/app.css @@ -0,0 +1,37 @@ +.main { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + + display: grid; + grid-template-columns: 200px 1fr; +} + +.left-thing { + background-color: gray; + padding: 20px; +} + +.left-thing button { + width: 100%; +} + +.right-thing { + padding: 20px; + overflow: auto; +} + +/* Message widget */ +.message .author { + font-weight: bold; +} + +.message { + width: 400px; + background-color: lightblue; + margin: 10px 5px; + border-radius: 5px; + padding: 5px; +} diff --git a/examples/demo/app.js b/examples/demo/app.js new file mode 100644 index 00000000..1d704fd4 --- /dev/null +++ b/examples/demo/app.js @@ -0,0 +1,42 @@ +import { Message } from "./message.js"; +import { messages } from "./data.js"; + +const template = ` +