-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
236 lines (216 loc) · 4.73 KB
/
index.html
File metadata and controls
236 lines (216 loc) · 4.73 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
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
226
227
228
229
230
231
232
233
234
235
236
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>SPRT - Screen Phone Responsive Tester</title>
<link rel="stylesheet" href="style.css" />
<link rel="shortcut icon" href="./imgs/icon.png" type="image/x-icon" />
</head>
<body>
<!-- Controls convertidos para uma sidebar (MenuBar) -->
<!-- Botão que abre/fecha a sidebar de Controles -->
<button id="toggleControlsBtn" aria-expanded="false" title="Controles">
<img src="./imgs/controls.png" alt="Controles" />
</button>
<!-- Sidebar de Controles (substitui a antiga div .controls) -->
<aside id="controlsBar" class="sideBar" aria-hidden="true">
<header>
<strong>Controles</strong>
<div class="controls-row">
<button id="closeControlsBtn">Fechar</button>
</div>
</header>
<label>
Largura:
<div class="input-group">
<input
type="range"
id="widthSlider"
min="200"
max="6000"
value="1080"
/>
<input
type="number"
id="widthInput"
min="200"
max="6000"
value="1080"
/>
</div>
</label>
<label>
Altura:
<div class="input-group">
<input
type="range"
id="heightSlider"
min="200"
max="6000"
value="2340"
/>
<input
type="number"
id="heightInput"
min="200"
max="6000"
value="2340"
/>
</div>
</label>
<label>
Escala:
<div class="input-group">
<input
type="range"
id="scaleSlider"
min="0.1"
max="2"
step="0.01"
value="0.78"
/>
<input
type="number"
id="scaleInput"
min="0.1"
max="2"
step="0.01"
value="0.78"
/>
</div>
</label>
<label>
DPI (densidade):
<div class="input-group">
<input
type="range"
id="dpiSlider"
min="1"
max="4"
step="0.1"
value="2"
/>
<input
type="number"
id="dpiInput"
min="1"
max="4"
step="0.1"
value="2"
/>
</div>
</label>
<label>
URL do iframe:
<div class="input-group">
<input
type="text"
id="urlInput"
placeholder="http://localhost:8081/"
value="http://localhost:8081/"
style="flex: 1"
/>
<button id="applyUrlBtn">Aplicar</button>
</div>
</label>
</aside>
<!-- Iframe / wrapper -->
<div class="father-wrapper">
<div class="iframe-wrapper" id="iframeWrapper">
<iframe id="myIframe" src="http://localhost:8081/"></iframe>
</div>
</div>
<!-- Toggle buttons (menu / console) -->
<button id="toggleMenuBtn" aria-expanded="false" title="Predefinições">
<img src="./imgs/phone.png" />
</button>
<button id="toggleConsoleBtn" aria-expanded="false" title="Console">
<img src="./imgs/console.png" />
</button>
<!-- Predefinições (menu) -->
<aside id="menuBar" class="sideBar" aria-hidden="true">
<header>
<strong>Predefinições</strong>
<div class="controls-row">
<button id="closeMenuBtn">Fechar</button>
</div>
</header>
<div
id="presetList"
style="display: flex; flex-direction: column; gap: 8px"
>
<!-- Presets (sem duplicatas em resolução) -->
<button
class="preset"
data-width="1080"
data-height="2340"
data-scale="1.5"
data-dpi="4"
>
Samsung Galaxy A15 5G
</button>
<button
class="preset"
data-width="1080"
data-height="2400"
data-scale="1.5"
data-dpi="4"
>
Motorola Moto G54 5G
</button>
<button
class="preset"
data-width="1440"
data-height="3120"
data-scale="1.1"
data-dpi="5"
>
Samsung Galaxy S24 Ultra
</button>
<button
class="preset"
data-width="1220"
data-height="2712"
data-scale="1.32"
data-dpi="4.5"
>
Xiaomi Poco X6 Pro
</button>
<button
class="preset"
data-width="1080"
data-height="2640"
data-scale="1.37"
data-dpi="4"
>
Samsung Galaxy Z Flip 5
</button>
<button
class="preset"
data-width="720"
data-height="1612"
data-scale="1.62"
data-dpi="3"
>
Motorola Moto G24
</button>
</div>
</aside>
<!-- Console (novo painel) -->
<aside id="consoleBar" class="sideBar" aria-hidden="true">
<header>
<strong>Console</strong>
<div class="controls-row">
<button id="clearConsoleBtn">Limpar</button>
<button id="closeConsoleBtn">Fechar</button>
</div>
</header>
<div id="consoleOutput" aria-live="polite"></div>
</aside>
<button id="rotateBtn" title="Rotacionar">
<img src="./imgs/rotate.png" />
</button>
<script src="./index.js"></script>
</body>
</html>