-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathht-drawer-logo.js
More file actions
104 lines (93 loc) · 2.31 KB
/
Copy pathht-drawer-logo.js
File metadata and controls
104 lines (93 loc) · 2.31 KB
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
93
94
95
96
97
98
99
100
101
102
103
104
"use strict";
import { LitElement, html, css } from "lit-element";
class HTDrawerLogo extends LitElement {
static get styles() {
return css`
:host {
display: block;
position: relative;
box-sizing: border-box;
pointer-events: all;
height: 192px;
}
#container {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
}
a {
display: flex;
flex-direction: column;
cursor: pointer;
align-items: center;
text-decoration: none;
color: inherit;
outline: none;
}
img {
width: 72px;
height: 72px;
}
#text-container {
display: flex;
line-height: 1;
align-items: flex-end;
margin-top: 16px;
position: relative;
line-height: 0.7;
}
#company {
font-size: 12px;
color: var(--secondary-text-color);
font-weight: 400;
margin-left: 4px;
line-height: 0.7;
}
#app {
font-size: 24px;
font-weight: 400;
//letter-spacing: -0.6px;
color: #414549;
}
#beta {
background: var(--secondary-text-color);
color: #fff;
font-size: 10px;
border-radius: 4px;
position: absolute;
top: -12px;
line-height: 1;
right: -16px;
font-weight: 400;
padding: 2px 4px;
}
`;
}
render() {
const { app, company, beta, imageSrc, href } = this;
return html`
<div id="container">
<a href="${href}">
<img src="${imageSrc}" alt="${app} ${company}">
<div id="text-container">
<div id="app">${app}</div>
<div id="company" ?hidden="${
company === "" || !company ? true : false
}">by ${company}</div>
<div id="beta" ?hidden="${beta !== ""}">beta</div>
</div>
</a>
</div>`;
}
static get properties() {
return {
company: { type: String },
app: { type: String },
imageSrc: { type: String },
href: { type: String },
beta: { type: Boolean }
};
}
}
customElements.define("ht-drawer-logo", HTDrawerLogo);