-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpopup.html
225 lines (215 loc) · 8.26 KB
/
popup.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
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<meta http-equiv="Content-Security-Policy" content="script-src * data: https://ssl.gstatic.com 'unsafe-inline' 'unsafe-eval';">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:300,400,500,700" type="text/css">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.light_blue-orange.min.css" />
<script defer src="./assets/material.min.js"></script>
<script defer src="./popup.js"></script>
<style>
body, html {
width: 400px;
height: 600px;
}
h2 {
font-size: 85px;
}
.mdl-card__title {
display: flex;
align-items: baseline;
justify-content: space-between;
background-color: #50b9fb;
}
span.mdl-layout-title {
color: white;
}
section > div {
display: flex;
}
section > div.effect-item.effect--selected {
border-color: #50b9fb;
}
section > div.effect-item {
cursor: pointer;
border: 2px solid white;
transition: border 0.2s;
}
section > div.effect-item:hover {
border-color: #fe945d;
}
div[data-config] {
border: 1px solid lightgrey;
margin-top: -8px;
border-top: none;
}
div[data-config] h5 {
text-align: center;
}
.page-content {
margin: 10px;
}
div.actions--center {
text-align: center;
}
.mdl-switch {
width: 40px;
}
.mdl-switch.is-checked .mdl-switch__thumb {
background: rgb(254, 148, 93);
}
.mdl-switch.is-checked .mdl-switch__track {
background: rgba(254, 148, 93, 0.5);
}
.mdl-footer {
min-height: 20px;
}
.mdl-footer img {
margin: 10px;
}
.section__circle--big {
width: 100px;
height: 100px;
border-radius: 50px;
margin: 8px 32px;
}
.effect--spot div {
background-image: url('./assets/effect-spot.png');
background-size: cover;
background-position: right;
}
.effect--laser div {
border: 2px solid red;
background-image: url('./assets/effect-laser.png');
background-size: cover;
}
.section__circle--big {
width: 60px;
height: 60px;
border-radius: 50px;
margin: 28px 9px;
}
.mdl-list__item-primary-content i.material-icons {
margin: 0 15px 0px 0px
}
@media screen and (max-width: 1024px) {
.mdl-layout__header {
display: block;
}
}
@media screen and (max-width: 1024px) {
.mdl-layout__header {
min-height: 56px;
}
}
#backdrop {
background: white;
display: block;
position: absolute;
width: 100%;
height: 100%;
left: 0;
bottom: 0;
top: 0;
right: 0;
z-index: 10;
opacity: 0.9;
}
#backdrop.application-enabled {
display: none;
}
.hide {
display: none;
}
</style>
<div class="mdl-layout mdl-js-layout">
<header class="mdl-layout__header mdl-layout__header--waterfall">
<div class="mdl-layout__header-row">
<!-- Title -->
<span class="mdl-layout-title">Spotlight.js</span>
<!-- Add spacer, to align navigation to the right -->
<div class="mdl-layout-spacer"></div>
<!-- Navigation. We hide it in small screens. -->
<nav class="mdl-navigation">
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="application-toogle">
<input type="checkbox" id="application-toogle" class="mdl-switch__input">
<span class="mdl-switch__label"></span>
</label>
</nav>
</div>
</header>
<main class="mdl-layout__content">
<div class="page-content">
<div id="backdrop"></div>
<section class="mdl-grid mdl-grid--no-spacing mdl-shadow--2dp">
<div class="mdl-card mdl-cell mdl-cell--12-col">
<section class="mdl-color--white mdl-grid">
<!-- spot effect -->
<div class="mdl-cell mdl-cell--12-col effect-item effect--selected" data-type="0">
<div class="section__circle-container mdl-cell mdl-cell--2-col mdl-cell--1-col-phone effect--spot">
<div class="section__circle-container__circle section__circle--big"></div>
</div>
<div class="section__text mdl-cell mdl-cell--4-col-desktop mdl-cell--6-col-tablet mdl-cell--3-col-phone">
<h5>Spot Effect</h5>
Use this to enable the spot highlight effect.
</div>
</div>
<div class="mdl-cell mdl-cell--12-col" data-config="0">
<div class="mdl-card__supporting-text">
<h5>Spot size</h5>
<input class="mdl-slider mdl-js-slider" type="range" id="spot-size-input" min="30" max="300"
value="130" step="1">
</div>
<div class="actions--center mdl-card__actions">
<h2 id="spot-size-label">130</h2>
</div>
</div>
<!-- laser effect -->
<div class="mdl-cell mdl-cell--12-col effect-item" data-type="1">
<div class="section__circle-container mdl-cell mdl-cell--2-col mdl-cell--1-col-phone effect--laser">
<div class="section__circle-container__circle section__circle--big"></div>
</div>
<div class="section__text mdl-cell mdl-cell--4-col-desktop mdl-cell--6-col-tablet mdl-cell--3-col-phone">
<h5>Laser Effect</h5>
Use this to enable the laser pointer effect.
</div>
</div>
<div class="mdl-cell mdl-cell--12-col" data-config="1">
<div class="mdl-card__supporting-text">
<h5>Laser size</h5>
<input class="mdl-slider mdl-js-slider" type="range" id="laser-size-input" min="5" max="30"
value="10" step="1">
</div>
<div class="actions--center mdl-card__actions">
<h2 id="laser-size-label">10</h2>
</div>
</div>
</section>
</div>
</section>
<ul class="mdl-list mdl-shadow--2dp">
<li class="mdl-list__item">
<span class="mdl-list__item-primary-content">
<i class="material-icons">control_camera</i>
Enable Remote Controller
</span>
<span class="mdl-list__item-secondary-action">
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="mouse-mode">
<input type="checkbox" id="mouse-mode" class="mdl-switch__input" />
</label>
</span>
</li>
</ul>
<div class="mdl-card mdl-cell mdl-cell--12-col mdl-footer">
<div class="mdl-card__actions">
<a href="https://twitter.com/manekinekko" class="mdl-button">
<img src="./assets/twitter.png" alt="Twitter logo" width="20">
Made by Wassim Chegham
</a>
<a href="https://github.com/manekinekko/spotlight.js" class="mdl-button">
<img src="./assets/github.svg" alt="Github logo" width="20">
Contribute on Github
</a>
</div>
</div>
</div>
</main>
</div>