-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.ts
More file actions
41 lines (38 loc) · 942 Bytes
/
header.ts
File metadata and controls
41 lines (38 loc) · 942 Bytes
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
import {render} from "../../../index.js"
import {openSettings} from "../services/settings.js"
import {navItem} from "./nav-item.js"
import {ACTION_BUTTON} from "./app-style.js"
const headerStyle = (): string => render`
<style id="header-style">
.header {
background-color: var(--header-bg);
border-bottom: var(--header-border);
height: 3rem;
min-height: 3rem;
max-width: 100%;
z-index: 1;
ul {
display: flex;
justify-content: space-around;
user-select: none;
}
}
</style>
`
export const header = (): string => render`
<nav id="header" class="header">
<ul>
${navItem({value: "active", label: "⊡"})}
${navItem({value: "completed", label: "⊠"})}
<li>
<button
class="${ACTION_BUTTON}"
::click=${openSettings}
>
⋮
</button>
</li>
</ul>
</nav>
${headerStyle()}
`