-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
92 lines (80 loc) · 2.58 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet">
<link href="/styles/styles.css" rel="stylesheet">
<title>My Application</title>
<style>
html, body {
font-family: 'Open Sans', sans-serif;
font-size: 16px;
color: var(--text);
fill: var(--text);
padding: 0;
margin: 0;
width: 100%;
height: 100%;
}
body {
display: grid;
grid-template-rows: 3rem auto 2rem;
}
header, footer {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
</style>
</head>
<body style="visibility: hidden" oncontextmenu="return false;" idle="false">
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<symbol id="menu" viewBox="0 0 24 24">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/>
</symbol>
</svg>
<header>
<button aria-label="menu" class="icon" click.setValue="$globals.isMenuOpen = !$globals.isMenuOpen"
classlist.if="$globals.isMenuOpen == true ? 'highlight-fill'">
<svg>
<use xlink:href="#menu"/>
</svg>
</button>
<h1>My Application</h1>
</header>
<main autofocus tabindex="0">
<crs-router routes="app/routes.json"></crs-router>
</main>
<aside classlist.if="$globals.isMenuOpen == true? 'open'" click.setValue="$globals.isMenuOpen = !$globals.isMenuOpen">
<nav id="main-menu" aria-label="main menu">
<ol>
<template for="route of routes">
<li><a href.one-way="route.hash">${route.title}</a></li>
</template>
</ol>
</nav>
</aside>
<footer>
<span>copyright @me</span>
</footer>
<script type="module">
import "./src/index.js";
import "./packages/crs-modules/crs-modules.js";
import "./packages/crs-router/crs-router.js";
import {initialize} from "./packages/crs-process-api/crs-process-api.js";
import IndexViewModel from "./index.js";
initialize("/packages/crs-process-api");
async function load() {
document.viewModel = new IndexViewModel(document.body);
window.addEventListener("load", async (event) => {
document.viewModel.connectedCallback();
document.body.setAttribute("idle", true);
});
}
load();
</script>
</body>
</html>