-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
149 lines (145 loc) · 3.92 KB
/
app.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
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
import {LitElement, html, css} from 'https://cdn.jsdelivr.net/gh/lit/dist@2/core/lit-core.min.js';
class Results extends LitElement{
static styles = css`
@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@500;700;800&family=Overpass:wght@400;700&display=swap');
div.container{
//display: flex;
text-align: center;
}
:host p,
:host h1{
margin:0;
}
header{
height: 353px;
padding-top:26px;
background: linear-gradient( hsl(252, 100%, 67%), hsl(241, 81%, 54%));
border-bottom-left-radius:40px;
border-bottom-right-radius:40px;
display: flex;
flex-direction: column;
align-items: center;
}
div.circular{
height: 134px;
width: 143px;
background: linear-gradient(hsla(256, 72%, 46%, 1), hsla(241, 72%, 46%, 0));
border-radius: 50%;
display: flex;
flex-direction: column;
justify-content: center;
}
div.circular>h1{
color:white;
}
div.circular>p{
color:hsl(241, 100%, 89%)
}
ul{
padding:0 33px;
margin:0
}
li{
list-style:none;
display: flex;
justify-content: center;
min-height:58px;
min-width:310px;
margin-bottom:18px;
border-radius:10px;
align-items:center;
}
li>picture{
padding-left:18px;
padding-right:47px;
}
li:first-child{
background: hsla(241, 100%, 89%,0.2);
color: hsl(234, 85%, 45%)
}
:host li:nth-child(2){
background:hsla(39, 100%, 56%, 0.2);
}
li:nth-child(3){
background: hsla(166, 100%, 37%, 0.2);
color: hsl(166, 100%, 37%)
}
li>div:first-of-type{
margin-right:79px;
}
li:last-of-type{
background:hsla(234, 85%, 45%, 0.2);
}
button{
background: hsl(224, 30%, 27%);
border:0;
color: #fff;
padding:21px 102px;
border-radius:50px;
}
`
render(){
const header = html`
<div class="container">
<main>
<div class="circular">
<h1>Your Result</h1>
<p><span>76</span> of 100</p>
</div>
<div class="mashead">
<h1>Great</h1>
<p>You scored higher than 65% of the people who have taken these tests.</p>
</div>
<h1>Summary</h1>
<ul>
<li>
<img src='./assets/images/icon-reaction.svg' alt=''/>
<div>
Reaction
</div>
<p>
80/100
</p>
</li>
<li>
<picture>
<img src='./assets/images/icon-verbal.svg' alt=''/>
</picture>
<div>
Memory
</div>
<p>
92/100
</p>
</li>
<li>
<img src='./assets/images/icon-verbal.svg' alt=''/>
<div>
Verbal
</div>
<div>
61/100
</div>
</li>
<li>
<img src='./assets/images/icon-visual.svg' alt=''/>
<div>
Visual
</div>
<p>
72/100
</p>
</li>
</ul>
<footer>
<button>Continue</button>
</footer>
</main>
</div>
`
return html`
${header}
`
}
}
customElements.define('result-summary', Results)