-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathperf.pug
50 lines (46 loc) · 1.15 KB
/
perf.pug
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
doctype html
html
head
meta(charset="UTF-8")
meta(http-equiv="X-UA-Compatible", content="IE=edge")
meta(name="viewport", content="width=device-width, initial-scale=1.0")
title Perf tester
body
<div id="app">
<input type="url" v-model="url" /><br>
<input type="number" v-model.number="count" /><br>
<input type="range" v-model.number="width" min="100" max="800" /><br>
<div class="iframes">
<iframe v-for="i in Array(count).fill(undefined)" :key="i" :src="url" :width="width" height="700">
</iframe>
</div>
</div>
script(src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js")
script.
const local_ips = !{JSON.stringify(local_ips)};
function firstIP() {
return Object.values(local_ips)[0][0];
}
var app = new Vue({
el: '#app',
data: {
count: 2,
width: 600,
url: `${window.location.origin}`,
local_ips
}
})
style.
body {
margin: 10px;
}
.iframes {
display: flex;
flex-flow: row wrap;
gap: 5px;
margin-top: 10px;
}
iframe {
margin: 0;
border: none;
}