forked from quadratichq/quadratic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
109 lines (103 loc) · 3.95 KB
/
index.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
<!DOCTYPE html>
<html lang="en" data-material-symbols-loaded="false">
<head>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" />
<meta content="True" name="HandheldFriendly" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="theme-color" content="#FFFFFF" />
<link rel="apple-touch-icon" href="/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="/manifest.json" />
<title>Quadratic</title>
<!--
Social share meta info
-->
<meta property="og:type" content="website" />
<meta property="og:title" content="Quadratic" />
<meta property="og:description" content="Modern spreadsheet software." />
<meta property="og:url" content="https://app.quadratichq.com" />
<meta property="og:image" content="https://app.quadratichq.com/images/social.png" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@quadratichq" />
<meta name="twitter:title" content="Quadratic" />
<meta name="twitter:description" content="Modern spreadsheet software." />
<meta name="twitter:image" content="https://app.quadratichq.com/images/social.png" />
<!-- Material symbols font -->
<link
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..24,400,0,0&display=block"
rel="stylesheet"
/>
<!-- Google Tag Manager -->
<script>
(function (w, d, s, l, i) {
w[l] = w[l] || [];
w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' });
var f = d.getElementsByTagName(s)[0],
j = d.createElement(s),
dl = l != 'dataLayer' ? '&l=' + l : '';
j.async = true;
j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
f.parentNode.insertBefore(j, f);
})(window, document, 'script', 'dataLayer', 'GTM-MDFG6DX4');
</script>
<!-- End Google Tag Manager -->
</head>
<body>
<!-- Google Tag Manager (noscript) -->
<!-- prettier-ignore -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-MDFG6DX4" crossorigin="anonymous"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script type="module" src="/src/index.tsx"></script>
</body>
<!--
The combination of these two things (<script> & <style>) appear to be
what makes possible the expected effect of panning and zooming (especially
with pinch to zoom on a trackpad) on the grid without experiencing weird
zoom or inertial panning effects.
Prevent window zooming on Chrome
https://stackoverflow.com/questions/61114830/how-to-prevent-native-browser-default-pinch-to-zoom-behavior
Disable inertial scroll
https://stackoverflow.com/questions/28103125/disable-inertia-scroll-for-single-page-webapp
Disable two finger scroll to go back (overscroll-behavior-x: contain;)
https://stackoverflow.com/questions/15829172/stop-chrome-back-forward-two-finger-swipe
-->
<script>
window.addEventListener(
'wheel',
(e) => {
if (e.ctrlKey) {
e.preventDefault();
return;
}
},
{ passive: false }
);
</script>
<style>
html,
body,
#root,
.App {
height: 100%;
overscroll-behavior-x: contain;
}
body {
overflow: hidden;
}
/* Disable two finger swipe back
https://stackoverflow.com/questions/15829172/stop-chrome-back-forward-two-finger-swipe */
html {
overscroll-behavior-x: none;
}
body {
overscroll-behavior-x: none;
}
</style>
</html>