-
Notifications
You must be signed in to change notification settings - Fork 2
/
wc-header.js
63 lines (58 loc) · 1.32 KB
/
wc-header.js
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
import { LitElement, html } from 'lit';
import { render } from 'lit/html.js';
import { anchors } from './styles';
const styles = document.createElement('style');
render(anchors('wc-header'), styles);
document.head.appendChild(styles);
class WCHeader extends LitElement {
static get properties() {
return {
duration: Number,
name: String,
isOpen: {
type: Boolean,
reflect: true,
},
};
}
render() {
return html`
<style>
:host {
background: black;
position: fixed;
width: 100%;
}
ul {
display: flex;
list-style: none;
justify-content: space-around;
align-content: center;
justify-items: inherit;
align-items: center;
flex-direction: row;
margin: 0;
max-width: 980px;
margin: 0 auto;
padding: 0;
}
@media screen and (min-width: 768px) {
ul {
justify-content: flex-start;
}
.navigation a {
padding: 10px 20px;
text-decoration: none;
color: #828282;
}
}
</style>
<header>
<ul>
<slot></slot>
</ul>
</header>
`;
}
}
window.customElements.define('wc-header', WCHeader);