generated from garrettmills/template-npm-typescript
Start ui framework with web components
This commit is contained in:
39
index.html
Normal file
39
index.html
Normal 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>
|
||||
Reference in New Issue
Block a user