Start ui framework with web components

This commit is contained in:
2021-11-26 20:45:45 -06:00
parent 9c6a3e87bc
commit cf1f436b3c
12 changed files with 1902 additions and 10 deletions

39
index.html Normal file
View File

@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Test Page</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
margin: 0;
padding: 0;
font-family: sans-serif;
}
</style>
<script>
if ( typeof $ !== 'function' ) {
window.$ = (...args) => document.querySelector(...args)
}
</script>
<script src="dist/extollo-ui.dist.js" type="module"></script>
</head>
<body>
<ex-page>
<ex-nav appName="Extollo"></ex-nav>
<h1>Hello, World!</h1>
</ex-page>
<script>
window.addEventListener('load', () => {
$('ex-nav').tap(el => {
el.items = [{ title: 'Home', name: 'home' }]
el.addEventListener('onItemClick', ev => {
console.log('item clicked!', ev)
})
})
})
</script>
</body>
</html>